wso2 / api-manager

All issues, tasks, improvements and new features of WSO2 API Manager
Apache License 2.0
34 stars 8 forks source link

JWT encoding is not working #1975

Closed nelkon closed 11 months ago

nelkon commented 1 year ago

Description

API invocation fails when enabling the backend JWT.

Steps to Reproduce

[apim.jwt] enable = true header = "X-JWT-Assertion" enable_user_claims = true Furthermore add the below set of application attributes as well.

[[apim.devportal.application_attributes]] required=true hidden=false default="Yes" name="Sandbox access required ?" description="Does this Application require access to APIs in the Sandbox environment ? (Yes or No)"

[[apim.devportal.application_attributes]] required = true hidden = false name = "date_Review Date" description = "What date should API access terminate or be reviewed?"

[[apim.devportal.application_attributes]] required = true hidden = false name = "date_Start Date" description = "test"

[[apim.devportal.application_attributes]] required=true hidden=false default="Yes" name="Production access required ?" description="test"

[[apim.devportal.application_attributes]] required=false hidden=false name="Sponsor's name" description="Person responsible for the project this Application represents"

[[apim.devportal.application_attributes]] required=false hidden=false name="Usage description" description="What is the purpose/service/project/product of the Application requiring API access ?"

Login to the carbon management console and create a user by providing the username as “admin.abc” Go to the devportal and create a new application, subscribe API, generate keys and invoke the API. The first invocation will work, but you’ll observe the same error from the second invocation onwards. As per these observations, the issue occurs even without a custom JWT generator

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

GihanAyesh commented 11 months ago

The pubic fix PR: https://github.com/wso2/carbon-apimgt/pull/12083 Public test PR: https://github.com/wso2/product-apim/pull/13299