-
Notifications
You must be signed in to change notification settings - Fork 0
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
Keycloak upgrade #5
base: main
Are you sure you want to change the base?
Conversation
🔧 (Codeowners): update code owners list ⬆️ (Dockerfile): upgrade Keycloak base image and dependencies 📝 (README.md): add TODO section for build instructions 🔧 (docker-compose.yml): add docker-compose configuration for Keycloak ✨ (jars): add new jar files for postgres-socket-factory and jgroups-google
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comments but LGTM otherwise
KC_DB_USERNAME: keycloak | ||
KC_DB_PASSWORD: keycloak |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto: Is there a safety mechanism so that we don't accidentally use these weak credentials in production?
FROM quay.io/phasetwo/phasetwo-keycloak:25.0.5 AS base | ||
#FROM quay.io/keycloak/keycloak:25.0.5 AS base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between these two?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@devnoname120 the first one is the image with phasetwo
plugin, the second one is pure keycloak
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok in this case I suggest to remove the commented out code:
FROM quay.io/phasetwo/phasetwo-keycloak:25.0.5 AS base | |
#FROM quay.io/keycloak/keycloak:25.0.5 AS base | |
FROM quay.io/phasetwo/phasetwo-keycloak:25.0.5 AS base |
KEYCLOAK_ADMIN: admin | ||
KEYCLOAK_ADMIN_PASSWORD: password |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a safety mechanism so that we don't accidentally use these weak credentials in production?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @swisstxtsokol (If I understood the comment right, please LMK!):
- adding an
example.env
- referencing a
env_file: .env
here - having the developer rename
example.env
to.env
to get started
instead would force the developer to think about it at least once and avoid inadvertent mistakes.
(As free bonus, it would also reduce duplication of the DB username/password)
POSTGRES_USER: keycloak | ||
POSTGRES_PASSWORD: keycloak |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto: Is there a safety mechanism so that we don't accidentally use these weak credentials in production?
KC_DB_URL: jdbc:postgresql://db:5432/keycloak | ||
KC_DB_USERNAME: keycloak | ||
KC_DB_PASSWORD: keycloak | ||
KC_HOSTNAME: localhost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be the url of our keycloak instance?
dockerfile: Dockerfile | ||
environment: | ||
KEYCLOAK_ADMIN: admin | ||
KEYCLOAK_ADMIN_PASSWORD: password |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe move the .env
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seconding a lot of questions by the other reviewers - if their comments are resolved, please feel free to also resolve mine and merge :)
@@ -1 +1,6 @@ | |||
# keycloak-with-socket-factory | |||
|
|||
# TODO: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there stories to do these TODOs?
I am always a fan of putting a Jira story id on TODOs so it is clear if is more of a nice-to-have style TODO or an actual lets-do-this-next kind of TODO.
@@ -0,0 +1,38 @@ | |||
version: '3.8' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change itself was a bit contentious, but version
in docker-compose.yml
files is now obsolete.
I would not go back through all of them to remove it, but if you are adding a new one, I think it would be better to leave it out.
(Totally optional change though 😆)
KEYCLOAK_ADMIN: admin | ||
KEYCLOAK_ADMIN_PASSWORD: password |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @swisstxtsokol (If I understood the comment right, please LMK!):
- adding an
example.env
- referencing a
env_file: .env
here - having the developer rename
example.env
to.env
to get started
instead would force the developer to think about it at least once and avoid inadvertent mistakes.
(As free bonus, it would also reduce duplication of the DB username/password)
This PR upgrades keycloak to version 25.0.5 and adds a plugin from phasetwo. It also adds a docker-compose for local testing.