From 46d77e18661dce0be5de1500a2ae246e06d22d1b Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Thu, 22 Aug 2024 13:46:16 +0200 Subject: [PATCH] fix: Fix the CRD description of ClientAuthenticationDetails (#846) * fix: Fix the CRD description of ClientAuthenticationDetails * changelog * fix * fix --- crates/stackable-operator/CHANGELOG.md | 6 ++++++ .../src/commons/authentication/mod.rs | 14 ++++++++------ .../src/commons/authentication/oidc.rs | 4 ++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 0aac40a96..64dbbfc0c 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Fixed + +- Fix the CRD description of `ClientAuthenticationDetails` to not contain internal Rust doc, but a public CRD description ([#846]). + +[#846]: https://github.com/stackabletech/operator-rs/pull/846 + ## [0.74.0] - 2024-08-22 ### Added diff --git a/crates/stackable-operator/src/commons/authentication/mod.rs b/crates/stackable-operator/src/commons/authentication/mod.rs index 41b9bc1a8..b4d87890e 100644 --- a/crates/stackable-operator/src/commons/authentication/mod.rs +++ b/crates/stackable-operator/src/commons/authentication/mod.rs @@ -125,15 +125,17 @@ impl AuthenticationClass { #[serde(rename_all = "camelCase")] #[schemars(description = "")] pub struct ClientAuthenticationDetails { - /// A name/key which references an authentication class. To get the concrete - /// [`AuthenticationClass`], we must resolve it. This resolution can be - /// achieved by using [`ClientAuthenticationDetails::resolve_class`]. + /// Name of the [AuthenticationClass](https://docs.stackable.tech/home/nightly/concepts/authentication) used to + /// authenticate users. + // + // To get the concrete [`AuthenticationClass`], we must resolve it. This resolution can be achieved by using + // [`ClientAuthenticationDetails::resolve_class`]. #[serde(rename = "authenticationClass")] authentication_class_ref: String, - /// This field contains authentication provider specific configuration. - /// - /// Use [`ClientAuthenticationDetails::oidc_or_error`] to get the value or report an error to the user. + /// This field contains OIDC-specific configuration. It is only required in case OIDC is used. + // + // Use [`ClientAuthenticationDetails::oidc_or_error`] to get the value or report an error to the user. // TODO: Ideally we want this to be an enum once other `ClientAuthenticationOptions` are added, so // that user can not configure multiple options at the same time (yes we are aware that this makes a // changing the type of an AuthenticationClass harder). diff --git a/crates/stackable-operator/src/commons/authentication/oidc.rs b/crates/stackable-operator/src/commons/authentication/oidc.rs index 331759055..3f0c42a22 100644 --- a/crates/stackable-operator/src/commons/authentication/oidc.rs +++ b/crates/stackable-operator/src/commons/authentication/oidc.rs @@ -232,8 +232,8 @@ pub struct ClientAuthenticationOptions { #[serde(default)] pub extra_scopes: Vec, - /// If desired, operators can add custom fields that are only needed for this specific product. - /// They need to create a struct holding them and pass that as `T`. + // If desired, operators can add custom fields that are only needed for this specific product. + // They need to create a struct holding them and pass that as `T`. #[serde(flatten)] pub product_specific_fields: T, }