blob: 77656224df8ddb329dcb900dac4e22dc049bc00c [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"
44 tag: "v1.1.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"
50 tag: "v2.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: {
189 version: "v0.7.1-alpha.1"
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: {
249 lifespan: "10m"
gio9bd87ca2025-04-20 08:05:34 +0400250 ui_url: "https://accounts-ui.\(input.network.domain)/register"
gio7fbd4ad2024-08-27 10:06:39 +0400251 after: {
252 password: {
253 hooks: [{
254 hook: "session"
255 }]
256 default_browser_return_url: "https://accounts-ui.\(input.network.domain)/"
257 }
258 }
259 }
260 }
261 }
262 log: {
gio9bd87ca2025-04-20 08:05:34 +0400263 level: "debug"
264 format: "text"
gio7fbd4ad2024-08-27 10:06:39 +0400265 leak_sensitive_values: true
266 }
267 cookies: {
gio9bd87ca2025-04-20 08:05:34 +0400268 path: "/"
gio7fbd4ad2024-08-27 10:06:39 +0400269 same_site: "None"
gio9bd87ca2025-04-20 08:05:34 +0400270 domain: input.network.domain
gio7fbd4ad2024-08-27 10:06:39 +0400271 }
272 secrets: {
273 cookie: ["PLEASE-CHANGE-ME-I-AM-VERY-INSECURE"]
274 }
275 hashers: {
276 argon2: {
277 parallelism: 1
gio9bd87ca2025-04-20 08:05:34 +0400278 memory: "128MB"
279 iterations: 2
gio7fbd4ad2024-08-27 10:06:39 +0400280 salt_length: 16
gio9bd87ca2025-04-20 08:05:34 +0400281 key_length: 16
282 }
gio7fbd4ad2024-08-27 10:06:39 +0400283 }
284 identity: {
285 schemas: [{
gio9bd87ca2025-04-20 08:05:34 +0400286 id: "user"
gio7fbd4ad2024-08-27 10:06:39 +0400287 url: "file:///etc/config/identity.schema.json"
288 }]
289 default_schema_id: "user"
290 }
291 courier: {
292 smtp: {
293 connection_uri: "smtps://test-z1VmkYfYPjgdPRgPFgmeZ31esT9rUgS%40\(input.network.domain):iW%213Kk%5EPPLFrZa%24%21bbpTPN9Wv3b8mvwS6ZJvMLtce%23A2%2A4MotD@mx1.\(input.network.domain)"
294 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400295 }
296 }
gio7fbd4ad2024-08-27 10:06:39 +0400297 identitySchemas: {
298 "identity.schema.json": _userSchema
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400299 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400300 }
301 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400302 hydra: {
gio7fbd4ad2024-08-27 10:06:39 +0400303 fullnameOverride: "hydra"
304 image: {
305 repository: images.hydra.fullName
gio9bd87ca2025-04-20 08:05:34 +0400306 tag: images.hydra.tag
gio7fbd4ad2024-08-27 10:06:39 +0400307 pullPolicy: images.hydra.pullPolicy
308 }
309 service: {
310 admin: {
311 enabled: true
gio9bd87ca2025-04-20 08:05:34 +0400312 type: "ClusterIP"
313 port: 80
314 name: "http"
gio7fbd4ad2024-08-27 10:06:39 +0400315 }
316 public: {
317 enabled: true
gio9bd87ca2025-04-20 08:05:34 +0400318 type: "ClusterIP"
319 port: 80
320 name: "http"
gio7fbd4ad2024-08-27 10:06:39 +0400321 }
322 }
323 ingress: {
324 admin: enabled: false
325 public: {
gio9bd87ca2025-04-20 08:05:34 +0400326 enabled: true
gio7fbd4ad2024-08-27 10:06:39 +0400327 className: input.network.ingressClass
328 annotations: {
329 "acme.cert-manager.io/http01-edit-in-place": "true"
gio9bd87ca2025-04-20 08:05:34 +0400330 "cert-manager.io/cluster-issuer": input.network.certificateIssuer
gio7fbd4ad2024-08-27 10:06:39 +0400331 }
332 hosts: [{
333 host: "hydra.\(input.network.domain)"
334 paths: [{
gio9bd87ca2025-04-20 08:05:34 +0400335 path: "/"
gio7fbd4ad2024-08-27 10:06:39 +0400336 pathType: "Prefix"
337 }]
338 }]
339 tls: [{
340 hosts: ["hydra.\(input.network.domain)"]
341 secretName: "cert-hydra.\(input.network.domain)"
342 }]
343 }
344 }
345 secret: {
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400346 enabled: true
347 }
gio7fbd4ad2024-08-27 10:06:39 +0400348 maester: {
349 enabled: false
350 }
351 hydra: {
352 automigration: {
353 enabled: true
354 }
355 config: {
356 version: "v1.10.6"
gio9bd87ca2025-04-20 08:05:34 +0400357 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 +0400358 serve: {
359 cookies: {
360 same_site_mode: "None"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400361 }
gio7fbd4ad2024-08-27 10:06:39 +0400362 public: {
363 cors: {
gio9bd87ca2025-04-20 08:05:34 +0400364 enabled: true
365 debug: false
gio7fbd4ad2024-08-27 10:06:39 +0400366 allow_credentials: true
367 allowed_origins: [
368 "https://\(input.network.domain)",
gio9bd87ca2025-04-20 08:05:34 +0400369 "https://*.\(input.network.domain)",
370 ]
gio7fbd4ad2024-08-27 10:06:39 +0400371 }
372 }
373 admin: {
374 cors: {
375 allowed_origins: [
gio9bd87ca2025-04-20 08:05:34 +0400376 "https://hydra-admin.\(global.namespacePrefix)core-auth.svc.cluster.local",
377 ]
gio7fbd4ad2024-08-27 10:06:39 +0400378 }
379 tls: {
380 allow_termination_from: [
381 "0.0.0.0/0",
382 "10.42.0.0/16",
383 "10.43.0.0/16",
gio9bd87ca2025-04-20 08:05:34 +0400384 ]
gio7fbd4ad2024-08-27 10:06:39 +0400385 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400386 }
387 tls: {
388 allow_termination_from: [
389 "0.0.0.0/0",
390 "10.42.0.0/16",
391 "10.43.0.0/16",
gio9bd87ca2025-04-20 08:05:34 +0400392 ]
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400393 }
394 }
gio7fbd4ad2024-08-27 10:06:39 +0400395 urls: {
396 self: {
397 public: "https://hydra.\(input.network.domain)"
398 issuer: "https://hydra.\(input.network.domain)"
399 }
400 consent: "https://accounts-ui.\(input.network.domain)/consent"
gio9bd87ca2025-04-20 08:05:34 +0400401 login: "https://accounts-ui.\(input.network.domain)/login"
402 logout: "https://accounts-ui.\(input.network.domain)/logout"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400403 }
gio7fbd4ad2024-08-27 10:06:39 +0400404 secrets: {
405 system: ["youReallyNeedToChangeThis"]
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400406 }
gio7fbd4ad2024-08-27 10:06:39 +0400407 oidc: {
408 subject_identifiers: {
409 supported_types: [
410 "pairwise",
411 "public",
gio9bd87ca2025-04-20 08:05:34 +0400412 ]
gio7fbd4ad2024-08-27 10:06:39 +0400413 pairwise: {
414 salt: "youReallyNeedToChangeThis"
415 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400416 }
417 }
gio7fbd4ad2024-08-27 10:06:39 +0400418 log: {
gio9bd87ca2025-04-20 08:05:34 +0400419 level: "trace"
gio7fbd4ad2024-08-27 10:06:39 +0400420 leak_sensitive_values: false
421 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400422 }
423 }
424 }
gio7fbd4ad2024-08-27 10:06:39 +0400425 ui: {
gio9bd87ca2025-04-20 08:05:34 +0400426 certificateIssuer: input.network.certificateIssuer
427 ingressClassName: input.network.ingressClass
428 domain: input.network.domain
429 hydra: "hydra-admin.\(global.namespacePrefix)core-auth.svc.cluster.local"
gio7fbd4ad2024-08-27 10:06:39 +0400430 enableRegistration: false
gio9bd87ca2025-04-20 08:05:34 +0400431 defaultReturnTo: "https://launcher.\(global.domain)"
gio7fbd4ad2024-08-27 10:06:39 +0400432 image: {
433 repository: images.ui.fullName
gio9bd87ca2025-04-20 08:05:34 +0400434 tag: images.ui.tag
gio7fbd4ad2024-08-27 10:06:39 +0400435 pullPolicy: images.ui.pullPolicy
436 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400437 }
438 }
439 }
440 }
441}