Skip to content
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

Add detection of wrong SIDs in accounts after 'ipa migrate-ds' #242

Open
abbra opened this issue Jan 17, 2022 · 2 comments
Open

Add detection of wrong SIDs in accounts after 'ipa migrate-ds' #242

abbra opened this issue Jan 17, 2022 · 2 comments

Comments

@abbra
Copy link
Contributor

abbra commented Jan 17, 2022

With hardening against CVE-2020-25717, FreeIPA KDC now performs a number of checks for SIDs of user accounts. Namely:

  • domain SID of a user account SID must correspond to the IPA domain SID
  • ticket requested using cross-realm TGT will have to have either SID from IPA domain or from any domain we have trust with

On freeipa-users@ there it was already reported that if users were migrated from an old installation with the help of ipa migrate-ds, they would have SIDs generated in the older IPA deployment and thus would be different to the SID in the current IPA setup. Reference: https://lists.fedorahosted.org/archives/list/[email protected]/thread/4S4QQDC4FBVTA4GYWWVBPKGYN3MF4UJ6/

Add a check for that.

It is possible to fix this issue by removing SID attribute and an object class that requires it and then calling ipa config-mod --add-sids --enable-sids to regenerate missing SIDs. Since old SIDs are invalid in the new environment and IPA does not have SID history, they can be removed unless SIDs were used on Windows side to assign permissions. We don't generally support that yet without Global Catalog feature, though.

@rcritten
Copy link
Collaborator

So I guess a query for SIDs that don't match the domain SID would be the best way to find errant entries. How can I determine the domain SID for the IPA install?

@abbra
Copy link
Contributor Author

abbra commented Jan 17, 2022

You can retrieve local domain SID in trustconfig_show:

>>> api.Command.trustconfig_show()
{'result': {'ipantfallbackprimarygroup': ('Default SMB Group',), 'ipantsecurityidentifier': ('S-1-5-21-some-id-value',), 'ipantflatname': ('EXAMPLE',), 'ipantdomainguid': ('1234567-b448-48cb-9cba-1267878536bb',), 'cn': ('example.test',), 'ad_trust_agent_server': ('dc.example.test',), 'ad_trust_controller_server': ('dc.example.test',), 'dn': 'cn=example.test,cn=ad,cn=etc,dc=example,dc=test'}, 'value': 'ad', 'summary': None}
>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants