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

docker: Add image capable of loading policies/clients/jwks from an init.d directory #760

Closed
aeneasr opened this issue Feb 5, 2018 · 3 comments
Milestone

Comments

@aeneasr
Copy link
Member

aeneasr commented Feb 5, 2018

Currently, hydra is able to detect if an installation is new or not by checking if a client exists in the database already. If so, the following tasks are executed:

  1. A new root client is generated with random credentials (can be changed with an environment variable)
  2. A policy for said client is generated. It allows the client to do anything in hydra (thus "root" client)

We should update this part and add a couple of things:

  1. We should rename the method doing this to "initializeNewInstallation" and move it to installation_helper.go
  2. If a new installation is detected, root client and policy are generated as before
  3. We look in <project-root>/init.d/policies for policies (json formatted) and in ``/init.d/clients`
@aeneasr aeneasr added this to the 1.0.0-alpha1 milestone Feb 5, 2018
@aeneasr
Copy link
Member Author

aeneasr commented Feb 5, 2018

Actually, it would be much better to have a docker image which is capable of doing that using the hydra CLI!

@aeneasr aeneasr changed the title core: Add init.d directory for importing clients/policies on first boot docker: Add image capable of loading policies/clients/jwks from an init.d directory Feb 5, 2018
@pnicolcev-tulipretail
Copy link
Contributor

Throwing together a dockerized go app to use the SDK to bootstrap initial clients was really easy, but this would be super convenient.

@aeneasr aeneasr modified the milestones: 1.0.0-alpha.1, 1.0.0 Feb 9, 2018
@aeneasr aeneasr modified the milestones: 1.0.0, 1.0.0-alpha.1 Apr 19, 2018
@aeneasr
Copy link
Member Author

aeneasr commented May 20, 2018

Examples how to do that are now at https://github.com/ory/examples

@aeneasr aeneasr closed this as completed May 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants