krb5: restart krb5_child for Smartcard authentication#8629
krb5: restart krb5_child for Smartcard authentication#8629alexey-tikhonov merged 1 commit intoSSSD:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a change to restart the krb5_child process during Smartcard authentication if a different certificate is selected by the user. The review feedback points out style inconsistencies in the new conditional block, specifically regarding indentation and the placement of logical operators, to maintain consistency with the rest of the codebase.
|
#8267 will need to cherry-pick this? |
Hi, yes, this is triggered by "krb5_child: advertise authentication methods". bye, |
|
I tested on Fedora 42 containers and I can confirm this fixes the Version: Results: |
justin-stephenson
left a comment
There was a problem hiding this comment.
Ack, thank you.
|
Note: Covscan is clean. |
In contrast to other authentication methods for PKINIT some information about the used Smartcard and certificate are already needed for the pre-authentication step to trigger the MIT Kerberos PKINIT module to get back the information if PKINIT is possible or not and if the Smartcard can be used for authentication. If krb5_child is kept running between the pre-authentication and the authentication step the information given during pre-authentication is used if Smartcard authentication was selected. As long as only a single certificate is available there is no issue. But if there are multiple certificates which all apply to the given mapping and matching rules for the user trying to log in and the user can choose a certificate for authentication the authentication might fail if the certificate use during pre-authentication and the one selected by the user differ. Before the change to keep krb5_child running for all authentication methods this was not an issue since the fresh instance started during the authentication step was using the certificate selected by the user. With this patch krb5_child is restart during the authentication step is Smartcard authentication was selected. Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com> Reviewed-by: Justin Stephenson <jstephen@redhat.com>
59f041b to
867c295
Compare
In contrast to other authentication methods for PKINIT some information about the used Smartcard and certificate are already needed for the pre-authentication step to trigger the MIT Kerberos PKINIT module to get back the information if PKINIT is possible or not and if the Smartcard can be used for authentication. If krb5_child is kept running between the pre-authentication and the authentication step the information given during pre-authentication is used if Smartcard authentication was selected.
As long as only a single certificate is available there is no issue. But if there are multiple certificates which all apply to the given mapping and matching rules for the user trying to log in and the user can choose a certificate for authentication the authentication might fail if the certificate use during pre-authentication and the one selected by the user differ. Before the change to keep krb5_child running for all authentication methods this was not an issue since the fresh instance started during the authentication step was using the certificate selected by the user.
With this patch krb5_child is restart during the authentication step is Smartcard authentication was selected.