credentials - oauth2 in bundle service API #409
Replies: 2 comments 1 reply
-
Do I have an option to log the request that is made by the OPA container? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Which OAuth2 flow would that be? You are sending request parameters encoded as JSON. The spec for the client credentials request specifically states:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have this curl which gives me back the access token as per auth flows:
curl --request POST
--url https://dev-vmfs2xsxy47w5vfr.us.auth0.com/oauth/token
--header 'content-type: application/json'
--data '{"client_id":"","client_secret":"","audience":"https://dev-vmfs2xsxy47w5vfr.us.auth0.com/api/v2/","grant_type":"client_credentials"}'
Response:
{
"access_token":ACCESS TOKEN,
"scope": "read:users",
"expires_in": 86400,
"token_type": "Bearer"
}
I am using this bundle config:
services:
url: http://docker.for.mac.localhost:9090/bundle-provider
credentials:
oauth2:
token_url: https://dev-vmfs2xsxy47w5vfr.us.auth0.com/oauth/token
grant_type: client_credentials
client_id:
client_secret:
additional_parameters:
audience: https://dev-vmfs2xsxy47w5vfr.us.auth0.com/api/v2/
bundles:
authz:
service: bundleService
resource: download/policies.tar.gz
polling:
min_delay_seconds: 10
max_delay_seconds: 20
I have made sure that I am passing the right client ID and client_secret. I have curled the command in the pod. it works fine and generates an access token.
But the OPA container throws this exception:
{"level":"error","msg":"Bundle load failed: request failed: error in response from OAuth2 token endpoint: {"error":"access_denied","error_description":"Unauthorized"}","name":"authz","plugin":"bundle","time":"2023-04-26T18:22:30Z"}
Can someone help me regarding this?
Beta Was this translation helpful? Give feedback.
All reactions