Skip to content

[autobackport: sssd-2-10] test_kcm: use config_apply instead of start to avoid proxy domain auth issue - #9171

Merged
jakub-vavra-cz merged 1 commit into
SSSD:sssd-2-10from
sssd-bot:SSSD-sssd-backport-pr9113-to-sssd-2-10
Aug 31, 2026
Merged

jakub-vavra-cz merged 1 commit into
SSSD:sssd-2-10from
sssd-bot:SSSD-sssd-backport-pr9113-to-sssd-2-10

Conversation

@sssd-bot

Copy link
Copy Markdown
Contributor

This is an automatic backport of PR#9113 test_kcm: use config_apply instead of start to avoid proxy domain auth issue to branch sssd-2-10, created by @mmatsuya.

Please make sure this backport is correct.

Note

The commits were cherry-picked without conflicts.

You can push changes to this pull request

git remote add sssd-bot git@github.com:sssd-bot/sssd.git
git fetch sssd-bot refs/heads/SSSD-sssd-backport-pr9113-to-sssd-2-10
git checkout SSSD-sssd-backport-pr9113-to-sssd-2-10
git push sssd-bot SSSD-sssd-backport-pr9113-to-sssd-2-10 --force

Original commits
3efabe8 - test_kcm: use config_apply instead of start to avoid proxy domain auth issue

Backported commits

  • eb8d332 - test_kcm: use config_apply instead of start to avoid proxy domain auth issue

Original Pull Request Body

Problem

test_kcm__ccache_holds_multiple_and_all_types_of_principals fails on RHEL 9.6
with SSHAuthenticationError when the client image ships with
passwd: sss files systemd in /etc/nsswitch.conf.

The root cause is that client.sssd.start() starts SSSD with a proxy+files
domain (id_provider=proxy, proxy_lib_name=files,
proxy_pam_target=system-auth). When sss appears before files in
nsswitch.conf, SSSD returns * in the password field for NSS lookups.
pam_unix sees * and treats the account as locked, causing SSH
authentication to fail.

Fix

Replace client.sssd.start() with client.sssd.config_apply() so that:

  • sssd.conf is written with the correct ccache_storage setting (preserving
    the memory/secdb parametrization)
  • sssd.service is not started → the proxy+files domain is never active
  • sssd-kcm starts on demand via systemd socket activation when kinit first
    connects to the KCM socket

This approach is consistent with the observation that KCM functionality does
not require the full SSSD daemon to be running.

Testing

Verified on RHEL 9.6 (sssd-2.9.4) with passwd: sss files systemd in
/etc/nsswitch.conf:

  • Before: test_kcm__ccache_holds_multiple_and_all_types_of_principals
    fails with SSHAuthenticationError for both memory and secdb
  • After: 2 passed (memory + secdb)

Closes: SSSD/sssd-test-framework#265

Suggested-by: Sumit Bose sbose@redhat.com

@jakub-vavra-cz jakub-vavra-cz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean backport. LGTM.

…h issue

SSSD is not needed for this test - sssd-kcm starts automatically via
socket activation when kinit is called. Starting sssd.service activates
the proxy+files domain, which causes pam_unix to see '*' in the password
field and refuse authentication for local users on systems where
/etc/nsswitch.conf has 'passwd: sss files' (default on RHEL 9.6+ images).

Use config_apply() to write sssd.conf (so ccache_storage is set) without
starting sssd.service, eliminating the pam_unix authentication failure.

Fixes: SSSD/sssd-test-framework#265
Signed-off-by: Masahiro Matsuya <mmatsuya@redhat.com>
Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
Reviewed-by: Jakub Vávra <jvavra@redhat.com>
(cherry picked from commit 3efabe8)
@sssd-bot

Copy link
Copy Markdown
Contributor Author

The pull request was accepted by @jakub-vavra-cz with the following PR CI status:


🟢 rpm-build:centos-stream-10-x86_64:upstream (success)
🟡 testing-farm:centos-stream-10-x86_64:upstream (in_progress)


There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging.

@sssd-bot
sssd-bot force-pushed the SSSD-sssd-backport-pr9113-to-sssd-2-10 branch from eb8d332 to ff036ce Compare August 31, 2026 10:02
@jakub-vavra-cz
jakub-vavra-cz merged commit 0191860 into SSSD:sssd-2-10 Aug 31, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants