Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APIM-4.1.0] Error while invoking internal REST APIs using JWT #1332

Closed
sashansamarajeewa opened this issue Jan 27, 2023 · 1 comment
Closed

Comments

@sashansamarajeewa
Copy link

Description

When invoking internal REST APIs using a JWT token following error is printed in the wso2carbon.log

[2023-01-24 15:34:18,086] ERROR - OAuthJwtAuthenticatorImpl JWT token issuer validation failed. Reason: Issuer present in the JWT (https://localhost:9443/oauth2/token) does not match with the token issuer ([])
[2023-01-24 15:34:18,086] ERROR - OAuthJwtAuthenticatorImpl Invalid JWT token :...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1FG8onHg

Steps to Reproduce

  • Create an application in the devportal and generate keys.
  • Generate a JWT token with the required scopes for invoking an internal REST API.
  • Invoke the REST API using the JWT token.
    eg: https://localhost:9443/api/am/publisher/v3/apis/{apiId}/documents
  • Following error is returned as the response.
    {
    "code": 401,
    "message": "",
    "description": "Unauthenticated request",
    "moreInfo": "",
    "error": []
    }

Affected Component

APIM

Version

4.1.0

Environment Details (with versions)

No response

Relevant Log Output

No response

Related Issues

No response

Suggested Labels

No response

@YasasRangika
Copy link

Closing this issue as per the comments in the internal issue. This request is not valid from the APIM perspective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants