JWT tokens authenticate the client, not the user
blog.moodio.co.uk
JWT tokens authenticate the client, not the user
1–10 of 24 posts
Re: JWT tokens authenticate the client, not the user
#2From https://news.ycombinator.com/showhn.html Edit: The title has removed show hn now
> JWT tokens authenticate the client, not the user
I think it's both. It just doesn't authorize the user for anything special.
Re: JWT tokens authenticate the client, not the user
#3> Blog posts, sign-up pages, and other reading material can't be tried out, so can't be Show HNs. From https://news.ycombinator.com/showhn.html Edit: The title has removed show hn now > JWT tokens authenticate the client, not the user I think it's both. It just doesn't authorize the user for anything special.
Re: JWT tokens authenticate the client, not the user
#4Re: JWT tokens authenticate the client, not the user
#5What the article actually seems to be asserting is that permission checking should be done via calls to an IAM and not via claims in the JWT (if I'm understanding it right).
I don't buy this either. Tokens can cache permissions, albeit with the same staleness issues that JWTs have for authentication. It's not much different than how a driving license is both evidence of identity and evidence of a permission.
The claims might be stale, but we have the same problem for revoking JWTs.
Re: JWT tokens authenticate the client, not the user
#6Some conflation between authorisation and authentication here too — the description of JWTs here describes authorisation, not authentication, I think ‘authorizing the client’ vs ‘authorizing the user’ would typically just be ‘authorization’ and ‘authentication’ respectively.
Re: JWT tokens authenticate the client, not the user
#7Making another call over the network for auth is by definition vastly less efficient by several orders vs having been handed the information in the first place. The bottleneck of a centralized permission service is actually what pushed us to JWT in the first place.
Using JWTs to authenticate the user allows actual decentralization of your endpoints. We have services that speak directly to nothing else in the ecosystem and it’s a major win.
The security argument is valid to a small extent, but I’ll trust a well salted SHA256 with my life until I’m told otherwise.
Re: JWT tokens authenticate the client, not the user
#8> there are far more secure and efficient ways of then verifying what the user is allowed to do, such as calling the IAM directly from the backend service or by implementing a more complex permissions service. Making another call over the network for auth is by definition vastly less efficient by several orders vs having been handed the information in the first place. The bottleneck of a centralized permission servic…
Re: JWT tokens authenticate the client, not the user
#9If you start calling other IAM servers to verify the permissions of the user, aren't you throwing away the usefulness and advantages of the JwT woken being a form of stateless auth (isn't the use case of jwt exactly to avoid calling the IAM upon request?) ?
Re: JWT tokens authenticate the client, not the user
#10i think this is conflates the common use of jwts vs their possible use cases. jwts are just standard signed information after all! Open ID Connect, probably the best extant user authentication protocol leverages JWTs to build the ‘ID Token’ that actually encapsulates user identity. Some conflation between authorisation and authentication here too — the description of JWTs here describes authorisation, not authenticat…
For example, a user signs in and gets a JWT token that has the permission Delete.Everything which in this example is the permission required to delete all a users resources, the client takes this and passes it to the backed. On the backend however, the user might not even be allowed to delete everything. Maybe they're under investigation, or maybe this particular service just doesn't allow it. But its not the role of the JWT to tell you whether or not this particular user is allowed to perform that action, all the JWT token tells you is that this user has allowed the bearer of the JWT token to perform that action on their behalf. But, doesn't mean the user is allowed to perform that action to begin with, so the user has given the client permission to perform an action they themselves aren't allowed to perform.