From 86c16e324f6487392cdffcebe164ecfec7d1c78d Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Thu, 22 Aug 2024 13:25:19 +0200 Subject: [PATCH 1/4] fix: Fix the CRD description of ClientAuthenticationDetails --- crates/stackable-operator/CHANGELOG.md | 4 ++++ .../src/commons/authentication/mod.rs | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 0aac40a96..1b0c553df 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -4,6 +4,10 @@ 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([#XXX]). + ## [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..ba91eb0ee 100644 --- a/crates/stackable-operator/src/commons/authentication/mod.rs +++ b/crates/stackable-operator/src/commons/authentication/mod.rs @@ -125,14 +125,16 @@ 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. - /// + /// 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 From 8b4c60e86a845cc254402e439b3aee4fba1e6050 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Thu, 22 Aug 2024 13:26:22 +0200 Subject: [PATCH 2/4] changelog --- crates/stackable-operator/CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 1b0c553df..64dbbfc0c 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -6,7 +6,9 @@ All notable changes to this project will be documented in this file. ### Fixed -- Fix the CRD description of `ClientAuthenticationDetails` to not contain internal Rust doc, but a public CRD description([#XXX]). +- 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 From ddeb8889f420ccbcb235630a8b994bb46edcbdca Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Thu, 22 Aug 2024 13:27:40 +0200 Subject: [PATCH 3/4] fix --- crates/stackable-operator/src/commons/authentication/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/stackable-operator/src/commons/authentication/mod.rs b/crates/stackable-operator/src/commons/authentication/mod.rs index ba91eb0ee..b4d87890e 100644 --- a/crates/stackable-operator/src/commons/authentication/mod.rs +++ b/crates/stackable-operator/src/commons/authentication/mod.rs @@ -135,7 +135,7 @@ pub struct ClientAuthenticationDetails { /// 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. + // 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). From 191adaee23cde069cec77267ca31043f7ac5c432 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Thu, 22 Aug 2024 13:28:29 +0200 Subject: [PATCH 4/4] fix --- crates/stackable-operator/src/commons/authentication/oidc.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, }