It's often so easy to reach for the values in the params/payload first because you're already working with them, instead of remembering to use the session values instead.
This would be a great audit to do for entire codebases.. Just check all places that are using params/payload values and see if there's actually already a session value that should be used instead.
If they have all the JWTs, seeing if one had a different e-mail than the logged-in user should be fairly doable.
On the backend, maybe they can look up who requested a token at a time.
But otherwise, no it doesn’t seem to be
Why was Apple signing a response JWT when the user only supplied an email?
I’m not a web guy so I just don’t see what they were going for here.
Your apple account is safe, but if a 3rd party trusts the signed apple payload without further verification of email, an attacker could sign in as you on the 3rd party app.
The third party is not supposed to link the information from an OpenID Connect client system by email address, which could change or go away at any time, and is also not guaranteed to be unique.
Rather, they should use the 'sub' claim which is meant to be the same over the lifetime of the user account with the issuer.
At best it's a work stoppage when someone changes their email. At worst you make assumptions about reusability of emails and give data access to the wrong account.
Seems little too obvious to exist, but people make mistakes.
It’s just that with JWT/JSE/JOSE already questionable security options that you would be extra super careful if you are using it. (Biggest flaw off the top of my head is it literally says what encryption is used with a NONE option meaning you can just switch to “none” and forge jwts to anyone that didn’t know not to accept those, second would be that they mix symmetric and asymmetric encryption options)
HS256 relies in shared secrets, so anyone who can verify a token can also change it. RS256 allows you to download the IdP keychain every once in a while and verify tokens offline.
OAuth tokens also are not meant to be used for authentication, and require either a separate token (as OpenID Connect did) with appropriate security, or to wedge additional security on top of access tokens as Facebook did with Connect.
This is basically because access tokens are meant to be messages about allowed access to the API resources, not messages to the client software about the user.
The token described in this disclosure is an OpenID Connect 1.0 Token. OIDC is a state of the art AuthN protocol that supersets OAuth with additional security controls. It's used by Google, Facebook and Twitch amongst others.
I'd do more analysis, but the author leaves off the most important part here (not sure why)
https://openid.net/specs/openid-connect-core-1_0.html#IDToke...