witty-actor-17128
07/24/2022, 3:03 PMhydra:4444
(as container name), requests from Kratos to Hydra are successful, but redirections are not (since the browser doesn't recognize <http://hydra:4444/>...
On the other hand, when I set the public host to localhost:4444
, redirects are fine but direct requests from Kratos to Hydra are obviously failing with "connection refused" user-facing self-service error.
In both cases, the login & consent flow is interrupted.
How should I configure docker-compose, kratos and hydra so it would work? I've looked at some references from the past, but for some reason I can't find one with an up to date Kratos configurations file. At least, none of the examples for the integration contains a methods.oidc part in the YML file.late-france-48187
07/24/2022, 8:02 PMred-machine-69654
07/24/2022, 8:28 PMports:
- 4444:4444
- 4445:4445
On the hydra service to expose the port on “your” laptop.red-machine-69654
07/24/2022, 8:28 PMwitty-actor-17128
07/27/2022, 10:56 AMred-machine-69654
07/27/2022, 11:35 AMwitty-actor-17128
07/27/2022, 4:02 PM...
urls:
self:
public: <http://hydra:4444>
issuer: <http://hydra:4444>
...
...
webfinger:
oidc_discovery:
token_url: <http://hydra:4444/oauth2/token>
auth_url: <http://localhost:4444/oauth2/auth>
...
Solved the issue. It was trial and error because the documentation only states that this webfinger section overrides the urls, but doesn't elaborate on that (why, when, where). However it solved my problem - redirections use localhost:4444, so they are resolved in the browser, and Kratos still uses hydra:4444 for direct requests, so they are resolved as well.