Struct google_api_proto::google::cloud::iap::v1::AttributePropagationSettings
source · pub struct AttributePropagationSettings {
pub expression: Option<String>,
pub output_credentials: Vec<i32>,
pub enable: Option<bool>,
}
Expand description
Configuration for propagating attributes to applications protected by IAP.
Fields§
§expression: Option<String>
Raw string CEL expression. Must return a list of attributes. A maximum of
45 attributes can be selected. Expressions can select different attribute
types from attributes
: attributes.saml_attributes
,
attributes.iap_attributes
. The following functions are supported:
-
filter
<list>.filter(<iter_var>, <predicate>)
: Returns a subset of<list>
where<predicate>
is true for every item. -
in
<var> in <list>
: Returns true if<list>
contains<var>
. -
selectByName
<list>.selectByName(<string>)
: Returns the attribute in<list>
with the given<string>
name, otherwise returns empty. -
emitAs
<attribute>.emitAs(<string>)
: Sets the<attribute>
name field to the given<string>
for propagation in selected output credentials. -
strict
<attribute>.strict()
: Ignores thex-goog-iap-attr-
prefix for the provided<attribute>
when propagating with theHEADER
output credential, such as request headers. -
append
<target_list>.append(<attribute>)
OR<target_list>.append(<list>)
: Appends the provided<attribute>
or<list>
to the end of<target_list>
.
Example expression: attributes.saml_attributes.filter(x, x.name in ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())
output_credentials: Vec<i32>
Which output credentials attributes selected by the CEL expression should be propagated in. All attributes will be fully duplicated in each selected output credential.
enable: Option<bool>
Whether the provided attribute propagation settings should be evaluated on user requests. If set to true, attributes returned from the expression will be propagated in the set output credentials.
Implementations§
source§impl AttributePropagationSettings
impl AttributePropagationSettings
sourcepub fn expression(&self) -> &str
pub fn expression(&self) -> &str
Returns the value of expression
, or the default value if expression
is unset.
sourcepub fn output_credentials(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<OutputCredentials>>
pub fn output_credentials( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<OutputCredentials>>
Returns an iterator which yields the valid enum values contained in output_credentials
.
sourcepub fn push_output_credentials(&mut self, value: OutputCredentials)
pub fn push_output_credentials(&mut self, value: OutputCredentials)
Appends the provided enum value to output_credentials
.
Trait Implementations§
source§impl Clone for AttributePropagationSettings
impl Clone for AttributePropagationSettings
source§fn clone(&self) -> AttributePropagationSettings
fn clone(&self) -> AttributePropagationSettings
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AttributePropagationSettings
impl Debug for AttributePropagationSettings
source§impl Message for AttributePropagationSettings
impl Message for AttributePropagationSettings
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for AttributePropagationSettings
impl PartialEq for AttributePropagationSettings
source§fn eq(&self, other: &AttributePropagationSettings) -> bool
fn eq(&self, other: &AttributePropagationSettings) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for AttributePropagationSettings
Auto Trait Implementations§
impl Freeze for AttributePropagationSettings
impl RefUnwindSafe for AttributePropagationSettings
impl Send for AttributePropagationSettings
impl Sync for AttributePropagationSettings
impl Unpin for AttributePropagationSettings
impl UnwindSafe for AttributePropagationSettings
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request