Open
Conversation
The file was first introduced in 6b34a66, but it was never used, because `configManager.allowSecretsFromConfig` defaults to `true`. In this case, environment variables and default values from `application.conf` files take precedence over the secret provider. To fix this, set `allowSecretsFromConfig` to `false` in which case secrets will only be read from the `secrets.properties` file. This also requires fixing the property names for the database credentials in `secrets.properties`. Also remove all environment variables for credentials from the Docker Compose config because they are not required anymore. Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@doubleopen.org>
This minimizes the diff in the following commit. Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@doubleopen.org>
Add a new Keycloak client `ort-server-backend` and use it for the backend to communicate with Keycloak. The new client only uses the "Service account roles" authentication flow which corresponds to the "Client Credentials Grant" [1] from OAuth2. The associated service account has the admin role for the realm. This is the recommended authorization flow for machine to machine communication [2], because it authorizes an application instead of a user. [1]: https://datatracker.ietf.org/doc/html/rfc6749#section-4.4 [2]: https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@doubleopen.org>
The role is not required anymore since role management was moved to the database [1]. The superuser group is still required to bootstrap the superusers, as the migration logic that assigns the superuser roles in the database is based on the Keycloak groups. [1]: #3908 Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@doubleopen.org>
6841f0a to
787a93a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switch to the client credentials flow for the backend and do some cleanups for the Keycloak config use in Compose. See the commit messages for details.
There will be a follow-up PR which reworks the remaining clients and (finally) adds documentation for the Keycloak configuration required by ORT Server.