blob: 1caab7f3ad4565a604984be52b6ebd85160427f2 [file] [log] [blame]
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +04001input: {
gio9bd87ca2025-04-20 08:05:34 +04002 network: #Network
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +04003 subdomain: string
4}
5
gio9bd87ca2025-04-20 08:05:34 +04006name: "core-auth"
Giorgi Lekveishvili08af67a2024-01-18 08:53:05 +04007namespace: "core-auth"
8
9_userSchema: ###"""
gio9bd87ca2025-04-20 08:05:34 +040010 {
11 "$id": "https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json",
12 "$schema": "http://json-schema.org/draft-07/schema#",
13 "title": "User",
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040014 "type": "object",
15 "properties": {
gio9bd87ca2025-04-20 08:05:34 +040016 "traits": {
17 "type": "object",
18 "properties": {
19 "username": {
20 "type": "string",
21 "format": "username",
22 "title": "Username",
23 "minLength": 3,
24 "ory.sh/kratos": {
25 "credentials": {
26 "password": {
27 "identifier": true
28 }
29 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040030 }
31 }
gio9bd87ca2025-04-20 08:05:34 +040032 },
33 "additionalProperties": false
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040034 }
gio9bd87ca2025-04-20 08:05:34 +040035 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040036 }
gio9bd87ca2025-04-20 08:05:34 +040037 """###
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040038
gio7fbd4ad2024-08-27 10:06:39 +040039out: {
40 images: {
41 kratos: {
42 repository: "oryd"
gio9bd87ca2025-04-20 08:05:34 +040043 name: "kratos"
gio8e462282026-07-28 15:30:16 +040044 tag: "v26.2.0-distroless"
gio7fbd4ad2024-08-27 10:06:39 +040045 pullPolicy: "IfNotPresent"
46 }
47 hydra: {
48 repository: "oryd"
gio9bd87ca2025-04-20 08:05:34 +040049 name: "hydra"
gio8e462282026-07-28 15:30:16 +040050 tag: "v26.2.0-distroless"
gio7fbd4ad2024-08-27 10:06:39 +040051 pullPolicy: "IfNotPresent"
52 }
53 ui: {
54 repository: "giolekva"
gio9bd87ca2025-04-20 08:05:34 +040055 name: "auth-ui"
56 tag: "latest"
gio7fbd4ad2024-08-27 10:06:39 +040057 pullPolicy: "Always"
58 }
59 postgres: {
60 repository: "library"
gio9bd87ca2025-04-20 08:05:34 +040061 name: "postgres"
62 tag: "15.3"
gio7fbd4ad2024-08-27 10:06:39 +040063 pullPolicy: "IfNotPresent"
64 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040065 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040066
gio7fbd4ad2024-08-27 10:06:39 +040067 charts: {
68 auth: {
gio9bd87ca2025-04-20 08:05:34 +040069 kind: "GitRepository"
gio7fbd4ad2024-08-27 10:06:39 +040070 address: "https://code.v1.dodo.cloud/helm-charts"
gio9bd87ca2025-04-20 08:05:34 +040071 branch: "main"
72 path: "charts/auth"
gio7fbd4ad2024-08-27 10:06:39 +040073 }
74 postgres: {
gio9bd87ca2025-04-20 08:05:34 +040075 kind: "GitRepository"
gio7fbd4ad2024-08-27 10:06:39 +040076 address: "https://code.v1.dodo.cloud/helm-charts"
gio9bd87ca2025-04-20 08:05:34 +040077 branch: "main"
78 path: "charts/postgresql"
gio7fbd4ad2024-08-27 10:06:39 +040079 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040080 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040081
gio7fbd4ad2024-08-27 10:06:39 +040082 helm: {
83 postgres: {
84 chart: charts.postgres
85 values: {
86 fullnameOverride: "postgres"
87 image: {
gio9bd87ca2025-04-20 08:05:34 +040088 registry: images.postgres.registry
gio7fbd4ad2024-08-27 10:06:39 +040089 repository: images.postgres.imageName
gio9bd87ca2025-04-20 08:05:34 +040090 tag: images.postgres.tag
gio7fbd4ad2024-08-27 10:06:39 +040091 pullPolicy: images.postgres.pullPolicy
92 }
93 service: {
94 type: "ClusterIP"
95 port: 5432
96 }
97 primary: {
98 initdb: {
99 scripts: {
100 "init.sql": """
101 CREATE USER kratos WITH PASSWORD 'kratos';
102 CREATE USER hydra WITH PASSWORD 'hydra';
103 CREATE DATABASE kratos WITH OWNER = kratos;
104 CREATE DATABASE hydra WITH OWNER = hydra;
105 """
106 }
107 }
108 persistence: {
109 size: "1Gi"
110 }
111 securityContext: {
112 enabled: true
113 fsGroup: 0
114 }
115 containerSecurityContext: {
gio9bd87ca2025-04-20 08:05:34 +0400116 enabled: true
gio7fbd4ad2024-08-27 10:06:39 +0400117 runAsUser: 0
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400118 }
119 }
gio7fbd4ad2024-08-27 10:06:39 +0400120 volumePermissions: {
121 securityContext: {
122 runAsUser: 0
123 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400124 }
125 }
126 }
gio7fbd4ad2024-08-27 10:06:39 +0400127 auth: {
128 chart: charts.auth
129 dependsOn: [{
gio9bd87ca2025-04-20 08:05:34 +0400130 name: "postgres"
gio7fbd4ad2024-08-27 10:06:39 +0400131 namespace: release.namespace
132 }]
133 values: {
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400134 kratos: {
gio7fbd4ad2024-08-27 10:06:39 +0400135 fullnameOverride: "kratos"
136 image: {
137 repository: images.kratos.fullName
gio9bd87ca2025-04-20 08:05:34 +0400138 tag: images.kratos.tag
gio7fbd4ad2024-08-27 10:06:39 +0400139 pullPolicy: images.kratos.pullPolicy
140 }
141 service: {
142 admin: {
143 enabled: true
gio9bd87ca2025-04-20 08:05:34 +0400144 type: "ClusterIP"
145 port: 80
146 name: "http"
gio7fbd4ad2024-08-27 10:06:39 +0400147 }
148 public: {
149 enabled: true
gio9bd87ca2025-04-20 08:05:34 +0400150 type: "ClusterIP"
151 port: 80
152 name: "http"
gio7fbd4ad2024-08-27 10:06:39 +0400153 }
154 }
155 ingress: {
156 admin: enabled: false
157 public: {
gio9bd87ca2025-04-20 08:05:34 +0400158 enabled: true
gio7fbd4ad2024-08-27 10:06:39 +0400159 className: input.network.ingressClass
160 annotations: {
161 "acme.cert-manager.io/http01-edit-in-place": "true"
gio9bd87ca2025-04-20 08:05:34 +0400162 "cert-manager.io/cluster-issuer": input.network.certificateIssuer
gio7fbd4ad2024-08-27 10:06:39 +0400163 }
164 hosts: [{
165 host: "accounts.\(input.network.domain)"
166 paths: [{
gio9bd87ca2025-04-20 08:05:34 +0400167 path: "/"
gio7fbd4ad2024-08-27 10:06:39 +0400168 pathType: "Prefix"
169 }]
170 }]
171 tls: [{
172 hosts: ["accounts.\(input.network.domain)"]
173 secretName: "cert-accounts.\(input.network.domain)"
174 }]
175 }
176 }
177 secret: {
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400178 enabled: true
179 }
gio7fbd4ad2024-08-27 10:06:39 +0400180 kratos: {
181 automigration: {
182 enabled: true
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400183 }
gio7fbd4ad2024-08-27 10:06:39 +0400184 development: false
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400185 courier: {
gio7fbd4ad2024-08-27 10:06:39 +0400186 enabled: false
187 }
188 config: {
gio8e462282026-07-28 15:30:16 +0400189 version: "v26.2.0"
gio9bd87ca2025-04-20 08:05:34 +0400190 dsn: "postgres://kratos:kratos@postgres.\(global.namespacePrefix)core-auth.svc:5432/kratos?sslmode=disable&max_conns=20&max_idle_conns=4"
gio7fbd4ad2024-08-27 10:06:39 +0400191 serve: {
192 public: {
193 base_url: "https://accounts.\(input.network.domain)"
194 cors: {
gio9bd87ca2025-04-20 08:05:34 +0400195 enabled: true
196 debug: false
gio7fbd4ad2024-08-27 10:06:39 +0400197 allow_credentials: true
198 allowed_origins: [
199 "https://\(input.network.domain)",
200 "https://*.\(input.network.domain)",
gio9bd87ca2025-04-20 08:05:34 +0400201 ]
gio7fbd4ad2024-08-27 10:06:39 +0400202 }
203 }
204 admin: {
205 base_url: "https://kratos-admin.\(global.namespacePrefix)core-auth.svc.cluster.local"
206 }
207 }
208 selfservice: {
209 default_browser_return_url: "https://accounts-ui.\(input.network.domain)"
210 allowed_return_urls: [
211 "https://*.\(input.network.domain)/",
212 // TODO(gio): replace with input.network.privateSubdomain
213 "https://*.\(global.privateDomain)",
214 ]
215 methods: {
216 password: {
217 enabled: true
218 }
219 }
220 flows: {
221 error: {
222 ui_url: "https://accounts-ui.\(input.network.domain)/error"
223 }
224 settings: {
gio9bd87ca2025-04-20 08:05:34 +0400225 ui_url: "https://accounts-ui.\(input.network.domain)/settings"
gio7fbd4ad2024-08-27 10:06:39 +0400226 privileged_session_max_age: "15m"
227 }
228 recovery: {
229 enabled: false
230 }
231 verification: {
232 enabled: false
233 }
234 logout: {
235 after: {
236 default_browser_return_url: "https://accounts-ui.\(input.network.domain)/login"
237 }
238 }
239 login: {
gio9bd87ca2025-04-20 08:05:34 +0400240 ui_url: "https://accounts-ui.\(input.network.domain)/login"
gio7fbd4ad2024-08-27 10:06:39 +0400241 lifespan: "10m"
242 after: {
243 password: {
244 default_browser_return_url: "https://accounts-ui.\(input.network.domain)/"
245 }
246 }
247 }
248 registration: {
gio8e462282026-07-28 15:30:16 +0400249 style: "unified"
gio7fbd4ad2024-08-27 10:06:39 +0400250 lifespan: "10m"
gio9bd87ca2025-04-20 08:05:34 +0400251 ui_url: "https://accounts-ui.\(input.network.domain)/register"
gio7fbd4ad2024-08-27 10:06:39 +0400252 after: {
253 password: {
254 hooks: [{
255 hook: "session"
256 }]
257 default_browser_return_url: "https://accounts-ui.\(input.network.domain)/"
258 }
259 }
260 }
261 }
262 }
263 log: {
gio9bd87ca2025-04-20 08:05:34 +0400264 level: "debug"
265 format: "text"
gio7fbd4ad2024-08-27 10:06:39 +0400266 leak_sensitive_values: true
267 }
268 cookies: {
gio9bd87ca2025-04-20 08:05:34 +0400269 path: "/"
gio7fbd4ad2024-08-27 10:06:39 +0400270 same_site: "None"
gio9bd87ca2025-04-20 08:05:34 +0400271 domain: input.network.domain
gio7fbd4ad2024-08-27 10:06:39 +0400272 }
273 secrets: {
274 cookie: ["PLEASE-CHANGE-ME-I-AM-VERY-INSECURE"]
275 }
276 hashers: {
277 argon2: {
278 parallelism: 1
gio9bd87ca2025-04-20 08:05:34 +0400279 memory: "128MB"
280 iterations: 2
gio7fbd4ad2024-08-27 10:06:39 +0400281 salt_length: 16
gio9bd87ca2025-04-20 08:05:34 +0400282 key_length: 16
283 }
gio7fbd4ad2024-08-27 10:06:39 +0400284 }
285 identity: {
286 schemas: [{
gio9bd87ca2025-04-20 08:05:34 +0400287 id: "user"
gio7fbd4ad2024-08-27 10:06:39 +0400288 url: "file:///etc/config/identity.schema.json"
289 }]
290 default_schema_id: "user"
291 }
292 courier: {
293 smtp: {
294 connection_uri: "smtps://test-z1VmkYfYPjgdPRgPFgmeZ31esT9rUgS%40\(input.network.domain):iW%213Kk%5EPPLFrZa%24%21bbpTPN9Wv3b8mvwS6ZJvMLtce%23A2%2A4MotD@mx1.\(input.network.domain)"
295 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400296 }
297 }
gio7fbd4ad2024-08-27 10:06:39 +0400298 identitySchemas: {
299 "identity.schema.json": _userSchema
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400300 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400301 }
302 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400303 hydra: {
gio7fbd4ad2024-08-27 10:06:39 +0400304 fullnameOverride: "hydra"
305 image: {
306 repository: images.hydra.fullName
gio9bd87ca2025-04-20 08:05:34 +0400307 tag: images.hydra.tag
gio7fbd4ad2024-08-27 10:06:39 +0400308 pullPolicy: images.hydra.pullPolicy
309 }
310 service: {
311 admin: {
312 enabled: true
gio9bd87ca2025-04-20 08:05:34 +0400313 type: "ClusterIP"
314 port: 80
315 name: "http"
gio7fbd4ad2024-08-27 10:06:39 +0400316 }
317 public: {
318 enabled: true
gio9bd87ca2025-04-20 08:05:34 +0400319 type: "ClusterIP"
320 port: 80
321 name: "http"
gio7fbd4ad2024-08-27 10:06:39 +0400322 }
323 }
324 ingress: {
325 admin: enabled: false
326 public: {
gio9bd87ca2025-04-20 08:05:34 +0400327 enabled: true
gio7fbd4ad2024-08-27 10:06:39 +0400328 className: input.network.ingressClass
329 annotations: {
330 "acme.cert-manager.io/http01-edit-in-place": "true"
gio9bd87ca2025-04-20 08:05:34 +0400331 "cert-manager.io/cluster-issuer": input.network.certificateIssuer
gio7fbd4ad2024-08-27 10:06:39 +0400332 }
333 hosts: [{
334 host: "hydra.\(input.network.domain)"
335 paths: [{
gio9bd87ca2025-04-20 08:05:34 +0400336 path: "/"
gio7fbd4ad2024-08-27 10:06:39 +0400337 pathType: "Prefix"
338 }]
339 }]
340 tls: [{
341 hosts: ["hydra.\(input.network.domain)"]
342 secretName: "cert-hydra.\(input.network.domain)"
343 }]
344 }
345 }
346 secret: {
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400347 enabled: true
348 }
gio7fbd4ad2024-08-27 10:06:39 +0400349 maester: {
350 enabled: false
351 }
352 hydra: {
353 automigration: {
354 enabled: true
355 }
356 config: {
gio8e462282026-07-28 15:30:16 +0400357 version: "v26.2.0"
gio9bd87ca2025-04-20 08:05:34 +0400358 dsn: "postgres://hydra:hydra@postgres.\(global.namespacePrefix)core-auth.svc:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4"
gio7fbd4ad2024-08-27 10:06:39 +0400359 serve: {
360 cookies: {
361 same_site_mode: "None"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400362 }
gio7fbd4ad2024-08-27 10:06:39 +0400363 public: {
364 cors: {
gio9bd87ca2025-04-20 08:05:34 +0400365 enabled: true
366 debug: false
gio7fbd4ad2024-08-27 10:06:39 +0400367 allow_credentials: true
368 allowed_origins: [
369 "https://\(input.network.domain)",
gio9bd87ca2025-04-20 08:05:34 +0400370 "https://*.\(input.network.domain)",
371 ]
gio7fbd4ad2024-08-27 10:06:39 +0400372 }
373 }
374 admin: {
375 cors: {
376 allowed_origins: [
gio9bd87ca2025-04-20 08:05:34 +0400377 "https://hydra-admin.\(global.namespacePrefix)core-auth.svc.cluster.local",
378 ]
gio7fbd4ad2024-08-27 10:06:39 +0400379 }
380 tls: {
381 allow_termination_from: [
382 "0.0.0.0/0",
383 "10.42.0.0/16",
384 "10.43.0.0/16",
gio9bd87ca2025-04-20 08:05:34 +0400385 ]
gio7fbd4ad2024-08-27 10:06:39 +0400386 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400387 }
388 tls: {
389 allow_termination_from: [
390 "0.0.0.0/0",
391 "10.42.0.0/16",
392 "10.43.0.0/16",
gio9bd87ca2025-04-20 08:05:34 +0400393 ]
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400394 }
395 }
gio7fbd4ad2024-08-27 10:06:39 +0400396 urls: {
397 self: {
398 public: "https://hydra.\(input.network.domain)"
399 issuer: "https://hydra.\(input.network.domain)"
400 }
401 consent: "https://accounts-ui.\(input.network.domain)/consent"
gio9bd87ca2025-04-20 08:05:34 +0400402 login: "https://accounts-ui.\(input.network.domain)/login"
403 logout: "https://accounts-ui.\(input.network.domain)/logout"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400404 }
gio7fbd4ad2024-08-27 10:06:39 +0400405 secrets: {
406 system: ["youReallyNeedToChangeThis"]
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400407 }
gio7fbd4ad2024-08-27 10:06:39 +0400408 oidc: {
409 subject_identifiers: {
410 supported_types: [
411 "pairwise",
412 "public",
gio9bd87ca2025-04-20 08:05:34 +0400413 ]
gio7fbd4ad2024-08-27 10:06:39 +0400414 pairwise: {
415 salt: "youReallyNeedToChangeThis"
416 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400417 }
418 }
gio7fbd4ad2024-08-27 10:06:39 +0400419 log: {
gio9bd87ca2025-04-20 08:05:34 +0400420 level: "trace"
gio7fbd4ad2024-08-27 10:06:39 +0400421 leak_sensitive_values: false
422 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400423 }
424 }
425 }
gio7fbd4ad2024-08-27 10:06:39 +0400426 ui: {
gio9bd87ca2025-04-20 08:05:34 +0400427 certificateIssuer: input.network.certificateIssuer
428 ingressClassName: input.network.ingressClass
429 domain: input.network.domain
430 hydra: "hydra-admin.\(global.namespacePrefix)core-auth.svc.cluster.local"
gio7fbd4ad2024-08-27 10:06:39 +0400431 enableRegistration: false
gio9bd87ca2025-04-20 08:05:34 +0400432 defaultReturnTo: "https://launcher.\(global.domain)"
gio7fbd4ad2024-08-27 10:06:39 +0400433 image: {
434 repository: images.ui.fullName
gio9bd87ca2025-04-20 08:05:34 +0400435 tag: images.ui.tag
gio7fbd4ad2024-08-27 10:06:39 +0400436 pullPolicy: images.ui.pullPolicy
437 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400438 }
439 }
440 }
441 }
442}