Skip to main content

KanidmOAuth2ClientSpec

Struct KanidmOAuth2ClientSpec 

Source
pub struct KanidmOAuth2ClientSpec {
Show 19 fields pub kanidm_ref: KanidmRef, pub kanidm_name: Option<String>, pub displayname: String, pub origin: String, pub redirect_url: Vec<String>, pub public: bool, pub scope_map: Option<BTreeSet<KanidmScopeMap>>, pub sup_scope_map: Option<BTreeSet<KanidmScopeMap>>, pub claim_map: Option<BTreeSet<KanidmClaimMap>>, pub strict_redirect_url: Option<bool>, pub prefer_short_username: Option<bool>, pub allow_localhost_redirect: Option<bool>, pub allow_insecure_client_disable_pkce: Option<bool>, pub jwt_legacy_crypto_enable: Option<bool>, pub disable_consent_prompt: Option<bool>, pub secret_rotation: Option<SecretRotation>, pub secret_template: Option<MetadataTemplate>, pub secret_key_aliases: Option<SecretKeyAliases>, pub image: Option<OAuth2ClientImageSpec>,
}
Expand description

The KanidmOAuth2Client custom resource definition (CRD) defines an OAuth2 client integration in Kanidm. This resource allows you to configure OAuth2 clients that can interact with the Kanidm authorization server. The CRD supports various configurations, including scope maps, claim maps, and other OAuth2 client settings. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Fields§

§kanidm_ref: KanidmRef§kanidm_name: Option<String>

The name of the entity in Kanidm. If not specified, the Kubernetes resource name is used. Use this field to manage Kanidm entities with names that don’t conform to Kubernetes naming rules (e.g., entities with underscores like idm_admin or idm_all_persons). This field is immutable and cannot be changed after creation.

§displayname: String

Set the display name for the OAuth2 client.

§origin: String

Set the landing page (home page) of the client. The landing page is where users will be redirected to from the Kanidm application portal.

§redirect_url: Vec<String>

Set the URL where the application expects OAuth2 requests to be sent.

§public: bool

Create a new OAuth2 public client that requires PKCE. You should prefer using confidential client types if possible over public ones.

Public clients have many limitations and can not access all API’s of OAuth2. For example rfc7662 token introspection requires client authentication.

This cannot be changed after creation. Default value is false. This field is immutable. If public is false, the operator will create a secret containing the client secret with the name <oauth2-client-name>-kanidm-oauth2-credentials in the same namespace as the OAuth2 client.

§scope_map: Option<BTreeSet<KanidmScopeMap>>

Main scope map for the OAuth2 client. For an authorization to proceed, all scopes requested by the client must be available in the final scope set that is granted to the account.

§sup_scope_map: Option<BTreeSet<KanidmScopeMap>>

Supplementary scope maps for the OAuth2 client. These function the same as scope maps where membership of a group provides a set of scopes to the account. However these scopes are NOT consulted during authorization decisions made by Kanidm. These scopes exist to allow optional properties to be provided (such as personal information about a subset of accounts to be revealed) or so that the service may make its own authorization decisions based on the provided scopes.

§claim_map: Option<BTreeSet<KanidmClaimMap>>

Mapping from a group to a custom claims that it provides to members.

§strict_redirect_url: Option<bool>

Enable strict validation of redirect URLs. Previously redirect URLs only validated the origin of the URL matched. When enabled, redirect URLs must match exactly.

Enabled by default.

§prefer_short_username: Option<bool>

Use the ‘name’ attribute instead of ‘spn’ for the preferred_username.

Disabled by default.

§allow_localhost_redirect: Option<bool>

Allow public clients to redirect to localhost.

Just public clients can allow localhost redirect. Disabled by default.

§allow_insecure_client_disable_pkce: Option<bool>

Disable PKCE on this oauth2 client to work around insecure clients that may not support it. You should request the client to enable PKCE!

Public clients cannot disable PKCE. PKCE is enabled by default.

§jwt_legacy_crypto_enable: Option<bool>

Enable legacy signing crypto on this oauth2 client. This defaults to being disabled. You only need to enable this for openid clients that do not support modern cryptographic operations.

Disabled by default.

§disable_consent_prompt: Option<bool>

Disable the consent prompt for this OAuth2 client. This allows skipping the user consent screen for well-known admin-managed applications. When enabled, users will not be prompted to grant consent when authorizing with this client.

Disabled by default.

§secret_rotation: Option<SecretRotation>

Automatic rotation configuration for the OAuth2 client secret. Only applies to confidential clients (public: false). When enabled, the operator will regenerate the client secret periodically based on the configured rotation period.

§secret_template: Option<MetadataTemplate>

Template applied to the Secret created for confidential clients (public: false). Allows attaching custom annotations and labels to the generated Secret. The operator’s own labels and annotations take precedence over any conflicting keys in the template. Changes to this template are enforced on the next reconciliation, overwriting any manual modifications made to the Secret

§secret_key_aliases: Option<SecretKeyAliases>

Aliases for the canonical secret keys (CLIENT_ID and CLIENT_SECRET). Allows consumers that require different fixed key names to access the same credentials. The canonical keys CLIENT_ID and CLIENT_SECRET are always present. Only applies to confidential clients (public: false).

§image: Option<OAuth2ClientImageSpec>

Optional URL to an image for the OAuth2 client application. The image will be downloaded and set in Kanidm for display in the application portal. Constraints:

  • Maximum size: 256 KB
  • Maximum dimensions: 1024 x 1024 pixels
  • Supported formats: png, jpg, gif, svg, webp

Trait Implementations§

Source§

impl Clone for KanidmOAuth2ClientSpec

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for KanidmOAuth2ClientSpec

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for KanidmOAuth2ClientSpec

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for KanidmOAuth2ClientSpec

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for KanidmOAuth2ClientSpec

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for KanidmOAuth2ClientSpec

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for KanidmOAuth2ClientSpec

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for KanidmOAuth2ClientSpec

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self> ⓘ

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self> ⓘ

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

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.
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ServiceExt for T

Source§

fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>
where Self: Sized,

Apply a transformation to the response body. Read more
Source§

fn decompression(self) -> Decompression<Self>
where Self: Sized,

Decompress response bodies. Read more
Source§

fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using HTTP status codes. Read more
Source§

fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using gRPC headers. Read more
Source§

fn follow_redirects(self) -> FollowRedirect<Self>
where Self: Sized,

Follow redirect resposes using the Standard policy. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more