Skip to content

Conversation

@justin-stephenson
Copy link
Contributor

@justin-stephenson justin-stephenson commented Apr 11, 2025

Add support for ID override templates for Trusted AD/IPA users.

Testing this PR can be done with https://copr.fedorainfracloud.org/coprs/abbra/wip-ipa-trust/ which contains FreeIPA ID override templates code, and SSSD build with these code changes.

=====================

Add functionality for SSSD to apply domain templates and global templates as fallback override values to trusted IDM and AD users.

Templates are only assigned loginShell and/or homeDirectory attribute values. On the FreeIPA server, templates are added to ID views (Default trust view, or other) and will be used as fallback in ID override lookups. ID override templates can be set for user home directory(SSSD ‘override_homedir’ template syntax), or default login shell.

Two types of templates will exist, domain templates and global templates. Allow specifying a template entry for trusted domain users.

--template <domain> – specify per-domain templates that apply to all users in the trusted domain <domain>
--global-template – specify a global template that applies to any authenticated user from a trusted domain

=====================

Domain template can be added with:

# ipa idoverrideuser-add 'example_for_c1' '*' --template ipa2demo.test --homedir /home/%d/%u-DOMAIN --shell /bin/ksh

Global template can be added with:

# ipa idoverrideuser-add 'example_for_c1' '*' --global-template --homedir /home/%d/%u-GLOBAL --shell /bin/csh

@alexey-tikhonov
Copy link
Member

Is it kind of "addition" to IPA-IPA trust support, and thus should go to sssd-2-9 as well?

@justin-stephenson
Copy link
Contributor Author

Is it kind of "addition" to IPA-IPA trust support, and thus should go to sssd-2-9 as well?

Yes, I added the label.

@justin-stephenson justin-stephenson force-pushed the id_override_templates_v4 branch 2 times, most recently from 85945ee to c719017 Compare April 11, 2025 15:25
@alexey-tikhonov
Copy link
Member

Hi @justin-stephenson,
could you please expand commit messages and maybe add a release note?

@justin-stephenson justin-stephenson force-pushed the id_override_templates_v4 branch from c719017 to a60320b Compare April 14, 2025 18:04
@justin-stephenson
Copy link
Contributor Author

Hi @justin-stephenson, could you please expand commit messages and maybe add a release note?

Updated.

Copy link
Contributor

@aplopez aplopez left a comment

Choose a reason for hiding this comment

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

Haven't finished yet, but I already have two comments that I can share.

@justin-stephenson justin-stephenson force-pushed the id_override_templates_v4 branch 2 times, most recently from b8dc7d1 to 2c001ce Compare May 13, 2025 15:41
Copy link
Contributor

@aplopez aplopez left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@alexey-tikhonov alexey-tikhonov added Waiting for review coverity Trigger a coverity scan Accepted and removed coverity Trigger a coverity scan Waiting for review labels Jul 25, 2025
@sumit-bose
Copy link
Contributor

Hi,

I'm still fine with the current state, CI failures do not seem related.

bye,
Sumit

@alexey-tikhonov alexey-tikhonov added coverity Trigger a coverity scan and removed coverity Trigger a coverity scan labels Jul 29, 2025
@justin-stephenson justin-stephenson force-pushed the id_override_templates_v4 branch from 25fdd71 to a6501f4 Compare July 29, 2025 16:58
Retrieve ID override templates on subdomain
initialization. When overrides are checked
during IPA lookups, check for fallback template
values.

:relnote: SSSD now checks for existence of ID override templates
          in an IPA provider configuration. ID override templates
          supports overriding loginShell and homeDirectory values
          for trusted AD, or upcoming IPA-IPA trusted users. This
          behavior is enabled by default.
@justin-stephenson justin-stephenson force-pushed the id_override_templates_v4 branch from a6501f4 to 520081c Compare July 29, 2025 17:20
@alexey-tikhonov alexey-tikhonov added coverity Trigger a coverity scan and removed Changes requested coverity Trigger a coverity scan labels Jul 29, 2025
@alexey-tikhonov
Copy link
Member

Note: Covscan is green.

@alexey-tikhonov
Copy link
Member

All failed system tests are due to 'pylibsshext.errors.LibsshChannelException: Failed to open_session: [-2]'

@alexey-tikhonov alexey-tikhonov added the Ready to push Ready to push label Jul 30, 2025
@alexey-tikhonov
Copy link
Member

Pushed PR: #7924

  • master
    • 753c76f - IPA: Support ID override templates
    • f1768ba - SYSDB: Support ID override templates
    • e7a3cac - CONFDB: Store domain ID override templates
    • 6c29c14 - UTIL: Add string_ends_with utility function
  • sssd-2-9
    • bbe9200 - IPA: Support ID override templates
    • 17c10b9 - SYSDB: Support ID override templates
    • deafbfc - CONFDB: Store domain ID override templates
    • 480772b - UTIL: Add string_ends_with utility function

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.

5 participants