pub struct OidcConfig {
pub jwks_url: String,
pub issuer: String,
pub audience: String,
pub repo_mappings: HashMap<String, (String, Role)>,
pub provider_type: OidcProviderType,
}Expand description
OIDC configuration for a single provider instance.
Fields§
§jwks_url: StringURL to fetch JWKS from
(e.g. https://token.actions.githubusercontent.com/.well-known/jwks)
issuer: StringExpected issuer
(e.g. https://token.actions.githubusercontent.com)
audience: StringExpected audience
repo_mappings: HashMap<String, (String, Role)>Mapping from the identity claim value to (project_id, Role).
For GitHub the key is org/repo, for GitLab it is group/project,
for custom providers it is whatever the configured claim field yields.
provider_type: OidcProviderTypeThe provider type driving claim extraction.
Implementations§
Source§impl OidcConfig
impl OidcConfig
Sourcepub fn github(audience: impl Into<String>) -> Self
pub fn github(audience: impl Into<String>) -> Self
Creates a GitHub Actions OIDC configuration.
Sourcepub fn gitlab(audience: impl Into<String>) -> Self
pub fn gitlab(audience: impl Into<String>) -> Self
Creates a GitLab CI OIDC configuration for gitlab.com.
Sourcepub fn gitlab_custom(
issuer: impl Into<String>,
audience: impl Into<String>,
) -> Self
pub fn gitlab_custom( issuer: impl Into<String>, audience: impl Into<String>, ) -> Self
Creates a GitLab CI OIDC configuration for a self-managed instance.
Trait Implementations§
Source§impl Clone for OidcConfig
impl Clone for OidcConfig
Source§fn clone(&self) -> OidcConfig
fn clone(&self) -> OidcConfig
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 moreAuto Trait Implementations§
impl Freeze for OidcConfig
impl RefUnwindSafe for OidcConfig
impl Send for OidcConfig
impl Sync for OidcConfig
impl Unpin for OidcConfig
impl UnsafeUnpin for OidcConfig
impl UnwindSafe for OidcConfig
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.