Skip to content

Commit

Permalink
Added AuthenticationClass provider static (#514)
Browse files Browse the repository at this point in the history
## Description

For #494
  • Loading branch information
sbernauer committed Dec 2, 2022
1 parent ac40fc2 commit 6629570
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Added

- Added `AuthenticationClass` provider static ([#514]).

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

## [0.27.1] - 2022-11-17

### Changed
Expand Down
17 changes: 17 additions & 0 deletions src/commons/authentication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@ pub struct AuthenticationClassSpec {
pub enum AuthenticationClassProvider {
Ldap(LdapAuthenticationProvider),
Tls(TlsAuthenticationProvider),
Static(StaticAuthenticationProvider),
}

#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct StaticAuthenticationProvider {
/// Secret providing the usernames and password.
/// The secret must contain an entry for every user, with the key being the username and the value the password in plain text.
/// It must be located in the same namespace as the product using it.
user_credentials_secret: UserCredentialsSecretRef,
}

#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct UserCredentialsSecretRef {
/// Name of the secret
name: String,
}

#[cfg(test)]
Expand Down

0 comments on commit 6629570

Please sign in to comment.