Skip to content

Commit

Permalink
updates kratos, updates chart
Browse files Browse the repository at this point in the history
  • Loading branch information
timbastin committed Nov 28, 2024
1 parent a0940f0 commit 81d1d82
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 60 deletions.
13 changes: 8 additions & 5 deletions .kratos/identity.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"type": "object",
"properties": {
"traits": {
"required": [
"email"
],
"additionalProperties": false,
"type": "object",
"properties": {
"email": {
Expand All @@ -17,6 +21,9 @@
"password": {
"identifier": true
},
"passkey": {
"display_name": true
},
"webauthn": {
"identifier": true
}
Expand All @@ -42,11 +49,7 @@
}
}
}
},
"required": [
"email"
],
"additionalProperties": false
}
}
}
}
2 changes: 1 addition & 1 deletion charts/devguard/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.5.8
version: 0.5.9

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
118 changes: 68 additions & 50 deletions charts/devguard/templates/kratos/kratos-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,59 @@ data:
{{- $publicUrl := (index .Values.web.ingress.hosts 0).host }}
identity.schema.json: |
{
"$id": "https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"title": "E-Mail",
"minLength": 3,
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
},
"webauthn": {
"identifier": true
}
},
"verification": {
"via": "email"
},
"recovery": {
"via": "email"
}
}
},
"name": {
"type": "object",
"properties": {
"first": {
"title": "First Name",
"type": "string"
},
"last": {
"title": "Last Name",
"type": "string"
}
}
}
},
"required": [
"email"
],
"additionalProperties": false
}
}
"$id": "https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"required": [
"email"
],
"additionalProperties": false,
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"title": "E-Mail",
"minLength": 3,
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
},
"passkey": {
"display_name": true
},
"webauthn": {
"identifier": true
}
},
"verification": {
"via": "email"
},
"recovery": {
"via": "email"
}
}
},
"name": {
"type": "object",
"properties": {
"first": {
"title": "First Name",
"type": "string"
},
"last": {
"title": "Last Name",
"type": "string"
}
}
}
}
}
}
}
kratos.yml: |
Expand Down Expand Up @@ -92,6 +95,15 @@ data:
- user:email
- read:user
{{- end}}
passkey:
enabled: true
config:
rp:
id: {{ index (splitList "." $publicUrl) (sub (len (splitList "." $publicUrl)) 2) }}.{{ index (splitList "." $publicUrl) (sub (len (splitList "." $publicUrl)) 1) }}
origins:
- https://{{ $publicUrl }}
display_name: DevGuard
webauthn:
enabled: true
config:
Expand Down Expand Up @@ -152,4 +164,10 @@ data:
oidc:
hooks:
- hook: session
passkey:
hooks:
- hook: session
webauthn:
hooks:
- hook: session
4 changes: 2 additions & 2 deletions charts/devguard/templates/kratos/kratos-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
spec:
initContainers:
- name: kratos-automigrate
image: "oryd/kratos:v1.1.0-distroless"
image: "oryd/kratos:v1.3.1-distroless"
imagePullPolicy: IfNotPresent
command: ["kratos"]
args: ["migrate", "sql", "-e", "--yes", "--config", "/etc/config/kratos.yml"]
Expand Down Expand Up @@ -72,7 +72,7 @@ spec:
path: "identity.schema.json"
containers:
- name: kratos
image: "oryd/kratos:v1.1.0-distroless"
image: "oryd/kratos:v1.3.1-distroless"
imagePullPolicy: IfNotPresent
command:
- kratos
Expand Down
7 changes: 5 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
- ./initdb.sql:/docker-entrypoint-initdb.d/init.sql

kratos-migrate:
image: oryd/kratos:v1.1.0
image: oryd/kratos:v1.3.1
depends_on:
- postgresql
environment:
Expand All @@ -28,7 +28,10 @@ services:
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes

kratos:
image: oryd/kratos:v1.1.0
# build:
# context: ../kratos
# dockerfile: ../kratos/.docker/Dockerfile-build
image: oryd/kratos:v1.3.1
depends_on:
- kratos-migrate
- postgresql
Expand Down

0 comments on commit 81d1d82

Please sign in to comment.