private_key_jwt assetion tokens can have unbounded expiration which can fill data store #792
Closed
3 of 5 tasks
Labels
feat
New feature or request.
Preflight checklist
Ory Network Project
No response
Describe your problem
I noticed in current fosite implementation (unless I missed something) that there is no limitation on the maximum expiration time for private_key_jwt assertion tokens. They have to be stored in the database until they expire which means that this can potentially make storage requirements for them large.
Describe your ideal solution
In practice, those tokens should not have long expiration times. They should be generated anyway again and again. Auth0 for example forces 5 minutes maximum expiration time (example I found first online).
I suggest we introduce some maximum expiration time through config which allows one to extend it if somebody really wants a long expiration time. But the default should be something short, like 5 minutes to allow for clock skew and stuff.
Workarounds or alternatives
I cannot find any. We just have to store tokens until expiration.
Version
latest master
Additional Context
No response
The text was updated successfully, but these errors were encountered: