-
Notifications
You must be signed in to change notification settings - Fork 256
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 for protected authentication path #7038
Conversation
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.
Hi,
thank for the update, patches are working fine for me, ACK. But please squash the three patches into one before it will be committed.
For others who would like to test. With this patch the user will still be prompted for a PIN at the long prompt but at least when p11_child
is doing the authentication this PIN is ignored if the reader has its own keypad. In my case the reader is indicating that a PIN input is expected, so the PIN has to be entered a second time on the keypad of the reader. Please note, I had to set enable_pinpad = true;
in /etc/opensc-x86_64.conf
in the app default
reader_driver pcsc
section, see man opensc.conf
for details.
So, this is just the first step to fully integrated readers with keypads. Next would be to check for CKF_PROTECTED_AUTHENTICATION_PATH
in the --pre
run as well and return to the user that the PIN should be entered at the reader. Would you be interested to continue the work on this?
bye,
Sumit
Hi, I'm a beginner at this, and I don't know how to squash commits. Could you please provide instructions? I'd be happy to continue with the work on p11_child. Regards, |
Hi, if you call
If you now replace
Great. As already mentioned, it will not only touch the bye,
|
Hi, hopefully I got the squashing correct. Please give me some details on the things that need to be changed, so I can estimated the amount of work required. Regards, |
if (token_info.flags & CKF_PROTECTED_AUTHENTICATION_PATH) { | ||
DEBUG(SSSDBG_TRACE_ALL, "Protected authentication path.\n"); | ||
|
||
rv = module->C_Login(session, CKU_USER, NULL, |
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.
Would it be possible to just set pin=NULL/len=0 instead of copy&pasting entire block?
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 tried that, but it didn't work for me.
Also the specification PKCS11 says "To log into a token with a protected authentication path, the pPin parameter to C_Login should be NULL_PTR."
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 tried that, but it didn't work for me.
What exactly did you try?
Also the specification PKCS11 says "To log into a token with a protected authentication path, the pPin parameter to C_Login should be NULL_PTR."
But I don't propose anything different.
Just something like (schematically):
if (token_info.flags & CKF_PROTECTED_AUTHENTICATION_PATH) {
DEBUG(SSSDBG_TRACE_ALL, "Protected authentication path, ignoring pin.\n");
pin = NULL;
}
...
module->C_Login(session, CKU_USER, discard_const(pin), pin?strlen(pin):0);
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 tried that, but it didn't work for me.
What exactly did you try?
I tried setting pin = NULL and calling C_Login similar to your example.
I could not get it to work, hence the copy and paste.
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.
Could you show the patch that didn't work?
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 agree, it should work, but I failed.
Feel free to change the code to your liking.
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 don't have a device to test.
Can you check if #7064 still works for you?
copr builds are available here: https://copr.fedorainfracloud.org/coprs/g/sssd/pr7064/
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 have tried it and it works for me. Great!
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.
Ok, thanks for testing, then please either cherry-pick my additional patch or let's continue in #7064
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.
Let's continue in #7064
Superseded by #7064 |
This is a pull request for issue #7011
It checks if the flag CKF_PROTECTED_AUTHENTICATION_PATH is present,
and does C_Login with NULL if it is present, ignoring any pin passed from the user.