pub struct IdentityExchange {
pub identity: String,
pub id_token: IdTokenFn,
pub issuer: String,
pub audience: String,
}Expand description
A TokenSource that trades a token from an external OIDC issuer (GitHub Actions, GitLab, a
Kubernetes service account, …) for a Chainguard token, acting as a Chainguard assumable
identity that trusts that issuer and subject.
One-time setup, by an organization owner:
chainctl iam identities create <name> --parent <org> \
--identity-issuer <issuer URL> --subject <subject> --role sandbox.userIt calls the same SecurityTokenService/Exchange API chainctl uses, over its HTTP binding
(POST /sts/exchange). Wrap it in cached.
Fields§
§identity: StringThe assumable identity’s ID (from chainctl iam identities list).
id_token: IdTokenFnSee github_actions_id_token, env_id_token and file_id_token.
issuer: StringDefaults to DEFAULT_ISSUER.
audience: StringDefaults to DEFAULT_AUDIENCE.
Trait Implementations§
Source§impl Clone for IdentityExchange
impl Clone for IdentityExchange
Source§fn clone(&self) -> IdentityExchange
fn clone(&self) -> IdentityExchange
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IdentityExchange
impl Debug for IdentityExchange
Source§impl TokenSource for IdentityExchange
impl TokenSource for IdentityExchange
Auto Trait Implementations§
impl Freeze for IdentityExchange
impl !RefUnwindSafe for IdentityExchange
impl Send for IdentityExchange
impl Sync for IdentityExchange
impl Unpin for IdentityExchange
impl UnsafeUnpin for IdentityExchange
impl !UnwindSafe for IdentityExchange
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].