0
Webhook "ephemeral" auth tokens are permanent tokens without expiry
Source: nextcloud/server#67559 · opened by @susnux
Description
webhook_listeners creates per-call auth tokens for webhook payloads with IToken::PERMANENT_TOKEN:
These tokens only go away when the WebhookTokenCleanup background job deletes them. If cron stops running, the job fails (as in #64682) or the app is disabled, these full-access tokens stay valid indefinitely.
_Found by code reading._
Proposal
As defence in depth, give the tokens their own expiry (e.g. a token type or check that rejects them after their intended lifetime at login), so they are invalid even when the cleanup doesn't run.
webhook_listeners creates per-call auth tokens for webhook payloads with IToken::PERMANENT_TOKEN:
These tokens only go away when the WebhookTokenCleanup background job deletes them. If cron stops running, the job fails (as in #64682) or the app is disabled, these full-access tokens stay valid indefinitely.
_Found by code reading._
Proposal
As defence in depth, give the tokens their own expiry (e.g. a token type or check that rejects them after their intended lifetime at login), so they are invalid even when the cleanup doesn't run.
No pledges yet. Be the first to back this.
Comments
Similar requests
Make oauth2 tokens expiration time configurable
0 votes · 0 comments
Support "nested" app tokens
1 vote · 0 comments
[Meta]: Scoped app passwords: limit a token to selected apps
3 votes · 0 comments
Add audit logging for authentication tokens
1 vote · 0 comments
[Auth Flow] Restricted app tokens while logging in
0 votes · 0 comments
No comments yet.