Skip to content

Allow configuring Identity-Aware Proxy (IAP) customization settings #6471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments

@tbcardoso
Copy link

tbcardoso commented May 27, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

It would be useful to have a resource that configures the Identity-Aware Proxy (IAP) customization settings described in https://cloud.google.com/iap/docs/customizing.

For example, we need to let some IAP proxies pass through HTTP OPTIONS requests. For that, we need to set access_settings.cors_settings.allow_http_options to true.

New or Affected Resource(s)

  • google_iap_settings (new resource)

Potential Terraform Configuration

resource "google_iap_settings" "allow_cors" {
  resource_type = "compute"
  service       = "google_compute_backend_service.istio_global_http_iap_bes.self_link"

  accessSettings {
    corsSettings {
      allowHttpOptions = true
    }
  }
}

Workaround

It's possible to workaround this limitation by using a null resource with a local-exec provisioner:

locals {
  iap_settings = <<-EOT
  accessSettings:
    corsSettings:
      allowHttpOptions: true
  EOT
}

resource "null_resource" "iap_settings" {
  triggers = {
    bes_iap_settings = local.bes_iap_settings
    project_id       = data.google_project.project.project_id
    bes_name         = google_compute_backend_service.bes.name
  }

  provisioner "local-exec" {
    command = <<-EOT
    echo '${local.bes_iap_settings}' | \
    gcloud iap settings set /dev/stdin \
      --project=${data.google_project.project.project_id} \
      --resource-type=compute \
      --service=${google_compute_backend_service.bes.name}
    EOT
  }
}

References

  • b/194854185

b/305197972

@ghost ghost added the enhancement label May 27, 2020
@danawillow danawillow added this to the Goals milestone Jun 1, 2020
@wvanderdeijl
Copy link

The resource documentation can be found at https://cloud.google.com/iap/docs/reference/rest/v1/IapSettings

We are mainly interested in the accessSettings.gcipSettings and not the accessSettings. corsSettings from this original request. But I hope all fields of IapSettings will be included if this resource is created

@dinvlad
Copy link

dinvlad commented Apr 1, 2021

Any updates on this?

@rileykarson rileykarson removed this from the Goals milestone Jul 28, 2021
@rileykarson rileykarson added this to the Near-Term Goals milestone Aug 2, 2021
@sankit2020
Copy link

Please also add support for PolicyDelegationSettings.

This bug should be linked : https://b.corp.google.com/issues/195649321

@rileykarson rileykarson added the tpgtools Issues related to the tpgtools generator label Aug 11, 2021
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Sep 26, 2022
modular-magician added a commit that referenced this issue Sep 26, 2022
Signed-off-by: Modular Magician <[email protected]>

Signed-off-by: Modular Magician <[email protected]>
@maucaro
Copy link

maucaro commented Oct 24, 2022

I am also interested, as @wvanderdeijl , in accessSettings.gcipSettings. Any updates?

@github-actions github-actions bot added forward/review In review; remove label to forward service/iap labels Aug 17, 2023
@melinath melinath removed priority/3 tpgtools Issues related to the tpgtools generator forward/review In review; remove label to forward labels Oct 12, 2023
@Ironlink
Copy link

I am interested in this. I would like to be able to set the default cookie domain for IAP at a project level.

@MattiasOlla
Copy link

We'd also be interested in this, especially allowed_domains_settings.

@markConklin
Copy link

plus 1. thank you.

@jacobshirley
Copy link

It's been nearly 4 years.. will this ever be added?

@rdiers
Copy link

rdiers commented May 6, 2024

++

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.