cfg_rules: add pwfield to allowed_domain_options - #9034
Conversation
|
Out of curiosity:
-- this should be a default: |
|
In general, this is correct fix, but I think we also need to update the man page, that currently mentions this option only in "NSS configuration options" section. |
The auto-set of pwfield=x only applies when proxy_pam_target=sssd-shadowutils (since ffb9ad1). In this test case covered by sssd-test-framework#265, local() uses proxy_pam_target=system-auth (standard PAM stack, not sssd-shadowutils). With that target, SSSD proxy returns * for the password field instead of x. pam_unix then treats the account as locked, causing SSH authentication to fail for local users. Setting pwfield=x explicitly in the domain section bypasses this and restores the correct behavior. This is the scenario the fix is intended to cover. NOTE: I am going to reopen sssd-test-framework#265 after this PR was merged. |
I will update the man page as well. |
c9032dc to
9bb447f
Compare
|
Hi @alexey-tikhonov, I updated part of the existing pwfield (string) in man page. |
The pwfield option was made configurable per-domain in commit c778c36 (CONFDB: Make pwfield configurable per-domain), but cfg_rules.ini was not updated at the same time. As a result, sssctl config-check rejects pwfield when it appears in a [domain/*] section with: [rule/allowed_domain_options]: Attribute 'pwfield' is not allowed in section 'domain/local'. Check for typos. Add pwfield to [rule/allowed_domain_options] to match the documented and implemented behavior. Resolves: SSSD#5129 Signed-off-by: Masahiro Matsuya <mmatsuya@redhat.com> Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
pwfield has been configurable per-domain since commit c778c36 (2016), but the man page only had a brief note about it. Expand the existing NSS section entry to describe the per-domain use case: proxy+files with proxy_pam_target other than sssd-shadowutils, where SSSD returns '*' causing pam_unix to lock all accounts. Signed-off-by: Masahiro Matsuya <mmatsuya@redhat.com> Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
9bb447f to
cb0f8f6
Compare
Problem
pwfieldwas made configurable per-domain in commit c778c36(CONFDB: Make pwfield configurable per-domain, 2016), but
cfg_rules.iniwas never updated. As a result,sssctl config-checkrejects
pwfieldin any[domain/*]section:This surfaces in practice when a test or deployment sets
pwfield=xin a proxy domain with
proxy_lib_name=filesto work around the*-vs-xissue documented in #5129. Even though SSSD reads andrespects the value at runtime (via
confdb.c), the config validatorincorrectly rejects it.
Fix
Add
pwfieldto[rule/allowed_domain_options]incfg_rules.ini,placing it alongside the other NSS override options (
filter_users,filter_groups).Testing
Verified that
sssctl config-checkno longer reports an error fora
[domain/local]section containingpwfield=x.Resolves: #5129