1
votes

Once an OAuth 2.0 Client receives an opaque Access Token from the Authorization Server, it can use it as a bearer token to request data from the Resource Server. The OAuth Standard does not define a format for the Access Token but https://tools.ietf.org/html/rfc7662#section-2.2 defines a Token Introspection endpoint that enables the Resource Server to request more information about the token (and validate it).

According to the specs, the only required field in the response of the introspection endpoint is a boolean named "active". So is it not mandatory for the Authorization Server to provide any information about the subject nor the client to whom the token was issued? Both is described as optional in the RFC. I know that a lot of OAuth 2.0 Authorization Server implementations use JWTs as Access Tokens and some of them add an "azp" claim (which is defined in the Open ID Connect spec) but this is not defined by the OAuth spec which means I cannot assume that all Authorization Server implement it that way. I wonder what other options a resource server has to know from which client the request originates from. Is this something that depends on the specific Authorization Server implementation? Are there any other approaches than the "azp" claim or the client_id field in the introspection response?

1

1 Answers

0
votes

Answer to your question is in your assumption I cannot assume that all Authorization Server implement it that way

First, you have correctly understood protocol and surrounding solutions. Having a JWT or token introspection allows you to retrieve more information about the access token.

Secondly, ask this question from yourself, do you allow your product to integrate from tokens generated from an unknown authorization server ? For example, you may accept access tokens from your in-house authorization server OR Azure tokens in a cloud environment. In both cases, you have understanding on token format, authorization server capabilities. So you will always program with this in mind.

At the moment, well-known authorization implementations support JWT access tokens. Also many have token introspection implemented. So you should rely on these methods which already established in industry.

Personally I am not aware about any other specification backed method. Custom methods could exist but they shouldn't be followed if you want to stick to specs.