Creates a new WorkforcePoolProvider in a WorkforcePool. You cannot reuse the name of a deleted provider until 30 days after deletion.


You will need authorization for the scope to make a valid call.

If unset, the scope for this method defaults to You can set the scope for this method like this: iam1 --scope <scope> locations workforce-pools-providers-create ...

Required Scalar Argument

  • <parent> (string)
    • Required. The pool to create this provider in. Format: locations/{location}/workforcePools/{workforce_pool_id}

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

  attribute-condition: string
  attribute-mapping: { string: string }
  description: string
  disabled: boolean
  display-name: string
  expire-time: string
  name: string
    client-id: string
        plain-text: string
        thumbprint: string
    issuer-uri: string
    jwks-json: string
      additional-scopes: [string]
      assertion-claims-behavior: string
      response-type: string
    idp-metadata-xml: string
  state: string

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r . attribute-condition=est
    • A Common Expression Language 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, google.display_name and google.posix_username 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: &#34;&#39;admins&#39; in google.groups&#34;
  • attribute-mapping=key=ipsum
    • 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. * google.posix_username: The linux username used by OS login. This is an optional field and the mapped posix username cannot exceed 32 characters, The key must match the regex "^a-zA-Z0-9.{0,31}$". 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: * google.subject: principal://{pool}/subject/{value} * google.groups: principalSet://{pool}/group/{value} * attribute.{custom_attribute}: principalSet://{pool}/attribute.{custom_attribute}/{value} Each value must be a [Common Expression Language] ( function that maps an identity provider credential to the normalized attribute specified by the corresponding map key. You can use the assertion keyword in the expression to access a JSON representation of the authentication credential issued by the provider. The maximum length of an attribute mapping expression is 2048 characters. When evaluated, the total size of all mapped attributes must not exceed 4KB. For OIDC providers, you must supply a custom mapping that includes the google.subject attribute. For example, the following maps the sub claim of the incoming credential to the subject attribute on a Google token: {&#34;google.subject&#34;: &#34;assertion.sub&#34;}
    • the value will be associated with the given key
  • description=ipsum
    • A user-specified description of the provider. Cannot exceed 256 characters.
  • disabled=true
    • Disables the workforce pool provider. You cannot use a disabled provider to exchange tokens. However, existing tokens still grant access.
  • display-name=ea
    • A user-specified display name for the provider. Cannot exceed 32 characters.
  • expire-time=dolor
    • Output only. Time after which the workload pool provider will be permanently purged and cannot be recovered.
  • name=lorem
    • Output only. The resource name of the provider. Format: locations/{location}/workforcePools/{workforce_pool_id}/providers/{provider_id}
  • oidc client-id=eos
    • Required. The client ID. Must match the audience claim of the JWT issued by the identity provider.
  • client-secret.value plain-text=labore
    • Input only. The plain text of the client secret value. For security reasons, this field is only used for input and will never be populated in any response.
  • thumbprint=sed

    • Output only. A thumbprint to represent the current client secret value.
  • ... issuer-uri=duo

    • Required. The OIDC issuer URI. Must be a valid URI using the 'https' scheme.
  • jwks-json=sed
    • OIDC JWKs in JSON String format. For details on the definition of a JWK, see If not set, the jwks_uri from the discovery document(fetched from the .well-known path of the issuer_uri) will be used. 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": "" } ] }
  • web-sso-config additional-scopes=no
    • 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.
    • Each invocation of this argument appends the given value to the array.
  • assertion-claims-behavior=stet
    • Required. The behavior for how OIDC Claims are included in the assertion object used for attribute mapping and attribute condition.
  • response-type=kasd

    • 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.
  • ...saml idp-metadata-xml=et

    • Required. SAML Identity provider configuration metadata xml doc. The xml document should comply with SAML 2.0 specification. 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 15 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.
  • .. state=sed

    • Output only. The state of the provider.

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional Method Properties

You may set the following properties to further configure the call. Please note that -p is followed by one or more key-value-pairs, and is called like this -p k1=v1 k2=v2 even though the listing below repeats the -p for completeness.

  • -p workforce-pool-provider-id=string
    • Required. The ID for the provider, which becomes the final component of the resource name. This value must be 4-32 characters, and may contain the characters [a-z0-9-]. The prefix gcp- is reserved for use by Google, and may not be specified.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").