IAMWorkforcePoolProvider

Stay organized with collections Save and categorize content based on your preferences.

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

Custom Resource Definition Properties

Annotations

Fields
cnrm.cloud.google.com/state-into-spec

Spec

Schema

attributeCondition: string
attributeMapping:
  string: string
description: string
disabled: boolean
displayName: string
location: string
oidc:
  clientId: string
  issuerUri: 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.issuerUri

Required*

string

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

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
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.

state

string

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

Sample YAML(s)

Oidc Workforce Pool Provider

# Copyright 2022 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: iamwfpp-sample-oidc
spec:
  location: "global"
  workforcePoolRef:
    name: "iamwfpp-dep-oidc"
  attributeMapping:
    google.subject: "assertion.sub"
  oidc:
    issuerUri: "https://accounts.google.com"
    clientId: "client-id"
---
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMWorkforcePool
metadata:
  name: iamwfpp-dep-oidc
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 2022 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: iamwfpp-sample-saml
spec:
  location: "global"
  workforcePoolRef:
    name: "iamwfpp-dep-saml"
  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/5qPhMA0GCSqGSIb3DQEBCwUAMIGSMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEUMBIGA1UECwwLU1NPUHJvdmlkZXIxEzARBgNVBAMMCmRldi00NTg0MjExHDAaBgkqhk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><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: iamwfpp-dep-saml
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"