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

Keycloak upgrade #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Keycloak upgrade #5

wants to merge 1 commit into from

Conversation

roosnic1
Copy link
Collaborator

This PR upgrades keycloak to version 25.0.5 and adds a plugin from phasetwo. It also adds a docker-compose for local testing.

🔧 (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
Copy link
Member

@devnoname120 devnoname120 left a 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

Comment on lines +13 to +14
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: keycloak
Copy link
Member

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?

Comment on lines +1 to +2
FROM quay.io/phasetwo/phasetwo-keycloak:25.0.5 AS base
#FROM quay.io/keycloak/keycloak:25.0.5 AS base
Copy link
Member

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?

Copy link
Contributor

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

Copy link
Member

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:

Suggested change
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

Comment on lines +9 to +10
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: password
Copy link
Member

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?

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)

Comment on lines +32 to +33
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: keycloak
Copy link
Member

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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move the .env?

Copy link

@RudolfSchreier RudolfSchreier left a 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:

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'

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 😆)

Comment on lines +9 to +10
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: password

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)

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

Successfully merging this pull request may close these issues.

4 participants