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

ENG-5451: Integration of new version of Keycloak (Quarkus based) #40

Open
wants to merge 11 commits into
base: release/7.3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ent/enp-build-key.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

TMP="$(cat Dockerfile.keycloak Dockerfile.redhat-sso | sha256sum --zero | cut -d' ' -f1)"
TMP="$(cat Dockerfile.keycloak | sha256sum --zero | cut -d' ' -f1)"
TMP+="${PPL_COMMIT_ID}_${ENTANDO_PRJ_VERSION}"
echo "$TMP"
30 changes: 0 additions & 30 deletions .github/workflows/publication.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@ env:
PR_CHECKER_PATH: ".github/pr-title-checker-config.json"

DOCKER_KEYCLOAK_IMAGE_BASE_NAME: entando/entando-keycloak
DOCKER_SSO_IMAGE_BASE_NAME: entando/entando-redhat-sso
DOCKER_KEYCLOAK_IMAGE_ARCHITECTURE: linux/amd64,linux/arm64
DOCKER_SSO_IMAGE_ARCHITECTURE: linux/amd64
DOCKER_IMAGE_CONTEXT: .
DOCKER_KEYCLOAK_IMAGE_FILE: Dockerfile.keycloak
DOCKER_SSO_IMAGE_FILE: Dockerfile.redhat-sso
DOCKER_IMAGE_PUSH: true

jobs:
Expand Down Expand Up @@ -54,23 +51,6 @@ jobs:
type=sha
type=raw,event=pr,value={{base_ref}}

- name: Docker meta-sso
id: meta-sso
uses: docker/metadata-action@v4
with:
images: |
${{ env.DOCKER_SSO_IMAGE_BASE_NAME }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
type=raw,event=pr,value={{branch}}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

Expand Down Expand Up @@ -101,13 +81,3 @@ jobs:
tags: ${{ steps.meta-keycloak.outputs.tags }}
labels: ${{ steps.meta-keycloak.outputs.labels }}
platforms: ${{ env.DOCKER_KEYCLOAK_IMAGE_ARCHITECTURE }}

- name: Build sso
uses: docker/build-push-action@v4
with:
context: ${{ env.DOCKER_IMAGE_CONTEXT }}
file: ${{ env.DOCKER_SSO_IMAGE_FILE }}
push: ${{ env.DOCKER_IMAGE_PUSH }}
tags: ${{ steps.meta-sso.outputs.tags }}
labels: ${{ steps.meta-sso.outputs.labels }}
platforms: ${{ env.DOCKER_SSO_IMAGE_ARCHITECTURE }}
41 changes: 7 additions & 34 deletions Dockerfile.keycloak
Original file line number Diff line number Diff line change
@@ -1,39 +1,12 @@
FROM quay.io/keycloak/keycloak:18.0.2-legacy
LABEL MAINTAINER="Entando <[email protected]>"
ARG VERSION
LABEL name="Entando Keycloak" \
vendor="Entando" \
version="v${VERSION}" \
release="7" \
summary="Keycloak with Entando's themes and extensions." \
description="This is container hosts Keycloak along with themes created for Entando."
COPY LICENSE /licences/entando-lgpl.txt
FROM quay.io/keycloak/keycloak:23.0.4 as builder

COPY themes /opt/jboss/keycloak/themes
COPY --chown=jboss:root cli /opt/jboss/tools/cli/
COPY --chown=jboss:root jboss-tools/standalone-configuration.cli /opt/jboss/tools/cli/standalone-configuration.cli
COPY --chown=jboss:root jboss-tools/standalone-ha-configuration.cli /opt/jboss/tools/cli/standalone-ha-configuration.cli
RUN /opt/keycloak/bin/kc.sh build

ARG ORACLE_JDBC_DRIVER_VERSION=23.2.0.0
RUN export KEYCLOAK_HTTP_PORT=8080 && \
cd /opt/jboss/keycloak/modules/system/layers/base/com/oracle/jdbc/main/ && \
mkdir driver && \
curl https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/${ORACLE_JDBC_DRIVER_VERSION}/ojdbc8-${ORACLE_JDBC_DRIVER_VERSION}.jar -o driver/ojdbc.jar
FROM quay.io/keycloak/keycloak:23.0.4

ENV KEYCLOAK_DEFAULT_THEME="entando" \
KEYCLOAK_HOME="/opt/jboss/keycloak" \
HOME="/home/jboss"

ENV JGROUPS_DISCOVERY_PROTOCOL="dns.DNS_PING" \
JGROUPS_DISCOVERY_PROPERTIES="dns_query=keycloak-headless" \
CACHE_OWNERS_COUNT="2" \
CACHE_OWNERS_AUTH_SESSIONS_COUNT="2"
COPY themes/entando /opt/keycloak/themes/entando
COPY --from=builder /opt/keycloak/ /opt/keycloak/

USER root
RUN mkdir -p "$HOME"; \
chown jboss:jboss "$HOME"; \
chmod g+rwx "$HOME"
USER jboss
ENV KC_SPI_THEME_DEFAULT="entando"

EXPOSE 8080
CMD ["-b", "0.0.0.0"]
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]
26 changes: 0 additions & 26 deletions Dockerfile.redhat-sso

This file was deleted.

12 changes: 0 additions & 12 deletions cli/databases/oracle/change-database.cli

This file was deleted.

25 changes: 0 additions & 25 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,3 @@ services:
#DB_DATABASE: keycloak
#DB_USER: username
#DB_PASSWORD: password

redhat-sso:
build:
context: ./
dockerfile: Dockerfile.redhat-sso
hostname: redhat-sso
ports:
- "8081:8080"
environment:
SSO_ADMIN_USERNAME: admin
SSO_ADMIN_PASSWORD: qwe123
PROXY_ADDRESS_FORWARDING: "true"

# Configure a different database (default is H2)
#DB_SERVICE_PREFIX_MAPPING: db-postgresql=DB
#DB_POSTGRESQL_SERVICE_HOST: "db-host"
#DB_POSTGRESQL_SERVICE_PORT: 5432
#DB_VENDOR: postgres
#DB_DATABASE: postgresql
#DB_USERNAME: username
#DB_PASSWORD: password

# Addional configuration needed by Oracle database
#DB_URL: jdbc:oracle:thin:@db-host:1521:XE
#DB_NONXA: "true"
2 changes: 1 addition & 1 deletion entando-project
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ENTANDO_PRJ_NAME=entando-keycloak
ENTANDO_PRJ_VERSION=7.2.0-SNAPSHOT
ENTANDO_PRJ_VERSION=7.3.1-SNAPSHOT
ENTANDO_PRJ_IMAGE_NAME=entando-keycloak
ENTANDO_PRJ_IMAGE_REGISTRY="registry.hub.docker.com"
ENTANDO_PRJ_BUILD_COMMAND=.ent/enp-build.sh
Expand Down
7 changes: 0 additions & 7 deletions jboss-tools/standalone-configuration.cli

This file was deleted.

7 changes: 0 additions & 7 deletions jboss-tools/standalone-ha-configuration.cli

This file was deleted.

Loading
Loading