{"id":18336201,"url":"https://github.com/openremote/keycloak","last_synced_at":"2026-03-09T00:34:12.546Z","repository":{"id":45482725,"uuid":"348403253","full_name":"openremote/keycloak","owner":"openremote","description":"Keycloak docker image with openremote theme and env variables","archived":false,"fork":false,"pushed_at":"2026-02-25T08:44:12.000Z","size":682,"stargazers_count":5,"open_issues_count":3,"forks_count":9,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-02-25T13:06:17.496Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"FreeMarker","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openremote.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-03-16T15:42:45.000Z","updated_at":"2025-12-19T15:07:18.000Z","dependencies_parsed_at":"2024-05-16T02:09:56.438Z","dependency_job_id":"29b9357e-1194-4eb5-bd23-700929111097","html_url":"https://github.com/openremote/keycloak","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/openremote/keycloak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openremote%2Fkeycloak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openremote%2Fkeycloak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openremote%2Fkeycloak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openremote%2Fkeycloak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openremote","download_url":"https://codeload.github.com/openremote/keycloak/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openremote%2Fkeycloak/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30278559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11-05T20:06:44.451Z","updated_at":"2026-03-09T00:34:12.523Z","avatar_url":"https://github.com/openremote.png","language":"FreeMarker","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Keycloak\n\n[![Docker Image](https://github.com/openremote/keycloak/actions/workflows/keycloak.yml/badge.svg)](https://github.com/openremote/keycloak/actions/workflows/keycloak.yml)\n\nKeycloak docker image built for `postgres` with:\n\n* Default env variable values to assume running behind a reverse proxy sending `X-Forwarded-*` headers (env variables can be changed see keycloak documentation) \n* Enables metrics and health endpoints by default\n* Adds custom functionality to allow token 'issuer' to be fixed by setting `KEYCLOAK_ISSUER_BASE_URI` (e.g. `KEYCLOAK_ISSUER_BASE_URI: https://192.168.1.2/auth`)\nthis is to allow a private deployment to be accessed over a reverse tunnel, when using this you also need to set the following but precaution should be taken to validate the `Host` header in the reverse proxy:\n  * `KC_HOSTNAME: `\n  * `KC_HOSTNAME_STRICT: false`\n* OpenRemote theme embedded and set as default\n* Request path to `/auth` (like older versions of Keycloak to simplify usage behind a reverse proxy)\n* Listener to configure roles of self-registered users. Roles are set using `KEYCLOAK_SELF_REGISTERED_USER_ROLES` environment variable,  \nthe JSON structure is\n```\n{\n  \"realmRoles\" : [ \"restricted_user\" ],\n  \"clientRoles\" : [\n    {\n      \"client\": \"openremote\",\n      \"roles\": [\n        \"read:assets\",\n        \"write:attributes\"\n      ]\n    }\n  ]\n}\n```\nWhen assigning to the environment variable, it must be enclosed in double-quotes, properly escaped.  \nThis can be done e.g. by piping to `jq -c | sed 's/\"/\\\\\"/g'`, which would result in `\"{\\\"realmRoles\\\":[\\\"restricted_user\\\"],\\\"clientRoles\\\":[{\\\"client\\\":\\\"openremote\\\",\\\"roles\\\":[\\\"read:assets\\\",\\\"write:attributes\\\"]}]}\"`  \nThe listener is not enabled by default. In Keycloak, in the `Realm settings` - `Events` - `Event listeners` admin screen, `self-register-user-configure` should be added to the list.\n\n## Working on the OpenRemote theme\nThe openremote theme template files are located in `src/main/resources/theme/openremote`; to work on the OpenRemote theme use:\n\n```shell\ndocker run --rm -p 8081:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=secret -e KEYCLOAK_DEFAULT_THEME=dev -e KC_HOSTNAME_PORT=8081 -e KEYCLOAK_START_COMMAND=start-dev -e KEYCLOAK_START_OPTS=\"--spi-theme-static-max-age=-1 --spi-theme-cache-themes=false --spi-theme-cache-templates=false\" --mount type=bind,src=$PWD/src/main/resources/theme/openremote,dst=/deployment/keycloak/themes/dev openremote/keycloak:latest\n```\n\nThen access http://localhost:8081/ and any changes made to the template files can be reloaded in realtime by just refreshing the window.\n\nTo get the standard themes for reference use the following (replace `${VERSION}` with actual keycloak version used):\n```shell\ndocker cp ID:/opt/keycloak/lib/lib/main/org.keycloak.keycloak-themes-${VERSION}.jar ./\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenremote%2Fkeycloak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenremote%2Fkeycloak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenremote%2Fkeycloak/lists"}