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
PAM: Also cache SSS_PAM_PREAUTH #804
Conversation
|
Hi Jakub, the patch is working as expected, I only added a minor comment to the code. While testing I came across two issues where I wonder if you would like to fix them with this patch as well. First, if a wrong password is given cached authentication currently does not fail but falls back to online authentication. I think this behavior make sense, but might be unexpected. A sentence in the man page describing this behavior would be useful imo. Second, there is no clear debug message from the PAM responder that cached authentication is used. Instead there is and later on there are some message from Both are not related to the issue at hand so feel free to open a new ticket or ignore them. bye, |
|
Thank you, I'll look at the System Error. I saw it in my testing, but I stopped after I realised this was not caused by my patches. I should have at least filed a ticket :-) About the fallback to online auth - I would actually not expect this myself. But at the same time, I also see no pressing reason to change this behaviour (if we agreed it should be changed),, so I agree making this clear in the man page is good enough for now. If our users or customers would be irritated by the behaviour, we can change it later. |
Related: https://pagure.io/SSSD/sssd/issue/3960 Even if cached_auth_timeout was set, the pam responder would still forward the preauthentication requests to the back end. This could trigger unwanted traffic towards the KDCs.
|
Thank you for the comments, here is the diff: |
|
On 5/3/19 1:24 PM, sumit-bose wrote:
Hi Jakub,
the patch is working as expected, I only added a minor comment to the
code.
While testing I came across two issues where I wonder if you would
like to fix them with this patch as well.
First, if a wrong password is given cached authentication currently
does not fail but falls back to online authentication. I think this
behavior make sense, but might be unexpected. A sentence in the man
page describing this behavior would be useful imo.
OK, added.
Second, there is no clear debug message from the PAM responder that
cached authentication is used. Instead there is
|(Fri May 3 13:05:11 2019) [sssd[pam]] [pam_reply] (0x0200): pam_reply
called with result [4]: Systemfehler. |
|I thought the message might be sometimes useful, so I only changed its
level to be lowest debug level and reworded the message to make it clear
that this is an intermediate result only.|
||
and later on there are some message from |sysdb_cache_auth()|. Maybe
in |pam_reply()| the |called with result| message can be skipped for
cached auth and a more suitable message can be shown?
Both are not related to the issue at hand so feel free to open a new
ticket or ignore them.
I also added PREAUTH to the list of PAM commands that just return
PAM_SUCCESS during cached authentication. I hope that's correct.
|
|
Hi, the patch works for me and the log messages are looking less irritating now. About:
That's fine, pam_sss ignores all error during pre-auth and falls back default behavior, but having PAM_SUCCESS here make things more clear. ACK bye, |
Related: https://pagure.io/SSSD/sssd/issue/3960
Even if cached_auth_timeout was set, the pam responder would still forward
the preauthentication requests to the back end. This could trigger unwanted
traffic towards the KDCs.