From 376f45d4d66f5c8ebf5718b7d78ee7ca5ada2087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Natalie=20Klestrup=20R=C3=B6ijezon?= Date: Wed, 12 Feb 2025 10:10:27 +0100 Subject: [PATCH 1/2] Allow underscores in kerberos principal names Fixes #562 --- rust/operator-binary/src/crd.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rust/operator-binary/src/crd.rs b/rust/operator-binary/src/crd.rs index 21809316..067cf070 100644 --- a/rust/operator-binary/src/crd.rs +++ b/rust/operator-binary/src/crd.rs @@ -328,7 +328,7 @@ pub struct KerberosPrincipal(String); #[snafu(module)] pub enum InvalidKerberosPrincipal { #[snafu(display( - "principal contains illegal characters (allowed: alphanumeric, /, @, -, and .)" + "principal contains illegal characters (allowed: alphanumeric, /, @, -, _, and .)" ))] IllegalCharacter, @@ -342,7 +342,12 @@ impl TryFrom for KerberosPrincipal { if value.starts_with('-') { invalid_kerberos_principal::StartWithDashSnafu.fail() } else if value.contains(|chr: char| { - !chr.is_alphanumeric() && chr != '/' && chr != '@' && chr != '.' && chr != '-' + !chr.is_alphanumeric() + && chr != '/' + && chr != '@' + && chr != '.' + && chr != '-' + && chr != '_' }) { invalid_kerberos_principal::IllegalCharacterSnafu.fail() } else { From b5300d80239aa954c1e3b0e3292f43c6abb905b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Natalie=20Klestrup=20R=C3=B6ijezon?= Date: Wed, 12 Feb 2025 10:22:55 +0100 Subject: [PATCH 2/2] Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48bc752f..2a8d0251 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,11 +20,13 @@ All notable changes to this project will be documented in this file. - Helm chart: The tag of the tools image used for the secret migration job can be changed in the Helm values and defaults now to 1.0.0-stackable24.11.0 rather than being hard-coded to 1.0.0-stackable24.7.0 ([#536]). +- Underscores are now allowed in Kerberos principal names ([#563]). [#528]: https://github.com/stackabletech/secret-operator/pull/528 [#536]: https://github.com/stackabletech/secret-operator/pull/536 [#548]: https://github.com/stackabletech/secret-operator/pull/548 [#552]: https://github.com/stackabletech/secret-operator/pull/552 +[#563]: https://github.com/stackabletech/secret-operator/pull/563 ## [24.11.0] - 2024-11-18