Closed elliottneilclark closed 1 year ago
This is part of your consent app, the Ory Hydra integration does not solve this, it can only tell Ory Hydra that the user authenticated. What data you provide as part of consent is not the concern of Ory Kratos.
@aeneasr Thanks for the response. I did indeed find that I could send things along in the consent. However, I have a couple of issues with that:
Ultimately we integrated our SaaS with Ory Hydra and Kratos but had to switch to Keycloak since there were a number of open-source projects that expected data in OpenID endpoints.
Preflight checklist
Describe the bug
On Kubernetes I've set up Kratos and Hydra.
Kratos is there for login. Configured with an external UI and oauth2_provider.url is the internal URL of hydra's public service. Hydra is there for Oauth with disparate installed services. It's installed with urls.login being the Kratos self service login URL. Consent is our own consent URL. Kratos login and registration work well. I can register and verify email addresses.
I then added Grafana to the kubernetes cluster. Grafana needs an email address from oauth. Grafana has it's own hyrda oauth client with scopes and grantTypes (
scope: openid profile email offline_access grantTypes: authorization_code refresh_token implicit
) That didn't work. Grafana errors out 500 when trying to get the email. The oauth login flow works correctly grafana -> kratos self -> login UI -> login Ui -> kratos -> grafana all works as I can see:Some parts of the OpenID integration must be working because
amr
contains information from hydra about what login methods are enabled. However, the token is opaque, so Grafana needs to use the OpenID. It then goes to/userinfo
. Nothing in/userinfo
contains the email. So Grafana tries/userinfo/emails
, which 404's presumably expectedly.I would have expected that the Hydra Oauth2 integration meant that either the email is in
sub
or another response field. In other words, I would have expected that Hyrda's OpenID endpoint had all the email information.Reproducing the bug
api_url: http://ory-hydra-public:4444/userinfo token_url: http://ory-hydra-public:4444/oauth2/token
andauth_url
to the external hydra URL./oauth2/auth
Relevant log output
Relevant configuration
No response
Version
docker.io/oryd/hydra:v2.0.3 docker.io/oryd/kratos:v0.11.1
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Kubernetes
Additional Context
No response