-
-
Notifications
You must be signed in to change notification settings - Fork 4
fix: expand AD user name filter #737
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
base: main
Are you sure you want to change the base?
Conversation
fn build_user_info_fetcher_start_command() -> String { | ||
formatdoc! {" | ||
if [ -f {USER_INFO_FETCHER_KERBEROS_DIR}/krb5.conf ]; then | ||
export KERBEROS_REALM=$(grep -oP 'default_realm = \\K.*' {USER_INFO_FETCHER_KERBEROS_DIR}/krb5.conf) |
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.
If you just want to do a text search, you can do that from Rust (https://docs.rs/grep/latest/grep/ is ripgrep-as-a-library).
But there's no need to grep through krb5.conf at all, because libkrb5 provides the krb5_get_default_realm
function! We expose this as krb5::KrbContext::default_realm
.
However, krb5
is currently only available in secret-operator's repo.. we might want to split that out into a separate library entirely.
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. I def didn't want to parse the krb5.conf
file in code and we already use the grep
approach in other places in the SDP.
The krb5_get_default_realm
would be my preferred way too.
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.
Depends on stackabletech/krb5-rs#1 |
Description
Fixes #702
How I tested
ad-test
, a new AD user calledrazvan
in theSBLE.TEST
realm and addedrazvan
to thead-test
group.opa-operator
withmake run-dev
OPA cluster definition:
The (debug) logs of the user-info-fetcher container showed:
where the LDAP search filter was:
Definition of Done Checklist
Author
Reviewer
Acceptance
type/deprecation
label & add to the deprecation scheduletype/experimental
label & add to the experimental features tracker