Struct gapi_grpc::google::iam::v1beta::WorkloadIdentityPoolProvider [−][src]
A configuration for an external identity provider.
Fields
name: String
Output only. The resource name of the provider.
display_name: String
A display name for the provider. Cannot exceed 32 characters.
description: String
A description for the provider. Cannot exceed 256 characters.
state: i32
Output only. The state of the provider.
disabled: bool
Whether the provider is disabled. You cannot use a disabled provider to exchange tokens. However, existing tokens still grant access.
attribute_mapping: HashMap<String, String>
Maps attributes from 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. Cannot exceed 127 characters. -
google.groups
: Groups the external identity belongs to. You can grant groups access to resources using an IAMprincipalSet
binding; access applies to all members of the group.
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 workload to Google Cloud resources. For example:
-
google.subject
:principal://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/subject/{value}
-
google.groups
:principalSet://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/group/{value}
-
attribute.{custom_attribute}
:principalSet://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/attribute.{custom_attribute}/{value}
Each value must be a [Common Expression Language] (https://opensource.google/projects/cel) 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 8KB.
For AWS providers, the following rules apply:
-
If no attribute mapping is defined, the following default mapping applies:
{ "google.subject":"assertion.arn", "attribute.aws_role": "assertion.arn.contains('assumed-role')" " ? assertion.arn.extract('{account_arn}assumed-role/')" " + 'assumed-role/'" " + assertion.arn.extract('assumed-role/{role_name}/')" " : assertion.arn", }
-
If any custom attribute mappings are defined, they must include a mapping to the
google.subject
attribute.
For OIDC providers, the following rules apply:
-
Custom attribute mappings must be defined, and must include a mapping to the
google.subject
attribute. For example, the following maps thesub
claim of the incoming credential to thesubject
attribute on a Google token.{"google.subject": "assertion.sub"}
attribute_condition: String
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 theattribute_mappings
.attribute
: The custom attributes mapped from the assertion in theattribute_mappings
.
The maximum length of the attribute condition expression is 4096 characters. If unspecified, all valid authentication credential are accepted.
The following example shows how to only allow credentials with a mapped
google.groups
value of admins
:
"'admins' in google.groups"
provider_config: Option<ProviderConfig>
Identity provider configuration types.
Implementations
impl WorkloadIdentityPoolProvider
[src]
pub fn state(&self) -> State
[src]
Returns the enum value of state
, or the default if the field is set to an invalid enum value.
pub fn set_state(&mut self, value: State)
[src]
Sets state
to the provided enum value.
Trait Implementations
impl Clone for WorkloadIdentityPoolProvider
[src]
fn clone(&self) -> WorkloadIdentityPoolProvider
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for WorkloadIdentityPoolProvider
[src]
impl Default for WorkloadIdentityPoolProvider
[src]
impl Message for WorkloadIdentityPoolProvider
[src]
fn encode_raw<B>(&self, buf: &mut B) where
B: BufMut,
[src]
B: BufMut,
fn merge_field<B>(
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
[src]
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
fn encoded_len(&self) -> usize
[src]
fn clear(&mut self)
[src]
pub fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
[src]
B: BufMut,
pub fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
[src]
B: BufMut,
pub fn decode<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
[src]
Self: Default,
B: Buf,
pub fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
[src]
Self: Default,
B: Buf,
pub fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
[src]
B: Buf,
pub fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
[src]
B: Buf,
impl PartialEq<WorkloadIdentityPoolProvider> for WorkloadIdentityPoolProvider
[src]
fn eq(&self, other: &WorkloadIdentityPoolProvider) -> bool
[src]
fn ne(&self, other: &WorkloadIdentityPoolProvider) -> bool
[src]
impl StructuralPartialEq for WorkloadIdentityPoolProvider
[src]
Auto Trait Implementations
impl RefUnwindSafe for WorkloadIdentityPoolProvider
impl Send for WorkloadIdentityPoolProvider
impl Sync for WorkloadIdentityPoolProvider
impl Unpin for WorkloadIdentityPoolProvider
impl UnwindSafe for WorkloadIdentityPoolProvider
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoRequest<T> for T
[src]
pub fn into_request(self) -> Request<T>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,