git.iko.soy/typeable/oauth2-proxy
on master help sign in
chore(examples): update keycloak to v25 (#2706)
ce8b63bKoen van Zuijlen
contrib/local-environment/docker-compose-keycloak.yaml+8−13
@@ -43,23 +43,18 @@ services:
43
43
44 keycloak:
44 keycloak:
45 container_name: keycloak
45 container_name: keycloak
46− image: jboss/keycloak:10.0.2
46+ image: keycloak/keycloak:25.0.1-0
47 hostname: keycloak
47 hostname: keycloak
48 command:
48 command:
49− [
49+ - 'start-dev'
50− '-b',
50+ - '--http-port=9080'
51− '0.0.0.0',
51+ - '--import-realm'
52− '-Djboss.socket.binding.port-offset=1000',
53− '-Dkeycloak.migration.action=import',
54− '-Dkeycloak.migration.provider=dir',
55− '-Dkeycloak.migration.dir=/realm-config',
56− '-Dkeycloak.migration.strategy=IGNORE_EXISTING'
57− ]
58 volumes:
52 volumes:
59− - ./keycloak:/realm-config
53+ - ./keycloak:/opt/keycloak/data/import
60 environment:
54 environment:
55+ KC_HTTP_PORT: 9080
61− KEYCLOAK_USER: admin@example.com
56+ KEYCLOAK_ADMIN: admin@example.com
62− KEYCLOAK_PASSWORD: password
57+ KEYCLOAK_ADMIN_PASSWORD: password
63 ports:
58 ports:
64 - 9080:9080/tcp
59 - 9080:9080/tcp
65 networks:
60 networks:
contrib/local-environment/keycloak/master-realm.json → contrib/local-environment/keycloak/oauth2-proxy-realm.jsonrenamed+18−18
@@ -1,6 +1,6 @@
1{
1{
2− "id": "master",
2+ "id": "oauth2-proxy",
3− "realm": "master",
3+ "realm": "oauth2-proxy",
4 "displayName": "Keycloak",
4 "displayName": "Keycloak",
5 "displayNameHtml": "<div class=\"kc-logo-text\"><span>Keycloak</span></div>",
5 "displayNameHtml": "<div class=\"kc-logo-text\"><span>Keycloak</span></div>",
6 "notBefore": 0,
6 "notBefore": 0,
@@ -48,7 +48,7 @@
48 "description": "${role_offline-access}",
48 "description": "${role_offline-access}",
49 "composite": false,
49 "composite": false,
50 "clientRole": false,
50 "clientRole": false,
51− "containerId": "master",
51+ "containerId": "oauth2-proxy",
52 "attributes": {}
52 "attributes": {}
53 },
53 },
54 {
54 {
@@ -61,7 +61,7 @@
61 "create-realm"
61 "create-realm"
62 ],
62 ],
63 "client": {
63 "client": {
64− "master-realm": [
64+ "oauth2-proxy-realm": [
65 "query-groups",
65 "query-groups",
66 "create-client",
66 "create-client",
67 "query-realms",
67 "query-realms",
@@ -84,7 +84,7 @@
84 }
84 }
85 },
85 },
86 "clientRole": false,
86 "clientRole": false,
87− "containerId": "master",
87+ "containerId": "oauth2-proxy",
88 "attributes": {}
88 "attributes": {}
89 },
89 },
90 {
90 {
@@ -93,7 +93,7 @@
93 "description": "${role_uma_authorization}",
93 "description": "${role_uma_authorization}",
94 "composite": false,
94 "composite": false,
95 "clientRole": false,
95 "clientRole": false,
96− "containerId": "master",
96+ "containerId": "oauth2-proxy",
97 "attributes": {}
97 "attributes": {}
98 },
98 },
99 {
99 {
@@ -102,7 +102,7 @@
102 "description": "${role_create-realm}",
102 "description": "${role_create-realm}",
103 "composite": false,
103 "composite": false,
104 "clientRole": false,
104 "clientRole": false,
105− "containerId": "master",
105+ "containerId": "oauth2-proxy",
106 "attributes": {}
106 "attributes": {}
107 }
107 }
108 ],
108 ],
@@ -122,7 +122,7 @@
122 "attributes": {}
122 "attributes": {}
123 }
123 }
124 ],
124 ],
125− "master-realm": [
125+ "oauth2-proxy-realm": [
126 {
126 {
127 "id": "a8271c2c-6437-4ca5-ae83-49ea5fe1318d",
127 "id": "a8271c2c-6437-4ca5-ae83-49ea5fe1318d",
128 "name": "query-groups",
128 "name": "query-groups",
@@ -229,7 +229,7 @@
229 "composite": true,
229 "composite": true,
230 "composites": {
230 "composites": {
231 "client": {
231 "client": {
232− "master-realm": [
232+ "oauth2-proxy-realm": [
233 "query-groups",
233 "query-groups",
234 "query-users"
234 "query-users"
235 ]
235 ]
@@ -273,7 +273,7 @@
273 "composite": true,
273 "composite": true,
274 "composites": {
274 "composites": {
275 "client": {
275 "client": {
276− "master-realm": [
276+ "oauth2-proxy-realm": [
277 "query-clients"
277 "query-clients"
278 ]
278 ]
279 }
279 }
@@ -439,7 +439,7 @@
439 "clientId": "account",
439 "clientId": "account",
440 "name": "${client_account}",
440 "name": "${client_account}",
441 "rootUrl": "${authBaseUrl}",
441 "rootUrl": "${authBaseUrl}",
442− "baseUrl": "/realms/master/account/",
442+ "baseUrl": "/realms/oauth2-proxy/account/",
443 "surrogateAuthRequired": false,
443 "surrogateAuthRequired": false,
444 "enabled": true,
444 "enabled": true,
445 "alwaysDisplayInConsole": false,
445 "alwaysDisplayInConsole": false,
@@ -450,7 +450,7 @@
450 "manage-account"
450 "manage-account"
451 ],
451 ],
452 "redirectUris": [
452 "redirectUris": [
453− "/realms/master/account/*"
453+ "/realms/oauth2-proxy/account/*"
454 ],
454 ],
455 "webOrigins": [],
455 "webOrigins": [],
456 "notBefore": 0,
456 "notBefore": 0,
@@ -486,14 +486,14 @@
486 "clientId": "account-console",
486 "clientId": "account-console",
487 "name": "${client_account-console}",
487 "name": "${client_account-console}",
488 "rootUrl": "${authBaseUrl}",
488 "rootUrl": "${authBaseUrl}",
489− "baseUrl": "/realms/master/account/",
489+ "baseUrl": "/realms/oauth2-proxy/account/",
490 "surrogateAuthRequired": false,
490 "surrogateAuthRequired": false,
491 "enabled": true,
491 "enabled": true,
492 "alwaysDisplayInConsole": false,
492 "alwaysDisplayInConsole": false,
493 "clientAuthenticatorType": "client-secret",
493 "clientAuthenticatorType": "client-secret",
494 "secret": "91f85142-ee18-4e30-9949-e5acb701bdee",
494 "secret": "91f85142-ee18-4e30-9949-e5acb701bdee",
495 "redirectUris": [
495 "redirectUris": [
496− "/realms/master/account/*"
496+ "/realms/oauth2-proxy/account/*"
497 ],
497 ],
498 "webOrigins": [],
498 "webOrigins": [],
499 "notBefore": 0,
499 "notBefore": 0,
@@ -616,8 +616,8 @@
616 },
616 },
617 {
617 {
618 "id": "7174c175-1887-4e57-b95b-969fe040deff",
618 "id": "7174c175-1887-4e57-b95b-969fe040deff",
619− "clientId": "master-realm",
619+ "clientId": "oauth2-proxy-realm",
620− "name": "master Realm",
620+ "name": "oauth2-proxy Realm",
621 "surrogateAuthRequired": false,
621 "surrogateAuthRequired": false,
622 "enabled": true,
622 "enabled": true,
623 "alwaysDisplayInConsole": false,
623 "alwaysDisplayInConsole": false,
@@ -711,14 +711,14 @@
711 "clientId": "security-admin-console",
711 "clientId": "security-admin-console",
712 "name": "${client_security-admin-console}",
712 "name": "${client_security-admin-console}",
713 "rootUrl": "${authAdminUrl}",
713 "rootUrl": "${authAdminUrl}",
714− "baseUrl": "/admin/master/console/",
714+ "baseUrl": "/admin/oauth2-proxy/console/",
715 "surrogateAuthRequired": false,
715 "surrogateAuthRequired": false,
716 "enabled": true,
716 "enabled": true,
717 "alwaysDisplayInConsole": false,
717 "alwaysDisplayInConsole": false,
718 "clientAuthenticatorType": "client-secret",
718 "clientAuthenticatorType": "client-secret",
719 "secret": "b234b7aa-8417-410f-b3fd-c57434d3aa4a",
719 "secret": "b234b7aa-8417-410f-b3fd-c57434d3aa4a",
720 "redirectUris": [
720 "redirectUris": [
721− "/admin/master/console/*"
721+ "/admin/oauth2-proxy/console/*"
722 ],
722 ],
723 "webOrigins": [
723 "webOrigins": [
724 "+"
724 "+"
contrib/local-environment/keycloak/master-users-0.json → contrib/local-environment/keycloak/oauth2-proxy-users-0.jsonrenamed+1−1
@@ -1,5 +1,5 @@
1{
1{
2− "realm": "master",
2+ "realm": "oauth2-proxy",
3 "users": [
3 "users": [
4 {
4 {
5 "id": "3356c0a0-d4d5-4436-9c5a-2299c71c08ec",
5 "id": "3356c0a0-d4d5-4436-9c5a-2299c71c08ec",
contrib/local-environment/oauth2-proxy-keycloak.cfg+4−4
@@ -2,8 +2,8 @@ http_address="0.0.0.0:4180"
2cookie_secret="OQINaROshtE9TcZkNAm-5Zs2Pv3xaWytBmc5W7sPX7w="
2cookie_secret="OQINaROshtE9TcZkNAm-5Zs2Pv3xaWytBmc5W7sPX7w="
3email_domains="example.com"
3email_domains="example.com"
4cookie_secure="false"
4cookie_secure="false"
5−upstreams="http://httpbin.localtest.me:8080"
5+upstreams="http://httpbin"
6−cookie_domains=[".localtest.me"] # Required so cookie can be read on all subdomains.
6+cookie_domains=["oauth2-proxy.localtest.me:4080", "httpbin.localtest.me:8080", "keycloak.localtest.me:9080"] # Required so cookie can be read on all subdomains.
7whitelist_domains=[".localtest.me"] # Required to allow redirection back to original requested target.
7whitelist_domains=[".localtest.me"] # Required to allow redirection back to original requested target.
8
8
9# keycloak provider
9# keycloak provider
@@ -12,7 +12,7 @@ client_id="oauth2-proxy"
12redirect_url="http://oauth2-proxy.localtest.me:4180/oauth2/callback"
12redirect_url="http://oauth2-proxy.localtest.me:4180/oauth2/callback"
13
13
14# in this case oauth2-proxy is going to visit
14# in this case oauth2-proxy is going to visit
15−# http://keycloak.localtest.me:9080/auth/realms/master/.well-known/openid-configuration for configuration
15+# http://keycloak.localtest.me:9080/realms/oauth2-proxy/.well-known/openid-configuration for configuration
16−oidc_issuer_url="http://keycloak.localtest.me:9080/auth/realms/master"
16+oidc_issuer_url="http://keycloak.localtest.me:9080/realms/oauth2-proxy"
17provider="oidc"
17provider="oidc"
18provider_display_name="Keycloak"
18provider_display_name="Keycloak"