IAMWorkforcePoolProvider


Property Value
Google Cloud Service Name IAM
Google Cloud Service Documentation /iam/docs/
Google Cloud REST Resource Name v1.locations.workforcePools.providers
Google Cloud REST Resource Documentation /iam/docs/reference/rest/v1/locations.workforcePools.providers
Config Connector Resource Short Names gcpiamworkforcepoolprovider
gcpiamworkforcepoolproviders
iamworkforcepoolprovider
Config Connector Service Name iam.googleapis.com
Config Connector Resource Fully Qualified Name iamworkforcepoolproviders.iam.cnrm.cloud.google.com
Can Be Referenced by IAMPolicy/IAMPolicyMember No
Config Connector Default Average Reconcile Interval In Seconds 600

Custom Resource Definition Properties

Spec

Schema

attributeCondition: string
attributeMapping:
  string: string
description: string
disabled: boolean
displayName: string
location: string
oidc:
  clientId: string
  clientSecret:
    value:
      plainText:
        value: string
        valueFrom:
          secretKeyRef:
            key: string
            name: string
  issuerUri: string
  jwksJson: string
  webSsoConfig:
    additionalScopes:
    - string
    assertionClaimsBehavior: string
    responseType: string
resourceID: string
saml:
  idpMetadataXml: string
workforcePoolRef:
  external: string
  name: string
  namespace: string
Fields

attributeCondition

Optional

string

A [Common Expression Language](https://opensource.google/projects/cel) expression, in plain text, to restrict what otherwise valid authentication credentials issued by the provider should not be accepted. The expression must output a boolean representing whether to allow the federation. The following keywords may be referenced in the expressions: * `assertion`: JSON representing the authentication credential issued by the provider. * `google`: The Google attributes mapped from the assertion in the `attribute_mappings`. `google.profile_photo` and `google.display_name` are not supported. * `attribute`: The custom attributes mapped from the assertion in the `attribute_mappings`. The maximum length of the attribute condition expression is 4096 characters. If unspecified, all valid authentication credentials will be accepted. The following example shows how to only allow credentials with a mapped `google.groups` value of `admins`: ``` "'admins' in google.groups" ```

attributeMapping

Required

map (key: string, value: string)

Required. Maps attributes from the authentication credentials issued by an external identity provider to Google Cloud attributes, such as `subject` and `segment`. Each key must be a string specifying the Google Cloud IAM attribute to map to. The following keys are supported: * `google.subject`: The principal IAM is authenticating. You can reference this value in IAM bindings. This is also the subject that appears in Cloud Logging logs. This is a required field and the mapped subject cannot exceed 127 bytes. * `google.groups`: Groups the authenticating user belongs to. You can grant groups access to resources using an IAM `principalSet` binding; access applies to all members of the group. * `google.display_name`: The name of the authenticated user. This is an optional field and the mapped display name cannot exceed 100 bytes. If not set, `google.subject` will be displayed instead. This attribute cannot be referenced in IAM bindings. * `google.profile_photo`: The URL that specifies the authenticated user's thumbnail photo. This is an optional field. When set, the image will be visible as the user's profile picture. If not set, a generic user icon will be displayed instead. This attribute cannot be referenced in IAM bindings. You can also provide custom attributes by specifying `attribute.{custom_attribute}`, where {custom_attribute} is the name of the custom attribute to be mapped. You can define a maximum of 50 custom attributes. The maximum length of a mapped attribute key is 100 characters, and the key may only contain the characters [a-z0-9_]. You can reference these attributes in IAM policies to define fine-grained access for a workforce pool to Google Cloud resources. For example:

description

Optional

string

A user-specified description of the provider. Cannot exceed 256 characters.

disabled

Optional

boolean

Whether the provider is disabled. You cannot use a disabled provider to exchange tokens. However, existing tokens still grant access.

displayName

Optional

string

A user-specified display name for the provider. Cannot exceed 32 characters.

location

Required

string

Immutable. The location for the resource

oidc

Optional

object

An OpenId Connect 1.0 identity provider configuration.

oidc.clientId

Required*

string

Required. The client ID. Must match the audience claim of the JWT issued by the identity provider.

oidc.clientSecret

Optional

object

The optional client secret. Required to enable Authorization Code flow for web sign-in.

oidc.clientSecret.value

Optional

object

The value of the client secret.

oidc.clientSecret.value.plainText

Optional

object

Input only. The plain text of the client secret value.

oidc.clientSecret.value.plainText.value

Optional

string

Value of the field. Cannot be used if 'valueFrom' is specified.

oidc.clientSecret.value.plainText.valueFrom

Optional

object

Source for the field's value. Cannot be used if 'value' is specified.

oidc.clientSecret.value.plainText.valueFrom.secretKeyRef

Optional

object

Reference to a value with the given key in the given Secret in the resource's namespace.

oidc.clientSecret.value.plainText.valueFrom.secretKeyRef.key

Required*

string

Key that identifies the value to be extracted.

oidc.clientSecret.value.plainText.valueFrom.secretKeyRef.name

Required*

string

Name of the Secret to extract a value from.

oidc.issuerUri

Required*

string

Required. The OIDC issuer URI. Must be a valid URI using the 'https' scheme.

oidc.jwksJson

Optional

string

OIDC JWKs in JSON String format. For details on definition of a JWK, see https:tools.ietf.org/html/rfc7517. If not set, then we use the `jwks_uri` from the discovery document fetched from the .well-known path for the `issuer_uri`. Currently, RSA and EC asymmetric keys are supported. The JWK must use following format and include only the following fields: ```{"keys": [{"kty": "RSA/EC", "alg": "", "use": "sig", "kid": "", "n": "", "e": "", "x": "", "y": "", "crv": ""}]}```

oidc.webSsoConfig

Required*

object

Required. Configuration for web single sign-on for the OIDC provider. Here, web sign-in refers to console sign-in and gcloud sign-in through the browser.

oidc.webSsoConfig.additionalScopes

Optional

list (string)

Additional scopes to request for in the OIDC authentication request on top of scopes requested by default. By default, the `openid`, `profile` and `email` scopes that are supported by the identity provider are requested. Each additional scope may be at most 256 characters. A maximum of 10 additional scopes may be configured.

oidc.webSsoConfig.additionalScopes[]

Optional

string

oidc.webSsoConfig.assertionClaimsBehavior

Required*

string

Required. The behavior for how OIDC Claims are included in the `assertion` object used for attribute mapping and attribute condition. Possible values: ASSERTION_CLAIMS_BEHAVIOR_UNSPECIFIED, MERGE_USER_INFO_OVER_ID_TOKEN_CLAIMS, ONLY_ID_TOKEN_CLAIMS

oidc.webSsoConfig.responseType

Required*

string

Required. The Response Type to request for in the OIDC Authorization Request for web sign-in. The `CODE` Response Type is recommended to avoid the Implicit Flow, for security reasons. Possible values: RESPONSE_TYPE_UNSPECIFIED, CODE, ID_TOKEN

resourceID

Optional

string

Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default.

saml

Optional

object

A SAML identity provider configuration.

saml.idpMetadataXml

Required*

string

Required. SAML Identity provider configuration metadata xml doc. The xml document should comply with [SAML 2.0 specification](https://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf). The max size of the acceptable xml document will be bounded to 128k characters. The metadata xml document should satisfy the following constraints: 1) Must contain an Identity Provider Entity ID. 2) Must contain at least one non-expired signing key certificate. 3) For each signing key: a) Valid from should be no more than 7 days from now. b) Valid to should be no more than 10 years in the future. 4) Up to 3 IdP signing keys are allowed in the metadata xml. When updating the provider's metadata xml, at least one non-expired signing key must overlap with the existing metadata. This requirement is skipped if there are no non-expired signing keys present in the existing metadata.

workforcePoolRef

Required

object

Immutable.

workforcePoolRef.external

Optional

string

The workforce_pool for the resource Allowed value: The Google Cloud resource name of an `IAMWorkforcePool` resource (format: `locations/{{location}}/workforcePools/{{name}}`).

workforcePoolRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

workforcePoolRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

* Field is required when parent field is specified

Status

Schema

conditions:
- lastTransitionTime: string
  message: string
  reason: string
  status: string
  type: string
observedGeneration: integer
oidc:
  clientSecret:
    value:
      thumbprint: string
state: string
Fields
conditions

list (object)

Conditions represent the latest available observation of the resource's current state.

conditions[]

object

conditions[].lastTransitionTime

string

Last time the condition transitioned from one status to another.

conditions[].message

string

Human-readable message indicating details about last transition.

conditions[].reason

string

Unique, one-word, CamelCase reason for the condition's last transition.

conditions[].status

string

Status is the status of the condition. Can be True, False, Unknown.

conditions[].type

string

Type is the type of the condition.

observedGeneration

integer

ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource.

oidc

object

oidc.clientSecret

object

oidc.clientSecret.value

object

oidc.clientSecret.value.thumbprint

string

Output only. A thumbprint to represent the current client secret value.

state

string

Output only. The state of the provider. Possible values: STATE_UNSPECIFIED, ACTIVE, DELETED

Sample YAML(s)

Oidc Workforce Pool Provider

# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMWorkforcePoolProvider
metadata:
  name: iamworkforcepoolprovider-sample-oidcworkforcepoolprovider
spec:
  location: "global"
  workforcePoolRef:
    name: "iamworkforcepoolprovider-dep-oidcworkforcepoolprovider"
  attributeMapping:
    google.subject: "assertion.sub"
  oidc:
    issuerUri: "https://example.com"
    clientId: "client-id"
    clientSecret:
      value:
        plainText:
          value: "client-secret"
    jwksJson: "{\"keys\":[{\"kty\":\"RSA\",\"e\":\"AQAB\",\"use\":\"sig\",\"kid\"\
      :\"1i-PmZZrF1j2rOUAxkcQaaz3MnOXcwwziuch_XWjvqI\",\"alg\":\"RS256\",\"n\":\"\
      kFpYE2Zm32y--cnUiFLm4cYmFO8tR4-5KU5-aqhRwiHPP0FkgdQZSoSyp_1DO6PruYfluRMviwOpbmM6LH7KemxVdxLKqLDkHSG0XC3dZkACRFNvBBOdFrvJ0ABXv3vVx592lFE0m-Je5-FerRSQCml6E7icNiTSxizEmvDsTIe8mvArjsODDrgWP25bEFwDPBd5cCl3_2gtW6YdaCRewLXdzuB5Wmp_vOu6trTUzEKbnQlWFtDDCPfOpywYXF8dY1Lbwas5iwwIZozwD2_CuTiyXa3T2_4oa119_rQrIC2BAv7q_S1Xoa2lk3q2GZUSVQ5i3gIbJuDHmp-6yh3k4w\"\
      }]}"
    webSsoConfig:
      responseType: "CODE"
      assertionClaimsBehavior: "MERGE_USER_INFO_OVER_ID_TOKEN_CLAIMS"
      additionalScopes:
      - "groups"
      - "photos"
---
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMWorkforcePool
metadata:
  name: iamworkforcepoolprovider-dep-oidcworkforcepoolprovider
spec:
  organizationRef:
    # Replace "${ORG_ID?}" with the numeric ID for your organization.
    external: "organizations/${ORG_ID?}"
  location: "global"
  displayName: "Display name"
  description: "A sample workforce pool."
  state: "ACTIVE"
  disabled: false
  sessionDuration: "7200s"

Saml Workforce Pool Provider

# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMWorkforcePoolProvider
metadata:
  name: iamworkforcepoolprovider-sample-samlworkforcepoolprovider
spec:
  location: "global"
  workforcePoolRef:
    name: "iamworkforcepoolprovider-dep-samlworkforcepoolprovider"
  displayName: "Display name"
  description: "A sample SAML workforce pool provider."
  state: "ACTIVE"
  disabled: false
  attributeMapping:
    google.subject: "assertion.sub"
  attributeCondition: "true"
  saml:
    idpMetadataXml: "<?xml version=\"1.0\"?><md:EntityDescriptor xmlns:md=\"urn:oasis:names:tc:SAML:2.0:metadata\"\
      \ entityID=\"https://test.com\"><md:IDPSSODescriptor protocolSupportEnumeration=\"\
      urn:oasis:names:tc:SAML:2.0:protocol\"> <md:KeyDescriptor use=\"signing\"><ds:KeyInfo\
      \ xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><ds:X509Data><ds:X509Certificate>MIIDpDCCAoygAwIBAgIGAX7/5qPhMA0GCSqGSIb3DQEBCwUAMIGSMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEUMBIGA1UECwwLU1NPUHJvdmlkZXIxEzARBgNVBAMMCmRldi00NTg0MjExHDAaBgkqhkiG9w0BCQEWDWluZm9Ab2t0YS5jb20wHhcNMjIwMjE2MDAxOTEyWhcNMzIwMjE2MDAyMDEyWjCBkjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDTALBgNVBAoMBE9rdGExFDASBgNVBAsMC1NTT1Byb3ZpZGVyMRMwEQYDVQQDDApkZXYtNDU4NDIxMRwwGgYJKoZIhvcNAQkBFg1pbmZvQG9rdGEuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxrBl7GKz52cRpxF9xCsirnRuMxnhFBaUrsHqAQrLqWmdlpNYZTVg+T9iQ+aq/iE68L+BRZcZniKIvW58wqqS0ltXVvIkXuDSvnvnkkI5yMIVErR20K8jSOKQm1FmK+fgAJ4koshFiu9oLiqu0Ejc0DuL3/XRsb4RuxjktKTb1khgBBtb+7idEk0sFR0RPefAweXImJkDHDm7SxjDwGJUubbqpdTxasPr0W+AHI1VUzsUsTiHAoyb0XDkYqHfDzhj/ZdIEl4zHQ3bEZvlD984ztAnmX2SuFLLKfXeAAGHei8MMixJvwxYkkPeYZ/5h8WgBZPP4heS2CPjwYExt29L8QIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQARjJFz++a9Z5IQGFzsZMrX2EDR5ML4xxUiQkbhld1S1PljOLcYFARDmUC2YYHOueU4ee8Jid9nPGEUebV/4Jok+b+oQh+dWMgiWjSLI7h5q4OYZ3VJtdlVwgMFt2iz+/4yBKMUZ50g3Qgg36vE34us+eKitg759JgCNsibxn0qtJgSPm0sgP2L6yTaLnoEUbXBRxCwynTSkp9ZijZqEzbhN0e2dWv7Rx/nfpohpDP6vEiFImKFHpDSv3M/5de1ytQzPFrZBYt9WlzlYwE1aD9FHCxdd+rWgYMVVoRaRmndpV/Rq3QUuDuFJtaoX11bC7ExkOpg9KstZzA63i3VcfYv</ds:X509Certificate></ds:X509Data></ds:KeyInfo></md:KeyDescriptor><md:SingleSignOnService\
      \ Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\" Location=\"\
      https://test.com/sso\"/></md:IDPSSODescriptor></md:EntityDescriptor>"
---
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMWorkforcePool
metadata:
  name: iamworkforcepoolprovider-dep-samlworkforcepoolprovider
spec:
  organizationRef:
    # Replace "${ORG_ID?}" with the numeric ID for your organization.
    external: "organizations/${ORG_ID?}"
  location: "global"
  displayName: "Display name"
  description: "A sample workforce pool."
  state: "ACTIVE"
  disabled: false
  sessionDuration: "7200s"