Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm failing to see how this is complicated. Imagine the following:

1) A token gets compromised.

2) You know which token. You need to revoke access.

3) You introduce state by storing said token on disk / in memory somewhere.

Key takeaways:

1) The authentication system (not the token) is now stateful. 2) You now have to check this data store to properly allow authentication. 3) A core benefit of JWT (stateless auth) is gone.



> 1) A token gets compromised.

Tokens are single-use and short-lived. Once a token is used it's revoked.

> 2) You know which token. You need to revoke access. > 3) You introduce state by storing said token on disk / in memory somewhere.

You don't. You simply reject the token and let the client refresh its token. That's it. There is no state. Compliant clients already expect tokens to be rejected for no apparent reason. They are access tokens.

Why exactly are you assuming that an access token is not single-use or even short-lived, particularly in bearer token protocols specifically designed so that tokens are ephemeral and single-use?

> 1) The authentication system (not the token) is now stateful.

Even if you shoehorn your definition of statefulness, that's entirely irrelevant. The whole point of an authentication system is, following your line of reasoning, to implement a stateful system. Thus, not only is that line of reasoning absurd, it also completely misses the point of implementing an authentication system, not to mention it ignores a whole class of attacks. And for what, exactly?


There's so much conceptual / factual confusion in this post I just don't know where to start. Agree to disagree I guess.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: