AbandonTech / abandonauth

An Authentic Auth Service...
GNU General Public License v3.0
4 stars 2 forks source link

Short lived and one-time-use tokens for authentication endpoints #12

Open fisher60 opened 1 year ago

fisher60 commented 1 year ago

Summary

When a service attempts to login with abandonauth, they are given a temporary token that is used to identify them on the respective service. This token is currently a regular JWT with a relatively long lifetime, it can also be used multiple times to authenticate a single user. This is a security vulnerability. The token should be as short lived as possible and also only be valid for a single use.

Acceptance Criteria

fisher60 commented 1 year ago

addressed in #13

But due to config issues, we are unable to set the lifespan of the JWT to be short lived in the deployment repo.

fisher60 commented 1 year ago

We will expand this issue to make tokens truly one-time-use. We should force tokens to be invalidated after a single use to identify a user. This means the /me endpoint should burn a token when it is used to call this endpoint (if it is a temporary token).