mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-11 09:13:02 +03:00
Event Log: Token has expired #312
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sbdiun on GitHub.
Vaultwarden Support String
Your environment (Generated via diagnostics page)
Config (Generated via diagnostics page)
Show Running Config
Environment settings which are overridden: DOMAIN, TRASH_AUTO_DELETE_DAYS, SIGNUPS_ALLOWED, ORG_CREATION_USERS, YUBICO_CLIENT_ID, YUBICO_SECRET_KEY, SMTP_HOST, SMTP_PORT, SMTP_FROM, SMTP_FROM_NAME
Vaultwarden Build Version
1.32.5
Deployment method
Official Container Image
Custom deployment method
No response
Reverse Proxy
Server version: Apache/2.4.62 (AlmaLinux) Server built: Aug 3 2024 00:00:00
Host/Server Operating System
Linux
Operating System Version
AlmaLinux 9.5
Clients
Web Vault, Browser Extension, CLI, Desktop
Client Version
2024.10.0
Steps To Reproduce
I have activated the organization event log on the server.
On a second host, I access data in Vaultwarden via Bitwarden CLI (bw) in Ansible using the community.general.bitwarden module.
This was logged in 11 days ago and remains connected so that several Ansible roles can run simultaneously.
The status is always “unlocked”.
Since this morning, this error appears every time the server is accessed:
[2024-11-26 10:47:32.643][vaultwarden::auth][ERROR] Token has expired
[2024-11-26 10:47:32.643][auth][ERROR] Unauthorized Error: Invalid claim
[2024-11-26 10:47:32.643][vaultwarden::api::core::events::_][WARN] Request guard
Headersfailed: “Invalid claim”.and on the Ansible host “Event post failed”
Data access was still possible without any problems, but the events were then no longer recorded until I logged the user out and back in on the other host.
Expected Result
For me, either the log should always work as long as I have access, or access should be denied when the token has expired.
Actual Result
Data access is possible without restrictions
Event recording stops with error
Logs
Screenshots or Videos
No response
Additional Context
No response
@BlackDex commented on GitHub:
The client can refresh the auth token via a refresh token.
As mentioned in my previous comment, the clients can work offline without access to the internet since they have an offline copy of the data.
@BlackDex commented on GitHub:
To be fair, a token which can expire needs to be refreshed. The the Ansible module isn't doing that, it's a fault on that side.
The Bitwarden CLI can still provide vault items since it had a local copy and works offline.
Allowing an expired token to still send events is a security risk in my opinion.
@sbdiun commented on GitHub:
Thanks for the explanation.
I'll close the case then.
@sbdiun commented on GitHub:
Ok, then the client should be logged out and in from time to time, and thus always use a new, fresh token.