|
|
|
|
|
by hn_throwaway_99
1808 days ago
|
|
This conversation comes up all the time when discussing JWTs, and unfortunately I think the issue is usually way overblown: 1. I don't believe there are any real security issues regarding logout if JWTs have a sufficiently short expiration time. 2. The reason this issue comes up is because of compliance audits, who demand that as soon as the user logs out, that the supplied token becomes invalid. However, if the JWT is adequately discarded from the client, the fact that the JWT is still valid for another ~5-10 minutes or so is only a security risk if the token has already been stolen. The fact of the matter here is you really aren't protecting against a new attack vector with this "must immediately revoke tokens on logout" rule. 3. Despite my beliefs with #2 (and I'd love to hear an argument why this isn't valid), good luck trying to convince an auditor about that fact, who often love finding minor/mundane issues to justify their existence. So you'll still need to maintain a small blocklist, but the data in that list is usually very small (most users never log out these days) and can often be replicated in memory to each server. |
|