Skip to content

Commit

Permalink
Merge branch 'main' into test/crd-versioning-snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
Techassi authored Sep 30, 2024
2 parents 18068e8 + 8b0172d commit a61a48d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions crates/stackable-operator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [0.78.0] - 2024-09-30

### Added

- Add Kerberos AuthenticationProvider ([#880]).

[#880]: https://github.com/stackabletech/operator-rs/pull/880

## [0.77.1] - 2024-09-27

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion crates/stackable-operator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "stackable-operator"
description = "Stackable Operator Framework"
version = "0.77.1"
version = "0.78.0"
authors.workspace = true
license.workspace = true
edition.workspace = true
Expand Down
11 changes: 11 additions & 0 deletions crates/stackable-operator/src/commons/authentication/kerberos.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

#[derive(
Clone, Debug, Deserialize, Eq, Hash, JsonSchema, Ord, PartialEq, PartialOrd, Serialize,
)]
#[serde(rename_all = "camelCase")]
pub struct AuthenticationProvider {
/// Mandatory SecretClass used to obtain keytabs.
pub kerberos_secret_class: String,
}
14 changes: 13 additions & 1 deletion crates/stackable-operator/src/commons/authentication/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use strum::Display;

use crate::client::Client;

pub mod kerberos;
pub mod ldap;
pub mod oidc;
pub mod static_;
Expand Down Expand Up @@ -77,6 +78,10 @@ pub enum AuthenticationClassProvider {
/// The [TLS provider](DOCS_BASE_URL_PLACEHOLDER/concepts/authentication#_tls).
/// The TLS AuthenticationClass is used when users should authenticate themselves with a TLS certificate.
Tls(tls::AuthenticationProvider),

/// The [Kerberos provider](DOCS_BASE_URL_PLACEHOLDER/concepts/authentication#_kerberos).
/// The Kerberos AuthenticationClass is used when users should authenticate themselves via Kerberos.
Kerberos(kerberos::AuthenticationProvider),
}

impl AuthenticationClass {
Expand Down Expand Up @@ -183,6 +188,13 @@ mod tests {
let tls_provider = AuthenticationClassProvider::Tls(AuthenticationProvider {
client_cert_secret_class: None,
});
assert_eq!("Tls", tls_provider.to_string())
assert_eq!("Tls", tls_provider.to_string());

let kerberos_provider = AuthenticationClassProvider::Kerberos(
crate::commons::authentication::kerberos::AuthenticationProvider {
kerberos_secret_class: "kerberos".to_string(),
},
);
assert_eq!("Kerberos", kerberos_provider.to_string());
}
}

0 comments on commit a61a48d

Please sign in to comment.