-
Notifications
You must be signed in to change notification settings - Fork 2
/
charmcraft.yaml
270 lines (267 loc) · 8.06 KB
/
charmcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# Copyright 2022 Canonical Ltd.
# See LICENSE file for licensing details.
name: kratos
type: charm
description: |
Charmed Ory Kratos
summary: |
Identity and user management system
links:
documentation: https://discourse.charmhub.io/t/kratos-docs-index/12136
source: https://github.com/canonical/kratos-operator
issues: https://github.com/canonical/kratos-operator/issues
containers:
kratos:
resource: oci-image
resources:
oci-image:
type: oci-image
description: Kratos oci-image
upstream-source: ghcr.io/canonical/kratos:1.1.0
requires:
pg-database:
interface: postgresql_client
optional: false
public-ingress:
interface: ingress
admin-ingress:
interface: ingress
kratos-external-idp:
interface: external_provider
hydra-endpoint-info:
interface: hydra_endpoints
limit: 1
ui-endpoint-info:
interface: login_ui_endpoints
limit: 1
logging:
interface: loki_push_api
tracing:
interface: tracing
limit: 1
description: |
Provides traces to COS Tempo instance
smtp:
interface: smtp
limit: 1
internal-ingress:
interface: traefik_route
limit: 1
description: |
Ingress used for cross-cluster communication where network topology is more complex
than just one k8s cluster
receive-ca-cert:
interface: certificate_transfer
description: |
Receive a CA cert.
This relation can be used with a local CA to obtain the CA cert that was used to sign proxied
endpoints.
peers:
kratos-peers:
interface: kratos-peers
provides:
kratos-info:
interface: kratos_info
description: |
Provides kratos deployment info to a related application
metrics-endpoint:
interface: prometheus_scrape
description: |
Provides application metrics to COS Prometheus instance
grafana-dashboard:
description: |
Forwards the built-in grafana dashboard(s) for monitoring kratos.
interface: grafana_dashboard
config:
options:
http_proxy:
description: URL of the HTTP proxy eg http://proxy.internal:6666, it will set the HTTP_PROXY var in the workload environment
type: string
default: ''
https_proxy:
description: URL of the HTTPS proxy eg http://proxy.internal:6666, it will set the HTTPS_PROXY var in the workload environment
type: string
default: ''
no_proxy:
description: Domains that need to be excluded from proxying no_proxy="test.com,test.co.uk", it is a comma separate list
type: string
default: ''
dev:
description: Run Kratos on dev mode, it is needed if HTTPS is not set up. This should only be used for development purposes.
type: boolean
default: False
enable_local_idp:
description: Enable Kratos Identity Provider
type: boolean
default: True
enforce_mfa:
description: |
Enforce users to set up and use multi factor authentication.
Disabling this option will allow users to log in with password or webauthn without completing 2fa.
type: boolean
default: True
enable_passwordless_login_method:
description: |
Enable passwordless authentication via webauthn. Requires `enable_local_idp=True`.
type: boolean
default: False
identity_schemas:
description: |
A mapping of schema_id to identity schemas. For example:
{
"user_v0": {
"$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": {
"verification": {
"via": "email"
}
}
},
"name": {
"type": "string"
}
}
},
"additionalProperties": true
}
}
}
type: string
default_identity_schema_id:
description: The default identity schema id, this option only works when `identity_schemas` is defined
type: string
recovery_email_template:
description: |
The custom html template used to send emails with recovery codes. For example:
Hi,
Please enter the following code to recover your account:
{{ .RecoveryCode }}
type: string
log_level:
description: |
The verbosity of logs produced by Kratos.
Available values are: panic, fatal, error, warn, info, debug, and trace.
type: string
default: "info"
actions:
get-identity:
description: Get a user using either the identity ID or the user email.
params:
identity-id:
description: The Identity ID
type: string
email:
description: The user's email
type: string
delete-identity:
description: Delete a user using either the identity ID or the user email.
params:
identity-id:
description: The Identity ID
type: string
email:
description: The user's email
type: string
create-admin-account:
description: |
Create an admin user. If no password was provided, the command will return a
magic link where the user will be able to set their password.
params:
username:
description: The admin username
type: string
email:
description: |
The admin's email, this email must not be associated with any other account
(user or admin)
type: string
password-secret-id:
description: The juju secret that contains the admin's password
type: string
name:
description: The admin's name
type: string
phone_number:
description: The admin's phone number
type: string
required: ["username", "email"]
reset-password:
description: |
Reset password of an identity using either the identity ID or user email.
Required: one of `identity-id` or `email`
params:
identity-id:
description: The Identity ID
type: string
email:
description: The user's email
type: string
password-secret-id:
description: |
The juju secret that contains the password to set for an identity. If
not provided, a self-service recovery link will be returned.
type: string
invalidate-identity-sessions:
description: |
Invalidate all user sessions using either the identity ID or user email.
params:
identity-id:
description: The Identity ID
type: string
email:
description: The user's email
type: string
reset-identity-mfa:
description: |
Reset identity's second authentication factor using either the identity ID or user email.
params:
identity-id:
description: The Identity ID
type: string
email:
description: The user's email
type: string
mfa-type:
description: The type of credentials to be removed, one of `totp` or `lookup_secret`.
type: string
run-migration:
description: |
Run a migration, this is needed after upgrades. This is a non-reversible operation.
Run this after backing up the database.
params:
timeout:
description: Timeout after which the migration will be canceled
type: number
default: 120
########################### build ###########################
base: ubuntu@22.04
platforms:
amd64:
parts:
schemas:
plugin: dump
source: .
organize:
"claim_mappers/**": schemas/
"identity_schemas/**": schemas/
prime:
- schemas/
charm:
charm-binary-python-packages:
- jsonschema
- bcrypt
build-packages:
- rustc
- cargo