I would like to use Hydra as OAuth2 endpoint to authenticate and authorize access to a Kubernetes cluster, similar to what is described in
https://faun.pub/kubernetes-auth-e2f342a5f269 with Keycloak.
The important thing is that the JWT token returned by Keycloak contains the groups the user is member in. These groups are mapped in Kubernetes, so that Kubernetes knows whether the user is authorized to do a certain request.
In Keycloak this seems to be native - in Hydra I haven't found anything about this. There is this /userinfo endpoint (as described here:
https://www.ory.sh/docs/hydra/concepts/openid-connect-oidc), but I am not sure if this can somehow be used in this case. Does anyone have experience with this? I suppose I'm not the first one having this use case.
Thank you very much in advance!