Skip to content

Commit 6629570

Browse files
committed
Added AuthenticationClass provider static (#514)
## Description For #494
1 parent ac40fc2 commit 6629570

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
### Added
8+
9+
- Added `AuthenticationClass` provider static ([#514]).
10+
11+
[#514]: https://github.com/stackabletech/operator-rs/pull/514
12+
713
## [0.27.1] - 2022-11-17
814

915
### Changed

src/commons/authentication.rs

+17
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,23 @@ pub struct AuthenticationClassSpec {
3232
pub enum AuthenticationClassProvider {
3333
Ldap(LdapAuthenticationProvider),
3434
Tls(TlsAuthenticationProvider),
35+
Static(StaticAuthenticationProvider),
36+
}
37+
38+
#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]
39+
#[serde(rename_all = "camelCase")]
40+
pub struct StaticAuthenticationProvider {
41+
/// Secret providing the usernames and password.
42+
/// The secret must contain an entry for every user, with the key being the username and the value the password in plain text.
43+
/// It must be located in the same namespace as the product using it.
44+
user_credentials_secret: UserCredentialsSecretRef,
45+
}
46+
47+
#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]
48+
#[serde(rename_all = "camelCase")]
49+
pub struct UserCredentialsSecretRef {
50+
/// Name of the secret
51+
name: String,
3552
}
3653

3754
#[cfg(test)]

0 commit comments

Comments
 (0)