mammoth-country-5949
03/14/2023, 5:16 PMoauth2_introspection
Authenticator and remote_json
Authorizer? Basically, I’d like to use the sub
field in Hydra’s introspection response as the Subject
calling into Keto’s check API.witty-midnight-20567
03/15/2023, 11:23 AMmammoth-country-5949
03/15/2023, 10:13 PMThe subject is extracted from theWhen I run a Hydra token through introspection endpoint (http://ory-hydra-admin:4445/admin/oauth2/introspect), I see something like this (and this is what OathKeeper gets back):field.username
{
"active": true,
"scope": "kafka",
"client_id": "e31f3c03-80bc-4918-a0fa-afe9f433b400",
"sub": "e31f3c03-80bc-4918-a0fa-afe9f433b400",
"exp": 1678920413,
"iat": 1678916813,
"nbf": 1678916813,
"aud": [],
"iss": "<https://public.hydra.mydomain.com>",
"token_type": "Bearer",
"token_use": "access_token"
}
There is no username
from which the Subject
can be set, but there is the sub
field which is the actual client id.mammoth-country-5949
03/15/2023, 10:18 PMsub
filed that gets copied to the session object (https://github.com/ory/oathkeeper/blob/master/pipeline/authn/authenticator_oauth2_introspection.go#L274)mammoth-country-5949
03/15/2023, 10:22 PM