BW Client silently continues with expired auth (SSO) #6927
Replies: 1 comment 4 replies
-
|
Per https://www.rfc-editor.org/rfc/rfc6749#section-4.1.4 The access_token response provides an expires_in time. The OAuth2 client then needs to either use the refresh token (which issues a new access_token, with a new expiry), or the refresh fails and the token is no longer valid. So if you are seeing that vaultwarden sessions are "detached" from the access_token expiry, I think it becomes a vault warden bug, not a Kanidm one. The session in vaultwarden should be limited by both the access_token expiry, but also the refresh token validity and if it can refresh. The offline_access scope is needed for something else - offline_access specifically in Kanidm is related to how sessions work. That when you login you get a user-auth-token (UAT) and that UAT is the parent session of all OAuth2 sessions you initiate. When your UAT expires, so do all OAuth2 tokens (access and refresh). offline_access detaches these concepts, where the UAT that issues that OAuth2 session does not bound the lifetime of the OAuth2 session in question. For the vaultwarden case, it's likely you actually want the session to be bound, since then single logout is possible by logging out in Kanidm which causes the access-tokens in vaultwarden to become invalid at that moment. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
since I started using the Bitwarden desktop and mobile apps, I noticed an issue where I will remain logged in and can unlock my vault with the master password but synchronization/saving will always fail. This is only fixed by manually logging out and back in but after a small period of inactivity, the issue will come back. It is my assumption is that the authentication expires but the Bitwarden client for some reason doesn't act on it.
As a user of Kanidm, I don't yet have access to the
offline_accessscope. kanidm/kanidm#4034The Wiki currently documents Kanidm as necessitating no special configuration.
Looking at the docs for other OIDC providers and skimming #6311 leads me to believe that I should set
SSO_AUTH_ONLY_NOT_SESSIONtotrue. (Let's see if that fixes my issues; ping me so I remember to report back)Since the Kanidm devs generally like to keep a tight grip on session lifecycle and token validity, I'll cross post over there as my understanding of this setting is that it reduces the SSO provider to the initial authentication step whereas later authentication is handled between VW and the client without involvement of the IDM.
In the mean time I'd suggest adjusting the Kanidm wiki section to include
SSO_AUTH_ONLY_NOT_SESSION: true.Best,
Gab
Beta Was this translation helpful? Give feedback.
All reactions