fix: config stuff, do make keycloak first
Some checks failed
Format / formatting (push) Successful in 6s
Build / build (push) Successful in 43s
CI / build (push) Failing after 10s

This commit is contained in:
2025-05-09 00:40:41 +02:00
parent 7f16cdc86f
commit 63327bc312
9 changed files with 2709 additions and 18 deletions

1
keycloak/CAS/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
keycloak-cas

6
keycloak/CAS/Dockerfile Normal file
View File

@ -0,0 +1,6 @@
FROM maven:3.8.8-eclipse-temurin-21-alpine
COPY ./keycloak-cas/ .
RUN mvn clean package

15
keycloak/CAS/build.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
if [ ! -d "./keycloak-cas/" ]
then
git clone https://github.com/RoboJackets/keycloak-cas
patch $(find . | grep UrlHelper.java) https_patch
fi
if [ -d "./target/" ]
then
rm -r target/
fi
docker build -t build-dep .
docker create -it --name build-dep-container build-dep bash
docker cp build-dep-container:/target ./target
docker rm -f build-dep-container

4
keycloak/CAS/https_patch Normal file
View File

@ -0,0 +1,4 @@
41c41
< .queryParam(PROVIDER_PARAMETER_SERVICE, uriInfo.getAbsolutePath().toString());
---
> .queryParam(PROVIDER_PARAMETER_SERVICE, uriInfo.getAbsolutePath().toString().replace("http://", "https://"));

30
keycloak/Dockerfile Normal file
View File

@ -0,0 +1,30 @@
FROM quay.io/keycloak/keycloak:latest AS builder
ARG KC_DB
ENV KC_DB=$KC_DB
# Install custom providers
ADD --chown=keycloak:keycloak --chmod=644 ./CAS/target/*.jar /opt/keycloak/providers/cas-provider.jar
# build optimized image
RUN /opt/keycloak/bin/kc.sh build
FROM quay.io/keycloak/keycloak:latest
ARG KC_DB
ENV KC_DB=$KC_DB
ARG KC_DB_URL
ENV KC_DB_URL=$KC_DB_URL
ARG KC_DB_USERNAME
ENV KC_DB_USERNAME=$KC_DB_USERNAME
ARG KC_DB_PASSWORD
ENV KC_DB_PASSWORD=$KC_DB_PASSWORD
COPY --from=builder /opt/keycloak/ /opt/keycloak/
WORKDIR /opt/keycloak
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]

2638
keycloak/realm.json Normal file

File diff suppressed because it is too large Load Diff