Skip to content

Commit 426dcc0

Browse files
committed
Keycloak update, fix 404 issue
1 parent 4b78a77 commit 426dcc0

23 files changed

Lines changed: 317 additions & 357 deletions

File tree

applications/accounts/Dockerfile

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
FROM quay.io/keycloak/keycloak:16.1.0
1+
FROM quay.io/keycloak/keycloak:26.2.5
22

3-
# add kubectl
3+
EXPOSE 9000
4+
EXPOSE 8080
45
USER root
5-
COPY --chmod=0755 scripts/create_api_user.sh /opt/jboss/startup-scripts/create_api_user.sh
6-
USER jboss
6+
COPY --chmod=0755 scripts/create_api_user.sh /opt/keycloak/startup-scripts/create_api_user.sh
7+
COPY --chmod=0755 scripts/kc-entrypoint.sh /opt/keycloak/bin/kc-entrypoint.sh
8+
9+
USER keycloak
710

811
# Customize keycloak look
9-
COPY themes/custom /opt/jboss/keycloak/themes/custom
12+
COPY themes/custom /opt/keycloak/themes/custom
13+
14+
# # keycloak kafka listener plugin
15+
COPY plugins/* /opt/keycloak/providers/
1016

11-
# plugins
12-
COPY plugins/* /opt/jboss/keycloak/standalone/deployments/
17+
ENTRYPOINT [ "/opt/keycloak/bin/kc-entrypoint.sh" ]
18+
CMD [ "start-dev", "--import-realm", "--health-enabled=true", "--metrics-enabled=true" ]

applications/accounts/deploy/resources/realm.json

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,42 @@
1-
21
{{- define "deploy_accounts_utils.role" }}
3-
{
4-
"id": {{ uuidv4 | quote }},
5-
"name": {{ .role| quote }},
6-
"composite": false,
7-
"clientRole": true,
8-
"containerId": {{ .app.harness.name | quote }},
9-
"attributes": {}
10-
}
2+
{
3+
"id": {{ uuidv4 | quote }},
4+
"name": {{ .role| quote }},
5+
"composite": false,
6+
"clientRole": true,
7+
"containerId": {{ .app.harness.name | quote }},
8+
"attributes": {}
9+
}
1110
{{- end}}
1211
{{- define "deploy_accounts_utils.user" }}
1312
{
14-
"username": {{ .user.username | quote }},
13+
"username": {{ .user.username | default .user.email | quote }},
1514
"email": {{ .user.email | default .user.username | quote }},
1615
"enabled": true,
16+
"firstName": {{ .user.firstName | default "Test" | quote }},
17+
"lastName": {{ .user.lastName | default "User" | quote }},
1718
"credentials": [
1819
{
1920
"type": "password",
20-
"value": {{ .user.passwword | default "test" | quote }}
21+
"value": {{ .user.password | default "test" | quote }}
2122
}
2223
],
2324
"realmRoles": {{ .user.realmRoles | toJson }},
2425
"clientRoles": {
2526
{{ .app.harness.name | quote }}: {{ .user.clientRoles | toJson }}
2627
}
2728
}
28-
{{- end}}
29+
30+
{{- end}}
2931
{
3032
"id": {{ .Values.namespace | quote }},
3133
"realm": {{ .Values.namespace | quote }},
3234
"enabled": true,
33-
"sslRequired": "external",
34-
"loginTheme": "custom",
35-
"accountTheme": "custom",
36-
"adminTheme": "custom",
37-
"emailTheme": "custom",
35+
"sslRequired": {{ ternary "none" "external" (not .Values.tls) | quote }},
36+
"loginTheme": "keycloak",
37+
"accountTheme": "keycloak",
38+
"adminTheme": "keycloak",
39+
"emailTheme": "keycloak",
3840
"registrationAllowed": true,
3941
"registrationEmailAsUsername": false,
4042
"rememberMe": true,
@@ -84,12 +86,18 @@
8486
}
8587
],
8688
"users": [
89+
{{- $j := 0}}
8790
{{- range $app := .Values.apps }}
8891
{{- if (hasKey $app.harness "accounts") }}
92+
{{- if $j}},{{end}}
93+
{{- if len $app.harness.accounts.users}}
94+
{{- $j = add1 $j }}
95+
{{- end }}
8996
{{- range $i, $user := $app.harness.accounts.users }}{{if $i}},{{end}}
9097
{{ include "deploy_accounts_utils.user" (dict "root" $ "app" $app "user" $user) }}
9198
{{- end }}
9299
{{- end }}
100+
93101
{{- end }}
94102
],
95103
"roles": {
@@ -122,14 +130,18 @@
122130
}
123131
],
124132
"client": {
133+
{{- $k := 0}}
125134
{{- range $app := .Values.apps }}
135+
126136
{{- if (hasKey $app.harness "accounts") }}
137+
{{- if $k}},{{end}}
127138
{{ $app.harness.name | quote }}: [
128139
{{- range $i, $role := $app.harness.accounts.roles }}
129140
{{if $i}},{{end}}
130-
{{ include "deploy_accounts_utils.role" (dict "root" $ "app" $app "role" $role) }}
141+
{{- include "deploy_accounts_utils.role" (dict "root" $ "app" $app "role" $role) }}
131142
{{- end }}
132143
]
144+
{{- $k = add1 $k }}
133145
{{- end }}
134146
{{- end }}
135147
}
@@ -752,5 +764,5 @@
752764
}
753765
}
754766
],
755-
"keycloakVersion": "9.0.2"
767+
"keycloakVersion": "26.2.1"
756768
}
107 KB
Binary file not shown.

applications/jupyterlab-minimal/deploy/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
harness:
2-
subdomain: notebooks
2+
subdomain: lab
3+
aliases: [notebooks]
34
service:
45
auto: false
56
port: 80
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit b0839b2e1d902a42955a32a3981823aab36017c7
1+
Subproject commit cf1d3c74f2a30612b37cec515713b8a57f9e13d8
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
harness:
2+
deployment:
3+
image: osb/nwb-explorer:latest

applications/osb-portal/deploy/resources/keycloak.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"realm": {{ .Values.namespace | quote }},
3-
"auth-server-url": {{ (printf "https://%s.%s/auth" .Values.apps.accounts.harness.subdomain .Values.domain) | quote }},
3+
"auth-server-url": {{ (printf "https://%s.%s" .Values.apps.accounts.harness.subdomain .Values.domain) | quote }},
44
"ssl-required": "external",
55
"resource": "web-client",
66
"public-client": true,

applications/osb-portal/deploy/values-minimal.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ harness:
55
- accounts-api
66
- workspaces
77
- jupyterhub
8-
- notifications
98
- nwb-explorer
10-
- netpyne
9+
- jupyterlab-minimal
1110

applications/osb-portal/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
sed -i "s/__DOMAIN__/${CH_ACCOUNTS_AUTH_DOMAIN:-https://accounts.osb.local/auth/}/g" /usr/share/nginx/html/keycloak/keycloak.json
2+
sed -i "s/__DOMAIN__/${CH_ACCOUNTS_AUTH_DOMAIN:-https://accounts.osb.local/}/g" /usr/share/nginx/html/keycloak/keycloak.json
33
sed -i "s/__NAMESPACE__/${CH_ACCOUNTS_REALM:-osb2}/g" /usr/share/nginx/html/keycloak/keycloak.json
44
sed -i "s/__REALM__/${CH_ACCOUNTS_REALM:-osb2}/g" /etc/nginx/nginx.conf
55

applications/osb-portal/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@sentry/react": "^6.3.5",
3737
"assert": "^2.0.0",
3838
"axios": "^1.6.5",
39-
"keycloak-js": "^12.0.0",
39+
"keycloak-js": "^26.0.0",
4040
"less-vars-to-js": "^1.3.0",
4141
"lodash": "^4.17.21",
4242
"markdown-it": "^12.0.0",

0 commit comments

Comments
 (0)