pam/main-exec: Don't set timeout for D-Bus connection#1448
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1448 +/- ##
==========================================
+ Coverage 87.05% 87.06% +0.01%
==========================================
Files 93 93
Lines 6367 6365 -2
Branches 111 111
==========================================
- Hits 5543 5542 -1
+ Misses 768 767 -1
Partials 56 56 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Maybe we can override the default with an env variable for tests? |
I don't see this is as a test only problem (I should probably make that clear in the commit message as well). I can also see how users performing device auth with MFA could easily take longer than 2 minutes to complete the login. I was wondering why we have this timeout in the first place. It was added by commit aa48751 which says "so that in case of problems we don't hang indefinitely". Should it maybe be the caller's responsibility to cancel the operation when it thinks it's taking too long - similar to the behavior of |
|
Oh wait, this was meant to be the timeout to init the connection. If it's not, then we should definely not have a timeout at all that controls how long the user can stay logging (or maybe just follow the system settings as said). The point here was to wait few seconds before we had a connection with the bus only. |
We've seen cases in e2e-tests where device auth took longer than 2 minutes to complete. When it finally succeeds, the login fails because the subsequent SetData(authenticationBrokerIDKey, ...) call fails: failed to call com.ubuntu.authd.pam.SetData: dbus: connection closed by user LOGIN: exiting with error System error: dbus: connection closed by user We don't to enforce a timeout for the login procedure here. If there should be a timeout, it should be the caller who enforces it - similar to the behavior of `login`which is configured via LOGIN_TIMEOUT in /etc/login.defs.
68be732 to
cab60c2
Compare
I removed it |
We've seen cases in e2e-tests where device auth took longer than 2 minutes to complete. When it finally succeeds, the login fails because the subsequent SetData(authenticationBrokerIDKey, ...) call fails:
We don't to enforce a timeout for the login procedure here. If there should be a timeout, it should be the caller who enforces it - similar to the behavior of
loginwhich is configured via LOGIN_TIMEOUT in /etc/login.defs.Closes #1431
UDENG-9792