|
1 | | -{{- define "deploy_accounts_utils.role" }} |
2 | | - { |
3 | | - "id": {{ uuidv4 | quote }}, |
4 | | - "name": {{ .role| quote }}, |
5 | | - "composite": false, |
6 | | - "clientRole": true, |
7 | | - "containerId": {{ .app.harness.name | quote }}, |
8 | | - "attributes": {} |
9 | | - } |
10 | | -{{- end}} |
11 | | -{{- define "deploy_accounts_utils.user" }} |
12 | | - { |
13 | | - "username": {{ .user.username | default .user.email | quote }}, |
14 | | - "email": {{ .user.email | default .user.username | quote }}, |
15 | | - "enabled": true, |
16 | | - "firstName": {{ .user.firstName | default "Test" | quote }}, |
17 | | - "lastName": {{ .user.lastName | default "User" | quote }}, |
18 | | - "credentials": [ |
19 | | - { |
20 | | - "type": "password", |
21 | | - "value": {{ .user.password | default "test" | quote }} |
22 | | - } |
23 | | - ], |
24 | | - "realmRoles": {{ .user.realmRoles | toJson }}, |
25 | | - "clientRoles": { |
26 | | - {{ .app.harness.name | quote }}: {{ .user.clientRoles | toJson }} |
27 | | - } |
28 | | - } |
29 | | - |
30 | | -{{- end}} |
31 | 1 | { |
32 | 2 | "id": {{ .Values.namespace | quote }}, |
33 | 3 | "realm": {{ .Values.namespace | quote }}, |
34 | 4 | "enabled": true, |
35 | 5 | "sslRequired": {{ ternary "none" "external" (not .Values.tls) | quote }}, |
36 | | - "loginTheme": "keycloak", |
37 | | - "accountTheme": "keycloak", |
38 | | - "adminTheme": "keycloak", |
39 | | - "emailTheme": "keycloak", |
40 | | - "registrationAllowed": true, |
41 | | - "registrationEmailAsUsername": false, |
| 6 | + "loginTheme": {{ .Values.apps.accounts.theme.login | default "keycloak" | quote }}, |
| 7 | + "accountTheme": {{ .Values.apps.accounts.theme.account | default "keycloak" | quote }}, |
| 8 | + "adminTheme": {{ .Values.apps.accounts.theme.admiin | default "keycloak" | quote }}, |
| 9 | + "emailTheme": {{ .Values.apps.accounts.theme.email | default "keycloak" | quote }}, |
| 10 | + "registrationAllowed": {{ .Values.apps.accounts.registrationAllowed | default true }}, |
| 11 | + "registrationEmailAsUsername": {{ .Values.apps.accounts.registrationEmailAsUsername | default false }}, |
42 | 12 | "rememberMe": true, |
43 | 13 | "verifyEmail": false, |
44 | 14 | "loginWithEmailAllowed": true, |
45 | 15 | "duplicateEmailsAllowed": false, |
46 | 16 | "resetPasswordAllowed": true, |
47 | | - "editUsernameAllowed": true, |
48 | | - "components": { |
49 | | - "org.keycloak.userprofile.UserProfileProvider": [ |
50 | | - { |
51 | | - "id": "002b69df-9702-40dd-b73e-3a66d161bf11", |
52 | | - "providerId": "declarative-user-profile", |
53 | | - "subComponents": {}, |
54 | | - "config": { |
55 | | - "kc.user.profile.config": [ |
56 | | - "{\"attributes\":[{\"name\":\"username\",\"displayName\":\"${username}\",\"validations\":{\"length\":{\"min\":3,\"max\":255},\"username-prohibited-characters\":{},\"up-username-not-idn-homograph\":{}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"email\",\"displayName\":\"${email}\",\"validations\":{\"email\":{},\"length\":{\"max\":255}},\"annotations\":{},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"firstName\",\"displayName\":\"${firstName}\",\"validations\":{\"length\":{\"max\":255},\"person-name-prohibited-characters\":{}},\"annotations\":{},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"lastName\",\"displayName\":\"${lastName}\",\"validations\":{\"length\":{\"max\":255},\"person-name-prohibited-characters\":{}},\"annotations\":{},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false}],\"groups\":[{\"name\":\"user-metadata\",\"displayHeader\":\"User metadata\",\"displayDescription\":\"Attributes, which refer to user metadata\"}]}" |
57 | | - ] |
58 | | - } |
59 | | - } |
60 | | - ], |
61 | | - "org.keycloak.keys.KeyProvider": [ |
62 | | - { |
63 | | - "id": "e632ce46-36ad-421a-b1a5-776383cc1565", |
64 | | - "name": "rsa-generated", |
65 | | - "providerId": "rsa-generated", |
66 | | - "subComponents": {}, |
67 | | - "config": { |
68 | | - "priority": [ |
69 | | - "100" |
70 | | - ] |
71 | | - } |
72 | | - }, |
73 | | - { |
74 | | - "id": "b68bee45-a8f0-46ca-b7d9-0df90189736a", |
75 | | - "name": "hmac-generated-hs512", |
76 | | - "providerId": "hmac-generated", |
77 | | - "subComponents": {}, |
78 | | - "config": { |
79 | | - "priority": [ |
80 | | - "100" |
81 | | - ], |
82 | | - "algorithm": [ |
83 | | - "HS512" |
84 | | - ] |
85 | | - } |
86 | | - }, |
87 | | - { |
88 | | - "id": "55960a57-af77-4f4c-8b6e-925c74bb44db", |
89 | | - "name": "aes-generated", |
90 | | - "providerId": "aes-generated", |
91 | | - "subComponents": {}, |
92 | | - "config": { |
93 | | - "priority": [ |
94 | | - "100" |
95 | | - ] |
96 | | - } |
97 | | - }, |
98 | | - { |
99 | | - "id": "ce068675-5cae-434e-851f-09f653ccc604", |
100 | | - "name": "rsa-enc-generated", |
101 | | - "providerId": "rsa-enc-generated", |
102 | | - "subComponents": {}, |
103 | | - "config": { |
104 | | - "priority": [ |
105 | | - "100" |
106 | | - ], |
107 | | - "algorithm": [ |
108 | | - "RSA-OAEP" |
109 | | - ] |
110 | | - } |
111 | | - } |
112 | | - ] |
113 | | - }, |
114 | | - "users": [ |
115 | | - {{- $j := 0}} |
116 | | - {{- range $app := .Values.apps }} |
117 | | - {{- if (hasKey $app.harness "accounts") }} |
118 | | - {{- if $j}},{{end}} |
119 | | - {{- if $app.harness.accounts.users}} |
120 | | - {{- $j = add1 $j }} |
121 | | - {{- end }} |
122 | | - {{- range $i, $user := $app.harness.accounts.users }}{{if $i}},{{end}} |
123 | | - {{ include "deploy_accounts_utils.user" (dict "root" $ "app" $app "user" $user) }} |
124 | | - {{- end }} |
125 | | - {{- end }} |
126 | | - |
127 | | - {{- end }} |
128 | | - ], |
129 | | - "roles": { |
130 | | - "realm": [ |
131 | | - { |
132 | | - "id": "70835ad6-1454-4bc5-86a4-f1597e776b75", |
133 | | - "name": {{ .Values.apps.accounts.admin.role | quote }}, |
134 | | - "composite": false, |
135 | | - "clientRole": false, |
136 | | - "containerId": {{ .Values.namespace | quote }}, |
137 | | - "attributes": {} |
138 | | - }, |
139 | | - { |
140 | | - "id": "498353dd-88eb-4a5e-99b8-d912e0f20f23", |
141 | | - "name": "uma_authorization", |
142 | | - "description": "${role_uma_authorization}", |
143 | | - "composite": false, |
144 | | - "clientRole": false, |
145 | | - "containerId": {{ .Values.namespace | quote }}, |
146 | | - "attributes": {} |
147 | | - }, |
148 | | - { |
149 | | - "id": "f99970f1-958b-4bb8-8b39-0d7498b0ecc4", |
150 | | - "name": "offline_access", |
151 | | - "description": "${role_offline-access}", |
152 | | - "composite": false, |
153 | | - "clientRole": false, |
154 | | - "containerId": {{ .Values.namespace | quote }}, |
155 | | - "attributes": {} |
156 | | - } |
157 | | - ], |
158 | | - "client": { |
159 | | - {{- $k := 0}} |
160 | | - {{- range $app := .Values.apps }} |
161 | | - |
162 | | - {{- if (hasKey $app.harness "accounts") }} |
163 | | - {{- if $k}},{{end}} |
164 | | - {{ $app.harness.name | quote }}: [ |
165 | | - {{- range $i, $role := $app.harness.accounts.roles }} |
166 | | - {{if $i}},{{end}} |
167 | | - {{- include "deploy_accounts_utils.role" (dict "root" $ "app" $app "role" $role) }} |
168 | | - {{- end }} |
169 | | - ] |
170 | | - {{- $k = add1 $k }} |
171 | | - {{- end }} |
172 | | - {{- end }} |
173 | | - } |
174 | | - }, |
| 17 | + "editUsernameAllowed": {{ .Values.apps.accounts.editUsernameAllowed }}, |
| 18 | + {{- include "deploy_accounts_utils.events" (dict "app" .Values.apps.accounts) | indent 8 -}} |
| 19 | + {{- include "deploy_accounts_utils.identity_providers" (dict "app" .Values.apps.accounts) | indent 8 -}} |
| 20 | + {{- include "deploy_accounts_utils.components" . | indent 8 -}} |
| 21 | + {{- include "deploy_accounts_utils.users_roles" (dict "Values" .Values) | indent 8 -}} |
175 | 22 | "clientScopeMappings": { |
176 | 23 | "account": [ |
177 | 24 | { |
|
775 | 622 | "jsonType.label": "String" |
776 | 623 | } |
777 | 624 | }, |
| 625 | + { |
| 626 | + "id": "0b8d0cf7-eebc-4c51-892e-2b65212856b4", |
| 627 | + "name": "sub", |
| 628 | + "protocol": "openid-connect", |
| 629 | + "protocolMapper": "oidc-sub-mapper", |
| 630 | + "consentRequired": false, |
| 631 | + "config": { |
| 632 | + "introspection.token.claim": "true", |
| 633 | + "access.token.claim": "true" |
| 634 | + } |
| 635 | + }, |
778 | 636 | { |
779 | 637 | "id": "3d763f84-d417-4b4e-99e4-2b0e05bf861a", |
780 | 638 | "name": "family name", |
|
0 commit comments