0
votes

I am trying to enable JWT authentication for my backend java microservice which is deployed locally and all the requests to the microservice is gated through WSO2 apim 2.6 .The JWT token provider is used as WSO2 IS 5.6 .

I have placed all required configurations both at WSO2 IS and WSO2 apim on my machine.Since both are on same machine I have configured an offset of 1 too. I created a fresh user in apim store and used it to create application and subscribe api for the same user.The Token type configured is JWT .I used Postman as client for fetching the access token and the access token gets fetched as expected.Thereafter when I use the same token to access the required resource through api gateway it gives me back "Unclassified Authentication Failure" with code as "0" and description as "Access failure for API: /notification/1.0, version: 1.0 status: (0) - Unclassified Authentication Failure"

<ams:fault xmlns:ams="http://wso2.org/apimanager/security">
    <ams:code>0</ams:code>
    <ams:message>Unclassified Authentication Failure</ams:message>
    <ams:description>Access failure for API: /notification/1.0, version: 1.0 status: (0) - Unclassified Authentication Failure</ams:description>
</ams:fault>

I am expecting the resource to get created as it is a post request via WSO2 apim to backend service.Please share any available insights on this

1

1 Answers

1
votes

The token type JWT can only be used with api manager micro-gateways. You create OAuth application and try using the JWT grant type for it. You can find more information about the JWT grant type in

https://docs.wso2.com/display/AM260/JWT+Grant#JWTGrant-JWTBearerGrant