-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow underscores in kerberos principal names #563
Conversation
Tested against krb5 by applying this: diff --git a/tests/templates/kuttl/kerberos/01-install-kdc.yaml.j2 b/tests/templates/kuttl/kerberos/01-install-kdc.yaml.j2
index ade1705..51e0d64 100644
--- a/tests/templates/kuttl/kerberos/01-install-kdc.yaml.j2
+++ b/tests/templates/kuttl/kerberos/01-install-kdc.yaml.j2
@@ -33,7 +33,7 @@ spec:
test -e /var/kerberos/krb5kdc/principal || kdb5_util create -s -P asdf
kadmin.local get_principal -terse root/admin || kadmin.local add_principal -pw asdf root/admin
# stackable-secret-operator principal must match the keytab specified in the SecretClass
- kadmin.local get_principal -terse stackable-secret-operator || kadmin.local add_principal -e aes256-cts-hmac-sha384-192:normal -pw asdf stackable-secret-operator
+ kadmin.local get_principal -terse stackable-secret_operator || kadmin.local add_principal -e aes256-cts-hmac-sha384-192:normal -pw asdf stackable-secret_operator
env:
- name: KRB5_CONFIG
value: /stackable/config/krb5.conf
@@ -143,11 +143,11 @@ data:
cluster.local = CLUSTER.LOCAL
kadm5.acl: |
root/admin *e
- stackable-secret-operator *e
+ stackable-secret_operator *e
---
apiVersion: v1
kind: Secret
metadata:
name: secret-operator-keytab
data:
- keytab: BQIAAABdAAEADUNMVVNURVIuTE9DQUwAGXN0YWNrYWJsZS1zZWNyZXQtb3BlcmF0b3IAAAABZAYWIgEAFAAgm8MCZ8B//XF1tH92GciD6/usWUNAmBTZnZQxLua2TkgAAAAB
+ keytab: BQIAAABdAAEADUNMVVNURVIuTE9DQUwAGXN0YWNrYWJsZS1zZWNyZXRfb3BlcmF0b3IAAAABZ6xjwgEAFAAgz8mI9b8YpFWDN8PWHkuVeX5GZq/wVu5KDSvxh7v9Bw8AAAAB
diff --git a/tests/templates/kuttl/kerberos/secretclass.yaml b/tests/templates/kuttl/kerberos/secretclass.yaml
index 33a003f..f508177 100644
--- a/tests/templates/kuttl/kerberos/secretclass.yaml
+++ b/tests/templates/kuttl/kerberos/secretclass.yaml
@@ -15,4 +15,4 @@ spec:
adminKeytabSecret:
name: secret-operator-keytab
namespace: $NAMESPACE
- adminPrincipal: stackable-secret-operator
+ adminPrincipal: stackable-secret_operator Tested against AD by applying this to https://github.com/stackabletech/ad-init: diff --git a/roles/ad-dc/tasks/main.yaml b/roles/ad-dc/tasks/main.yaml
index fdde98d..ff04912 100644
--- a/roles/ad-dc/tasks/main.yaml
+++ b/roles/ad-dc/tasks/main.yaml
@@ -16,7 +16,7 @@
- name: Name Secret-Operator User
set_fact:
- secret_operator_principal: stackable-secret-operator@{{ ansible_facts.domain | upper }}
+ secret_operator_principal: stackable_secret_operator@{{ ansible_facts.domain | upper }}
- name: Create Secret-Operator User
microsoft.ad.user:
name: stackable-secret-operator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome and quick work!
Can you please add a changelog entry?
Right, knew there was something I forgot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
good old changelog conflicts 🙃 |
Yuuuhp |
Description
Fixes #562
Definition of Done Checklist
Author
Reviewer
Acceptance