You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the above configuration snippet, if we define the audience config property, then the Microgateway validates the aud claim present in the JWT against the audience value provided in the jwtTokenConfig. section. If the aud claim value in the JWT differs from the audience value defined in the configuration file, the following error message can be observed in the server logs,
And, at the client end, we would observe the following error message as expected.
{
"fault": {
"code": 900901,
"message": "Invalid Credentials",
"description": "Invalid Credentials. Make sure you have given the correct access token"
}
}
However, if we check the value of the WWW-Authenticate response header received with the above response message, the error description is incorrect as shown below,
As you can see, the error_description says The access token expired which is incorrect. This should be corrected, for which the correct cause of the failure should get returned as the error_description value.
Steps to Reproduce
Create an simple API and secure the API with OAuth2 (JWT)
Configure the jwtTokenConfig as mentioned in the issue description.
Configure the audience value which differs from the actual aud claim value available in the JWT token.
Invoke the API with a valid token
Version
3.2.0
Environment Details (with versions)
No response
Relevant Log Output
No response
Related Issues
No response
Suggested Labels
No response
The text was updated successfully, but these errors were encountered:
Description
When we secure APIs using JWT tokens, the following configuration needs to be added to the micro.gw.conf file,
In the above configuration snippet, if we define the
audience
config property, then the Microgateway validates theaud
claim present in the JWT against theaudience
value provided in the jwtTokenConfig. section. If theaud
claim value in the JWT differs from theaudience
value defined in the configuration file, the following error message can be observed in the server logs,And, at the client end, we would observe the following error message as expected.
However, if we check the value of the
WWW-Authenticate
response header received with the above response message, the error description is incorrect as shown below,As you can see, the error_description says
The access token expired
which is incorrect. This should be corrected, for which the correct cause of the failure should get returned as the error_description value.Steps to Reproduce
jwtTokenConfig
as mentioned in the issue description.audience
value which differs from the actualaud
claim value available in the JWT token.Version
3.2.0
Environment Details (with versions)
No response
Relevant Log Output
No response
Related Issues
No response
Suggested Labels
No response
The text was updated successfully, but these errors were encountered: