Skip to content

Commit bb71e0f

Browse files
committed
Naming feedback from review
1 parent 348e092 commit bb71e0f

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
### Fixed
2020

2121
- Invalid `SupersetCluster`, `DruidConnection` or `AuthenticationClass` objects don't stop the operator from reconciling ([#551]).
22-
- Fix OIDC endpoint calculation in case the `rootPath` does have a trailing slash ([#569]).
22+
- Fix OIDC endpoint construction in case the `rootPath` does have a trailing slash ([#569]).
2323

2424
[#528]: https://github.com/stackabletech/superset-operator/pull/528
2525
[#530]: https://github.com/stackabletech/superset-operator/pull/530

rust/crd/src/authentication.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ pub enum SupersetAuthenticationClassResolved {
141141
},
142142
Oidc {
143143
provider: oidc::AuthenticationProvider,
144-
oidc: oidc::ClientAuthenticationOptions<()>,
144+
client_auth_options: oidc::ClientAuthenticationOptions<()>,
145145
},
146146
}
147147

@@ -310,7 +310,7 @@ impl SupersetClientAuthenticationDetailsResolved {
310310

311311
Ok(SupersetAuthenticationClassResolved::Oidc {
312312
provider: provider.to_owned(),
313-
oidc: auth_details
313+
client_auth_options: auth_details
314314
.common
315315
.oidc_or_error(auth_class_name)
316316
.context(OidcConfigurationInvalidSnafu)?
@@ -465,7 +465,7 @@ mod tests {
465465
vec!["openid".into(), "email".into(), "profile".into()],
466466
Some(IdentityProviderHint::Keycloak)
467467
),
468-
oidc: oidc::ClientAuthenticationOptions {
468+
client_auth_options: oidc::ClientAuthenticationOptions {
469469
client_credentials_secret_ref: "superset-oidc-client1".into(),
470470
extra_scopes: vec!["groups".into()],
471471
product_specific_fields: ()
@@ -481,7 +481,7 @@ mod tests {
481481
vec!["openid".into(), "email".into(), "profile".into()],
482482
None
483483
),
484-
oidc: oidc::ClientAuthenticationOptions {
484+
client_auth_options: oidc::ClientAuthenticationOptions {
485485
client_credentials_secret_ref: "superset-oidc-client2".into(),
486486
extra_scopes: Vec::new(),
487487
product_specific_fields: ()

rust/operator-binary/src/config.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ pub enum Error {
2222
source: stackable_operator::commons::authentication::oidc::Error,
2323
},
2424

25-
#[snafu(display("invalid OIDC well known URL"))]
26-
InvalidOidcWellKnownUrl {
25+
#[snafu(display("invalid well-known OIDC configuration URL"))]
26+
InvalidWellKnownConfigUrl {
2727
source: stackable_operator::commons::authentication::oidc::Error,
2828
},
2929
}
@@ -89,7 +89,11 @@ fn append_authentication_config(
8989
.authentication_classes_resolved
9090
.iter()
9191
.filter_map(|auth_class| {
92-
if let SupersetAuthenticationClassResolved::Oidc { provider, oidc } = auth_class {
92+
if let SupersetAuthenticationClassResolved::Oidc {
93+
provider,
94+
client_auth_options: oidc,
95+
} = auth_class
96+
{
9397
Some((provider, oidc))
9498
} else {
9599
None
@@ -229,7 +233,7 @@ fn append_oidc_config(
229233
api_base_url.push_str("/protocol/");
230234
let known_config_url = oidc
231235
.well_known_config_url()
232-
.context(InvalidOidcWellKnownUrlSnafu)?;
236+
.context(InvalidWellKnownConfigUrlSnafu)?;
233237
formatdoc!(
234238
"
235239
{{ 'name': 'keycloak',

rust/operator-binary/src/superset_controller.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ fn authentication_env_vars(
991991
for auth_class_resolved in &auth_config.authentication_classes_resolved {
992992
match auth_class_resolved {
993993
SupersetAuthenticationClassResolved::Ldap { .. } => {}
994-
SupersetAuthenticationClassResolved::Oidc { oidc, .. } => {
994+
SupersetAuthenticationClassResolved::Oidc { client_auth_options: oidc, .. } => {
995995
oidc_client_credentials_secrets
996996
.insert(oidc.client_credentials_secret_ref.to_owned());
997997
}

0 commit comments

Comments
 (0)