What happened?
In our existing application, we forward the access token to upstream app and get standard claims data from it. We want to avoid passing the IdP access token to upstream application and use JWT assertion token instead, but we need to pass some standard claim. For now we just know we can pass custom claim using jwt claim headers
Access Token
{
"custom_user_id": "xxxx-xxxx-xxxx-xxxx",
"ext_role": "",
"iss": "https://yyy.auth0.com/",
"sub": "auth0|xxxx123",
"aud": [
"https://xxx/",
"https://yyy.auth0.com/userinfo"
],
"iat": 1695266371,
"exp": 1695352771,
"azp": "SOME_CLIENT_ID",
"scope": "openid profile email offline_access",
"permissions": [
"read:transaction",
"create:transaction"]
}
On the above example I can pass custom_user_id but cannot pass permissions as it is a “standard claim”.
What did you expect to happen?
I can pass the permissions as header, instead of the whole access token. Or, the permission is reflected in JWT Assertion Token
More Context
We use auth0 as the IdP. We do this because the existing app use permissions to do application-level authorization , but we do not want to pass the access token for security reason but we want to do minimal changes in the upstream apps.
Or are we approaching this problem the wrong way? Any suggestion?