-
Notifications
You must be signed in to change notification settings - Fork 28
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
Check that IPA configuration has MS-PAC generation enabled #332
Conversation
Everything looks good to me. |
src/ipahealthcheck/ipa/trust.py
Outdated
def check(self): | ||
ipaconfig = api.Command.config_show(raw=True) | ||
krbauthzdata = ipaconfig['result'].get('ipakrbauthzdata', tuple()) | ||
for authzdata in ('MS-PAC', ): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you are going for here, making this more future-proof, but the rest of the method is not generic at all. I think we're ok simplifying this to simply check for MS-PAC and if we need to extend it later we can do that.
The way it is now has the side-effect of returning both ERROR and SUCCESS if MS-PAC is not enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun thing: I did the change you wanted (and added in the proposal below) but somehow forgot to amend the commit with that before opening the PR.
Here are my proposed changes plus a couple of simple tests
|
Thank you for the tests! I applied the proposed changes to the same commit. |
tests/test_ipa_trust.py
Outdated
|
||
m_api.Command.config_show.side_effect = [{ | ||
'result': { | ||
'ipakrbauthzdata': ['MS-PAC', 'nfs:NONE',] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running lint on my local machine wants a space after the trailing comma:
'ipakrbauthzdata': ['MS-PAC', 'nfs:NONE', ]
I don't know why the github CI didn't pick it up. Diff version of python perhaps.
tests/test_ipa_trust.py
Outdated
|
||
m_api.Command.config_show.side_effect = [{ | ||
'result': { | ||
'ipakrbauthzdata': ['nfs:NONE',] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, flake wants a space after the comma:
'ipakrbauthzdata': ['nfs:NONE', ]
Just one minor thing that CI didn't pick up on |
FreeIPA uses S4U extensions to operate on behalf of the user requesting IPA API access. S4U2Proxy extension requires presence of MS-PAC record in the Kerberos evidence ticket presented by the proxy service. This is mandatory since ~2023 to address Bronze bit CVE. Check that 'ipa config-show' output includes 'MS-PAC' in the list of values for ipakrbauthzdata attribute. Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com> Signed-off-by: Rob Crittenden <rcritten@redhat.com>
FreeIPA uses S4U extensions to operate on behalf of the user requesting IPA API access. S4U2Proxy extension requires presence of MS-PAC record in the Kerberos evidence ticket presented by the proxy service. This is mandatory since ~2023 to address Bronze bit CVE.
Check that 'ipa config-show' output includes 'MS-PAC' in the list of values for ipakrbauthzdata attribute.