{"id":23193625,"url":"https://github.com/thomasdarimont/keycloak-custom-server","last_synced_at":"2025-06-27T22:38:54.074Z","repository":{"id":37086687,"uuid":"489613988","full_name":"thomasdarimont/keycloak-custom-server","owner":"thomasdarimont","description":"Custom Keycloak.X Server Distribution with selective features","archived":false,"fork":false,"pushed_at":"2023-01-30T22:03:44.000Z","size":79,"stargazers_count":23,"open_issues_count":2,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-02T00:17:41.579Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomasdarimont.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-07T08:21:36.000Z","updated_at":"2024-02-25T14:12:55.000Z","dependencies_parsed_at":"2023-01-20T17:15:40.830Z","dependency_job_id":null,"html_url":"https://github.com/thomasdarimont/keycloak-custom-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasdarimont%2Fkeycloak-custom-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasdarimont%2Fkeycloak-custom-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasdarimont%2Fkeycloak-custom-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasdarimont%2Fkeycloak-custom-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasdarimont","download_url":"https://codeload.github.com/thomasdarimont/keycloak-custom-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230276320,"owners_count":18201090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-18T13:11:57.812Z","updated_at":"2024-12-18T13:11:58.544Z","avatar_url":"https://github.com/thomasdarimont.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"Custom Keycloak Server\n----\n\nSimple example for creating a custom Quarkus based Keycloak Distribution with 0 known CVEs.\n\n# Features\n- Create a custom Quarkus based Keycloak Distribution and Docker Image\n- Support for using your own extensions and themes\n- Support for removing unwanted Quarkus Extensions via maven dependency excludes\n- Support for latest patch levels for libraries with known CVEs\n- Support for secure Docker image based on alpine to avoid CVEs in base image. \n\nAn [example for a Image scan with aqasec/trivy shows](https://gist.github.com/thomasdarimont/efb1a1327a585517db5a047401852a88) that this project can produce \na custom Keycloak docker image with 0 known CVEs.\n\n# Build\n\n## Build custom distribution\n```\nmvn clean verify\n```\n\n## Build with Integration Tests\n```\nmvn clean verify -Pwith-integration-tests\n```\n\n## Build docker image\n```\nmvn clean verify docker:build\n```\n\n## Build docker image with Zero (known) CVEs\n\nCheckout the [zero-cves Branch](https://github.com/thomasdarimont/keycloak-custom-server/tree/zero-cves) \n```\ngit checkout zero-cves\n```\n*or* perform the following steps yourself:\n- Uncomment the h2 exclusions from the dependency section in the the pom.xml file.\n- Uncomment the `db` setting in src/main/resources/META-INF/keycloak.conf and set an appropriate value, e.g. `postgres`.\n\nThen run the following command to build the image (defaults to `thomasdarimont/custom-keycloakx:1.0.0-SNAPSHOT`):\n```\nmvn clean verify docker:build -Ddocker.file=keycloak/Dockerfile.alpine\n```\n\n# Scan\n\n## Scan the image with Aquasec Trivy\n\nBefore running the command below, ensure that the custom keycloak docker image was build successfuly.\n\n```\njava bin/scanImage.java --verbose --image-name=thomasdarimont/custom-keycloakx:1.0.0-SNAPSHOT\n```\n\n# Run\n\n## Run the custom distribution directly\n\nThe following example command shows how to run the custom Keycloak distribution against \na postgres instance accessible on `127.0.0.1`.\n\n```\ntarget/keycloak-*/bin/kc.sh \\\n   start \\\n   --http-enabled=true \\\n   --http-relative-path=auth \\\n   --hostname-strict=false \\\n   --hostname-strict-https=false \\\n   --db=postgres \\\n   --db-url-host=127.0.0.1 \\\n   --db-url-database=keycloak \\\n   --db-username=keycloak \\\n   --db-password=keycloak\n```\n\n## Run the docker image\n\nThe following example command shows how to run the custom docker image against \na postgres instance accessible on the docker host via `172.17.0.1` in this case.\n\n```\ndocker run --rm -it \\\n    -p 8080:8080 \\\n    -e KEYCLOAK_ADMIN=keycloak \\\n    -e KEYCLOAK_ADMIN_PASSWORD=keycloak \\\n    thomasdarimont/custom-keycloakx:1.0.0-SNAPSHOT \\\n    start \\\n   --http-enabled=true \\\n   --http-relative-path=auth \\\n   --hostname-strict=false \\\n   --hostname-strict-https=false \\\n   --db=postgres \\\n   --db-url-host=172.17.0.1 \\\n   --db-url-database=keycloak \\\n   --db-username=keycloak \\\n   --db-password=keycloak\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasdarimont%2Fkeycloak-custom-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasdarimont%2Fkeycloak-custom-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasdarimont%2Fkeycloak-custom-server/lists"}