Skip to content

Commit b5c4b47

Browse files
committed
Update schema and ory elements
1 parent c11435a commit b5c4b47

9 files changed

Lines changed: 78 additions & 371 deletions

File tree

docker-compose.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ services:
99
target: /var/lib/sqlite
1010
read_only: false
1111
- type: bind
12-
source: ./schemas/kratos/email-password
13-
target: /etc/config/kratos
14-
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
12+
source: ./schemas/kratos
13+
target: /opt/kratos
14+
command: -c /opt/kratos/kratos.yml migrate sql -e --yes
1515
restart: on-failure
1616
networks:
1717
- intranet
@@ -27,15 +27,15 @@ services:
2727
environment:
2828
- DSN=sqlite:///var/lib/sqlite/db.sqlite?_fk=true
2929
- LOG_LEVEL=trace
30-
command: serve -c /etc/config/kratos/kratos.yml --dev --watch-courier --sqa-opt-out
30+
command: serve -c /opt/kratos/kratos.yml --dev --watch-courier --sqa-opt-out
3131
volumes:
3232
- type: volume
3333
source: kratos-sqlite
3434
target: /var/lib/sqlite
3535
read_only: false
3636
- type: bind
37-
source: ./schemas/kratos/email-password
38-
target: /etc/config/kratos
37+
source: ./schemas/kratos
38+
target: /opt/kratos/
3939
networks:
4040
- intranet
4141

schemas/kratos/all-strategies/kratos.yml

Lines changed: 0 additions & 120 deletions
This file was deleted.

schemas/kratos/email-password/identity.schema.json

Lines changed: 0 additions & 49 deletions
This file was deleted.

schemas/kratos/all-strategies/identity.schema.json renamed to schemas/kratos/identity.user.schema.json

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$id": "https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json",
2+
"$id": "https://pigiot.net/identity.user.schema.json",
33
"$schema": "http://json-schema.org/draft-07/schema#",
4-
"title": "Person",
4+
"title": "User",
55
"type": "object",
66
"properties": {
77
"traits": {
@@ -20,6 +20,9 @@
2020
"webauthn": {
2121
"identifier": true
2222
},
23+
"totp": {
24+
"account_name": true
25+
},
2326
"code": {
2427
"identifier": true,
2528
"via": "email"
@@ -36,6 +39,12 @@
3639
}
3740
}
3841
},
42+
"phone": {
43+
"type": "string",
44+
"format": "tel",
45+
"title": "Phone Number",
46+
"maxLength": 20
47+
},
3948
"name": {
4049
"type": "object",
4150
"properties": {
@@ -48,9 +57,15 @@
4857
"type": "string"
4958
}
5059
}
60+
},
61+
"subscribed": {
62+
"type": "boolean",
63+
"title": "Subscribe to email updates"
5164
}
5265
},
53-
"required": ["email"],
66+
"required": [
67+
"email"
68+
],
5469
"additionalProperties": false
5570
}
5671
}
Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,30 +100,36 @@ log:
100100
leak_sensitive_values: true
101101

102102
secrets:
103+
default:
104+
- 32-LONG-SECRET-NOT-SECURE-AT-ALL
103105
cookie:
104-
- PLEASE-CHANGE-ME-I-AM-VERY-INSECURE
106+
- 32-LONG-SECRET-NOT-SECURE-AT-ALL
105107
cipher:
106108
- 32-LONG-SECRET-NOT-SECURE-AT-ALL
107109

108110
ciphers:
109111
algorithm: xchacha20-poly1305
110112

111113
hashers:
112-
algorithm: bcrypt
113-
bcrypt:
114-
cost: 8
114+
algorithm: argon2
115+
argon2:
116+
memory: 384MB
117+
iterations: 3
118+
parallelism: 16
119+
salt_length: 16
120+
key_length: 32
121+
expected_duration: 500ms
122+
expected_deviation: 500ms
123+
dedicated_memory: 1GB
115124

116125
identity:
117-
default_schema_id: default
126+
default_schema_id: user
118127
schemas:
119-
- id: default
120-
url: file:///etc/config/kratos/identity.schema.json
128+
- id: user
129+
url: file:///opt/kratos/identity.user.schema.json
121130

122131
courier:
123132
smtp:
124133
connection_uri: smtps://test:test@mailslurper:1025/?skip_ssl_verify=true
125134

126-
feature_flags:
127-
use_continue_with_transitions: false
128-
129135
sqa-opt-out: true

schemas/oathkeeper/access-rules.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

schemas/oathkeeper/id_token.jwks.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)