Skip to content

[autobackport: sssd-2-9] pam: apply SIDs from PAC to authentication indicators#8618

Merged
alexey-tikhonov merged 3 commits intoSSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr8571-to-sssd-2-9
Apr 22, 2026
Merged

[autobackport: sssd-2-9] pam: apply SIDs from PAC to authentication indicators#8618
alexey-tikhonov merged 3 commits intoSSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr8571-to-sssd-2-9

Conversation

@sssd-bot
Copy link
Copy Markdown
Contributor

This is an automatic backport of PR#8571 pam: apply SIDs from PAC to authentication indicators to branch sssd-2-9, created by @sumit-bose.

Caution

@sumit-bose The patches did not apply cleanly. It is necessary to resolve conflicts before merging this pull request. Commits that introduced conflict are marked with CONFLICT!.

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-pr8571-to-sssd-2-9
git checkout SSSD-sssd-backport-pr8571-to-sssd-2-9
git push sssd-bot SSSD-sssd-backport-pr8571-to-sssd-2-9 --force

Original commits
3f9c415 - ad: move ad_get_sids_from_pac() to ad_pac_common.c
22de4fd - pam: add pam_gssapi_indicators_apply option
1f680ed - pam: apply SIDs from PAC to authentication indicators

Backported commits

  • deb0cf8 - ad: move ad_get_sids_from_pac() to ad_pac_common.c
  • 33dcd2c - CONFLICT! pam: add pam_gssapi_indicators_apply option
  • 1db8d6e - CONFLICT! pam: apply SIDs from PAC to authentication indicators

Conflicting Files Information (check for deleted and re-added files)

  • CONFLICT! pam: add pam_gssapi_indicators_apply option
On branch SSSD-sssd-backport-pr8571-to-sssd-2-9
You are currently cherry-picking commit 22de4fd2d.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   src/confdb/confdb.h
	modified:   src/config/SSSDConfig/sssdoptions.py
	modified:   src/config/SSSDConfigTest.py
	modified:   src/config/cfg_rules.ini
	modified:   src/config/etc/sssd.api.conf
	modified:   src/db/sysdb_subdomains.c
	modified:   src/responder/pam/pamsrv.h

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/man/sssd.conf.5.xml
	both modified:   src/responder/pam/pamsrv.c
```* CONFLICT! pam: apply SIDs from PAC to authentication indicators

On branch SSSD-sssd-backport-pr8571-to-sssd-2-9
You are currently cherry-picking commit 1f680ed.
(fix conflicts and run "git cherry-pick --continue")
(use "git cherry-pick --skip" to skip this patch)
(use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
modified: src/config/SSSDConfig/sssdoptions.py
modified: src/responder/pam/pamsrv_cmd.c
modified: src/responder/pam/pamsrv_gssapi.c

Unmerged paths:
(use "git add/rm ..." as appropriate to mark resolution)
both modified: Makefile.am
deleted by us: src/responder/pam/pamsrv_json.c
both modified: src/tests/system/tests/test_ipa.py


---

**Original Pull Request Body**

This patch reads the PAC of a Kerberos ticket while evaluating the
authentication indicators of the Kerberos ticket during a pam_sss_gss
request. Based on the value of the pam_gssapi_indicators_apply option
the found SIDs might add additional authentication indicators to the
evaluation.

The primary use case is to handle SIDs added by Active Directory's
Authentication Mechanism Assurance (AMA).

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the pam_gssapi_indicators_apply configuration option, allowing SIDs from the Kerberos PAC to be mapped to authentication indicators, and implements a new JSON-based authentication selection mechanism. While the feature set is comprehensive, the PR contains several critical issues: unresolved git conflict markers are present across multiple files (Makefile, documentation, and source code), which will break the build and tests. Furthermore, potential NULL pointer dereferences were identified in the list-processing logic within pamsrv_json.c and pamsrv_gssapi.c that must be addressed to prevent runtime crashes.

Comment thread Makefile.am Outdated
Comment thread src/man/sssd.conf.5.xml Outdated
Comment thread src/responder/pam/pamsrv.c Outdated
Comment thread src/tests/system/tests/test_ipa.py Outdated
Comment thread src/responder/pam/pamsrv_json.c Outdated
domain->gssapi_indicators_apply :
(pam_ctx->gssapi_indicators_apply ?
pam_ctx->gssapi_indicators_apply : NULL);
if (indicators_apply != NULL && *indicators_apply[0] != '\0') {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Potential NULL pointer dereference. If indicators_apply is an empty list, indicators_apply[0] will be NULL, and dereferencing it will cause a crash.

    if (indicators_apply != NULL && indicators_apply[0] != NULL && indicators_apply[0][0] != '\0') {

@sumit-bose sumit-bose force-pushed the SSSD-sssd-backport-pr8571-to-sssd-2-9 branch 3 times, most recently from fcd6f6a to b0daeed Compare April 20, 2026 19:42
@sumit-bose sumit-bose marked this pull request as ready for review April 21, 2026 06:58
@alexey-tikhonov
Copy link
Copy Markdown
Member

@sumit-bose, would you like to wait for #8620 and cherry-pick those patches here as well?

@sumit-bose
Copy link
Copy Markdown
Contributor

@sumit-bose, would you like to wait for #8620 and cherry-pick those patches here as well?

Hi,

I'm fine either way, but it might be easier to merge this and backport #8620 separately.

bye,
Sumit

@alexey-tikhonov
Copy link
Copy Markdown
Member

it might be easier to merge this and backport #8620 separately.

ok

@alexey-tikhonov alexey-tikhonov removed the request for review from thalman April 22, 2026 08:03
@alexey-tikhonov alexey-tikhonov added no-backport This should go to target branch only. Accepted labels Apr 22, 2026
To make ad_get_sids_from_pac() better reusable it is moved with its
dependencies into ad_pac_common.c

Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Tomáš Halman <thalman@redhat.com>
(cherry picked from commit 3f9c415)
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Tomáš Halman <thalman@redhat.com>
(cherry picked from commit 22de4fd)
This patch reads the PAC of a Kerberos ticket while evaluating the
authentication indicators of the Kerberos ticket during a pam_sss_gss
request. Based on the value of the pam_gssapi_indicators_apply option
the found SIDs might add additional authentication indicators to the
evaluation.

The primary use case is to handle SIDs added by Active Directory's
Authentication Mechanism Assurance (AMA).

:relnote: During the processing of the pam_sss_gss request SSSD will
read the SID from the PAC of the Kerberos ticket and might add
authentication indicators based on the value of the new option
pam_gssapi_indicators_apply. The primary use case is to handle SIDs
added by Active Directory's Authentication Mechanism Assurance (AMA).

Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Tomáš Halman <thalman@redhat.com>
(cherry picked from commit 1f680ed)
@sssd-bot
Copy link
Copy Markdown
Contributor Author

The pull request was accepted by @alexey-tikhonov with the following PR CI status:


🟢 CodeQL (success)
🟢 rpm-build:centos-stream-9-x86_64:upstream (success)
🟢 Build / make-distcheck (success)
🟢 ci / prepare (success)
🟢 ci / system (centos-9) (success)
🟢 Static code analysis / codeql (success)
🟢 Static code analysis / pre-commit (success)
🟢 Static code analysis / python-system-tests (success)


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-pr8571-to-sssd-2-9 branch from b0daeed to 9308256 Compare April 22, 2026 08:04
@alexey-tikhonov alexey-tikhonov merged commit dc75971 into SSSD:sssd-2-9 Apr 22, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accepted no-backport This should go to target branch only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants