Urgent: Unable to use token generated through OAuth2 Credentials, getting 401 and 403 errors.
Closed this issue · 7 comments
Question
Token(JWT) obtained through oAuth2 client credentials doesn’t work getting 401 “unauthorised” as response. Token(without JWT) obtained through oAuth2 client credentials doesn’t work getting 403 “Forbidden” as response.
Please provide the steps to reproduce
Also please run the $version and send us the response (to get your Aidbox version)
version: '2206'
channel: edge
commit: 549985f34
zen-fhir-version: 0.5.13
steps to reproduce:
1.create a client ->
secret: somesecret
auth:
client_credentials:
token_format: jwt
refresh_token: true
access_token_expiration: 3600
grant_types:
- client_credentials
_source: code
first_party: true
id: test
resourceType: Client
-
generate access token -
{"client_id": "test",
"client_secret": "somesecret",
"grant_type": "client_credentials"
}
3. use this access token to access any rest api (/fhir/Patient or /Observation) -
you will get 401
- Please make sure you've reviewed the tutorial https://docs.aidbox.app/security-and-access-control-1/auth/client-credentials
- Also, please check the interactive Auth tutorial located under AuthSandbox on the left panel in Aidbox UI
I have tried this. and still it's a no go ..
@PavanPatro-Innovaccer This issue is resolved. Please close this ticket. @VarvaraSemenova wrong configmap with jwt check skip marked true was getting passed to the container. We have fixed the configmap provided for the deployment.
Issue Resolved.