API Protection by ID Token?
1 min readMay 13, 2020
What happens if ID tokens issued by external OpenID providers (IdP) are used for API protection? The following diagram is my understanding.
- A client that has no relationship with the resource server can access APIs of the resource server using an ID token that the client has legitimately obtained in an utterly irrelevant context.
- The user has granted a permission for the client to get an ID token, but she didn’t imagine that the permission would enable the client to call APIs of the irrelevant resource server.
- Because an ID token has no concept of
scope
and theaud
claim holds the ID of the client (i.e., theaud
claim cannot be used to restrict accessible resources as RFC 8707 proposes), possible options for API protection are just “all allowed” or “all denied”.
If I’m missing something, please correct me.