Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kratos Hydra example is missing a docker compose file #76

Closed
4 of 6 tasks
gdsmith opened this issue Jul 21, 2023 · 4 comments
Closed
4 of 6 tasks

Kratos Hydra example is missing a docker compose file #76

gdsmith opened this issue Jul 21, 2023 · 4 comments
Labels
bug Something is not working.

Comments

@gdsmith
Copy link

gdsmith commented Jul 21, 2023

Preflight checklist

Describe the bug

Trying to set up the Kratos Hydra example but the readme says to use docker-compose and there is no docker-compose.yaml present in the directory.

Reproducing the bug

Steps to reproduce the behaviour:

  1. cd kratos-hydra
  2. docker-compose up

Relevant log output

no configuration file provided: not found

Relevant configuration

No response

Version

main branch

On which operating system are you observing this issue?

macOS

In which environment are you deploying?

Docker Compose

Additional Context

Readme content:

  50   │ ### Run locally
  51   │ 
  52   │ To run the example locally, clone the repository and run the following commands
  53   │ in the root of the project:
  54   │ 
  55   │ ```
  56   │ docker-compose up
  57   │ ```
  58   │ 
  59   │ This will start the Ory Hydra and Ory Kratos servers in Docker containers.
@gdsmith gdsmith added the bug Something is not working. label Jul 21, 2023
@eest
Copy link

eest commented Aug 9, 2023

I too had problems finding the mentioned compose file, there is one at https://github.com/ory/examples/blob/master/kratos-hydra/contrib/hydra/docker-compose.yml which seems like it could be the one referred to, but is not very clear if this is an older leftover from earlier work or up to date with how things are now. The README.md next to the compose file does state:

**Warning: ** this is a preliminary example and will properly be implemented in ORY Kratos directly.

It is not clear to me what specifically is to be "implemented directly" in kratos or if this is some leftover comment from before ory/kratos#2804 was merged. The warning seems to stem from at least ory/kratos-selfservice-ui-node#50.

The current https://github.com/ory/examples/blob/master/kratos-hydra/contrib/hydra/kratos/kratos.yml file does use oauth2_provider.url from ory/kratos#2804 so in that sense things seem more up to date than the warning lets on...

Perhaps @aeneasr (the commiter of ory/kratos#2804) can shed some light on the current state of things?

@eest
Copy link

eest commented Aug 10, 2023

Something I did notice which does not seem to be present in this example is that to get things to work when configuring hydra with - URLS_CONSENT=http://127.0.0.1:4455/consent (where my kratos-selfservice-ui-node was running), I had to configure the environment-variable ORY_SDK_URL=http://kratos:4434 (my kratos admin API port) for kratos-selfservice-ui-node otherwise it was calling out to https://playground.projects.oryapis.com/admin/identities/[...] resulting in the following error being printed in the logs as well as in the browser:

Error: Request failed with status code 401
    at createError (/usr/src/app/node_modules/@ory/client/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/usr/src/app/node_modules/@ory/client/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/usr/src/app/node_modules/@ory/client/node_modules/axios/lib/adapters/http.js:269:11)
    at IncomingMessage.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

This was because the external service would respond to the requests with a 401.

Just mentioning it if someone else runs across the same thing I did.

@eest
Copy link

eest commented Aug 10, 2023

I noticed now that #73 cleaned up a bunch of stuff regarding the kratos-hydra example (thanks @Jorgagu!), including the warning message in README.md, as well as placing the compose file in the expected position. Further I noticed it worked without having to set the ORY_SDK_URL i mentioned above. Trying to figure out how stuff differed between the setup in this directory and what I had, I was actually missing KRATOS_ADMIN_URL=http://kratos:4434 (which just happened to default to ORY_SDK_URL if not set). So disregard my note regarding ORY_SDK_URL above, the KRATOS_ADMIN_URL was the more specific setting I was missing.

But given the recent cleanup this should also mean this issue is also solved since the docker-compose file is now at the expected location.

@vinckr
Copy link
Member

vinckr commented Aug 11, 2023

Hey @eest

Right,
thanks for following up here and your feedback & contributions!

@vinckr vinckr closed this as completed Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

3 participants