Closed indeewari closed 1 year ago
When we create an application we add a service provider property by enabling UserIdAsDefaultSubject. So if the user does not change the subject identifier from the application level it will return the user id as the subject. Hence we need to update the response of the application 'GET' by updating the subject claim uri to userid from username, if no subject identifier is configured.
Application get call response after fixing.
By modifying the subject claim uri to 'country'
Describe the issue: A newly created sample application returns username defaulted as the sub in claim configurations. The application actually consider the userid as the sub.
A PATCH request brings the experience back to normal.
How to reproduce:
WSO2 Identity Server - Application Management Rest API
application GET{{baseUrl}}/applications/:applicationId
subject
underclaimConfiguration
of the response jsonclaimConfiguration
and send a PATCH to the same application without any modificationExpected behavior: The application should behave as per the application configurations returned by the API response
WSO2 Identity Server - Application Management Rest API
application GET{{baseUrl}}/applications/:applicationId
If sub is set to username, the JWT should return the username as the sub If sub is set to userid, the JWT should return the userid as the sub
Environment information
Optional Fields
Related issues:
Suggested labels:
Suspected code line : https://github.com/wso2/identity-api-server/blob/58fc43a6e0cef5270e32df72539bc3785913acb7/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/functions/application/ServiceProviderToApiModel.java#L287