-
Notifications
You must be signed in to change notification settings - Fork 7
/
secrets.yaml
596 lines (586 loc) · 19.6 KB
/
secrets.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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
$schema: https://json-schema.org/draft/2020-12/schema
$id: https://github.com/elastisys/compliantkubernetes-apps/raw/main/config/schemas/secrets.yaml
title: Compliant Kubernetes Apps Secrets
description: |
This describes the structure of the secrets for both the service and workload clusters.
$comment: |
Since these are intended to be encrypted each property should have the `encrypted` definition combined with `anyOf or `oneOf` with the actual format.
$defs:
encrypted:
$comment: Combine this and the decrypted format using oneOf or anyOf
pattern: ^ENC\[
title: String encrypted using sops.
type: string
password:
oneOf:
- minLength: 8
type: string
- $ref: '#/$defs/encrypted'
title: Password
token:
anyOf:
- minLength: 20
type: string
- $ref: '#/$defs/encrypted'
title: Opaque Token
properties:
objectStorage:
title: Object Storage Secrets
description: |-
Configuration options for using object storage in Compliant Kubernetes.
type: object
properties:
azure:
additionalProperties: false
title: Azure Backend Secrets
description: |-
Secrets for using Azure as object storage in Compliant Kubernetes.
type: object
properties:
storageAccountName:
description: Storage account name to authenticate with.
type: string
storageAccountKey:
description: Storage account key to authenticate with.
type: string
s3:
additionalProperties: false
title: S3 Backend Secrets
description: |-
Secrets for using S3 as object storage in Compliant Kubernetes.
type: object
properties:
accessKey:
description: Access key to authenticate with.
type: string
secretKey:
description: Secret key to authenticate with.
type: string
swift:
additionalProperties: false
title: Swift Backend Secrets
description: |-
Secrets for using Swift as object storage in Compliant Kubernetes.
> [!important]
> Currently Harbor only supports `username` and `password` authentication.
type: object
properties:
applicationCredentialID:
description: |-
Application Credential ID to authenticate with.
type: string
applicationCredentialName:
description: |-
Application Credential Name to authenticate with, requires username to be set.
type: string
applicationCredentialSecret:
description: |-
Application Credential Secret to authenticate with, requires username to be set.
type: string
password:
type: string
username:
type: string
sync:
additionalProperties: false
title: Rclone Sync Secrets
description: |-
Secrets for syncing object storage from the primary site to a secondary site with Rclone.
type: object
properties:
encrypt:
title: Rclone Crypt Secrets
description: |-
Secrets for encrypt data when syncing.
properties:
password:
description: Crypt password, generate with `pwgen 32 1`.
type: string
passwordObscured:
description: Obscured crypt password, generate with `rclone obscure <password>`.
type: string
salt:
description: Crypt salt, generate with `pwgen 32 1`.
type: string
saltObscured:
description: Obscured crypt salt, generate with `rclone obscure <salt>`.
type: string
type: object
azure:
$ref: '#/properties/objectStorage/properties/azure'
s3:
$ref: '#/properties/objectStorage/properties/s3'
swift:
$ref: '#/properties/objectStorage/properties/swift'
restore:
additionalProperties: false
title: Rclone Restore Secrets
description: |-
Secrets for restoring object storage from a secondary site to the primary site with Rclone.
type: object
properties:
destinations:
title: Rclone Restore Destinations Secrets
description: |-
Allows for complete or partial overrides of the destinations of the restore, the main object storage configuration.
type: object
properties:
azure:
$ref: '#/properties/objectStorage/properties/azure'
s3:
$ref: '#/properties/objectStorage/properties/s3'
swift:
$ref: '#/properties/objectStorage/properties/swift'
default: {}
sources:
title: Rclone Restore Sources Secrets
description: |-
Allows for complete or partial overrides of the sources of the restore, the sync object storage configuration.
type: object
properties:
azure:
$ref: '#/properties/objectStorage/properties/azure'
s3:
$ref: '#/properties/objectStorage/properties/s3'
swift:
$ref: '#/properties/objectStorage/properties/swift'
default: {}
decrypt:
description: |-
Allows for complete or partial overrides of the decrypt of the restore, the sync encrypt configuration.
$ref: '#/properties/objectStorage/properties/sync/properties/encrypt'
default: {}
grafana:
title: Grafana Secrets
description: Configure secrets for Grafana.
type: object
properties:
password:
title: Admin Grafana Password
type: string
opsClientSecret:
title: Admin Grafana OIDC Client Secret
type: string
clientSecret:
title: Dev Grafana OIDC Client Secret
type: string
ops:
title: Admin Grafana Secrets
description: Configure secrets for Admin Grafana.
type: object
properties:
envRenderSecret:
title: Environment Variables Render
type: array
user:
title: Dev Grafana Secrets
description: Configure secrets for Dev Grafana.
type: object
properties:
envRenderSecret:
title: Environment Variables Render
type: array
harbor:
title: Harbor Secret Config
description: |-
Secret configuration options for Harbor.
properties:
clientSecret:
type: string
coreSecret:
type: string
external:
title: External Database
description: |-
External database password config.
properties:
databasePassword:
title: External Database Password
type: string
type: object
internal:
title: Internal Database
description: |-
Internal database password config.
properties:
databasePassword:
title: Internal Database Password
type: string
type: object
jobserviceSecret:
type: string
password:
type: string
registrySecret:
type: string
xsrf:
type: string
type: object
thanos:
title: Thanos Secrets
description: Secrets for Thanos.
properties:
receiver:
title: Thanos Receiver
description: Secrets for Thanos Receiver.
properties:
basic_auth:
title: Thanos Receiver Basic Auth
description: Configure authentication to Thanos Receiver,
properties:
password:
title: Thanos Receiver Basic Auth Password
description: Configure the password for authenticating to Thanos Receiver.
type: string
type: object
type: object
type: object
user:
title: User Secret Config
description: |-
Admin password for user Grafana and user Alertmanager.
type: object
properties:
alertmanagerPassword:
type: string
grafanaPassword:
title: Dev Grafana Password
type: string
opensearch:
title: OpenSearch Secrets
description: |-
Secrets for OpenSearch.
type: object
$defs:
user:
title: OpenSearch User
description: Definitions for OpenSearch users.
type: object
properties:
name:
title: OpenSearch Username
type: string
definition:
title: OpenSearch User Definition
description: Configures the permissions the role will have.
$comment: This schema does not cover the entire upstream object.
type: object
properties:
attributes:
$ref: "#/properties/opensearch/$defs/user/properties/attributes"
backend_role:
$ref: "#/properties/opensearch/$defs/user/properties/groups"
opendistro_security_roles:
$ref: "#/properties/opensearch/$defs/user/properties/securityRoles"
password:
$ref: "#/properties/opensearch/$defs/user/properties/password"
attributes:
title: OpenSearch User Attributes
description: Configures the attributes the user will have.
type: object
additionalProperties:
type: string
groups:
title: OpenSearch User Groups
description: Configures the backend roles or groups the user will have.
type: array
items:
type: string
securityRoles:
title: OpenSearch User Security Roles
description: |
Configures the security roles the user will have.
> [!note]
> These roles must exists or be created via `extraRoles`.
type: array
items:
title: OpenSearch Security Role
type: string
examples:
- kibana_user
password:
title: OpenSearch User Password
type: string
properties:
adminHash:
title: OpenSearch Admin User Hash
type: string
adminPassword:
title: OpenSearch Admin User Password
type: string
configurerHash:
title: OpenSearch Configurer User Hash
type: string
configurerPassword:
title: OpenSearch Configurer User Password
type: string
dashboardsCookieEncKey:
title: OpenSearch Dashboards Cookie Encryption Key
type: string
dashboardsHash:
title: OpenSearch Dashboards User Hash
type: string
dashboardsPassword:
title: OpenSearch Dashboards User Password
type: string
clientSecret:
title: OpenSearch Client Secret
type: string
curatorPassword:
title: OpenSearch Curator Password
type: string
fluentdPassword:
title: OpenSearch Fluentd Password
type: string
metricsExporterPassword:
title: OpenSearch Exporter Password
type: string
snapshotterPassword:
title: OpenSearch Snapshot Password
type: string
extraUsers:
title: OpenSearch Extra Users
description: Configures extra users for OpenSearch Security.
type: array
items:
title: OpenSearch Extra User
description: |-
Configures extra user for OpenSearch Security.
> [!note]
> See [the upstream documentation](https://opensearch.org/docs/latest/security/configuration/yaml/#internal_usersyml) for reference.
type: object
properties:
username:
$ref: "#/properties/opensearch/$defs/user/properties/name"
definition:
$ref: "#/properties/opensearch/$defs/user/properties/definition"
kubeapiMetricsPassword:
type: string
alerts:
title: Alerts Secrets
description: Configure secrets for alerting.
type: object
properties:
opsGenie:
title: OpsGenie Secrets
description: Configure secrets for alerting with OpsGenie.
type: object
properties:
apiKey:
title: OpsGenie API Key
$ref: '#/$defs/token'
slack:
title: Slack Secrets
description: Configure secrets for alerting with Slack.
type: object
properties:
apiUrl:
title: Slack API URL
type: string
oneOf:
- format: uri
- $ref: '#/$defs/encrypted'
kured:
title: Kured Notification Secrets
description: |-
Notification secrets for Kured (Kubernetes Reboot Daemon).
properties:
slack:
title: Kured Slack Notification Secrets
description: |-
Notification secrets to send notifications from Kured to Slack.
properties:
botToken:
title: Kured Bot Token For Slack Notification
type: string
type: object
type: object
dex:
title: Dex Secrets
description: Configure secrets for Dex.
type: object
properties:
additionalStaticClients:
title: Dex Static Clients
description: |-
Configure additional static clients in Dex.
Clients in this case is application that wants to allow users to authenticate via Dex.
> [!note]
> See [the upstream documentation](https://dexidp.io/docs/configuration/custom-scopes-claims-clients/) for reference.
type: array
items:
title: Dex Static Client
description: Configure an additional static client in Dex.
type: object
properties:
id:
title: Static Client ID
type: string
name:
title: Static Client Name
type: string
redirectURIs:
title: Static Client Redirect URIs
description: Configure the redirection URIs for this static client.
type: array
items:
title: Static Client Redirect URI
type: string
oneOf:
- format: uri
- $ref: '#/$defs/encrypted'
examples:
- http://192.168.42.219:31850/oauth2/callback
secret:
title: Static Client Secret
type: string
connectors:
title: Dex Connectors
description: |-
Configure upstream Identity Providers.
> [!note]
> See [the upstream documentation](https://dexidp.io/docs/connectors/) for reference.
type: array
items:
title: Dex Connector
description: Configure an upstream Identity Provider.
type: object
properties:
id:
title: Connector ID
description: Configure a unique ID to use for this connector in Dex.
examples:
- google
type: string
name:
title: Connector Name
description: Configure a display name to use for this connector in Dex.
type: string
examples:
- Google
type:
title: Connector Type
type: string
oneOf:
- enum:
- atlassiancrowd
- authproxy
- bitbucketcloud
- gitea
- github
- gitlab
- google
- keystone
- ldap
- linkedin
- microsoft
- mock
- oauth
- oidc
- openshift
- saml
- $ref: '#/$defs/encrypted'
config:
title: Connector Config
description: Configure parameters specific for this connector.
type: object
$comment: |-
TODO:
- Fields are dependent on type of parent and needs to be specified.
- Fields are divergent with type `ldap` compared to `oauth` variants.
properties:
clientID:
title: Connector Client ID
type: string
clientSecret:
title: Connector Client Secret
type: string
issuer:
title: Connector Issuer
description: |-
Used in `type: oidc`.
type: string
oneOf:
- format: uri
- $ref: '#/$defs/encrypted'
domainToAdminEmail:
title: Connector Admin Emails
description: |-
Used in `type: google`.
type: object
additionalProperties:
oneOf:
- format: email
- $ref: '#/$defs/encrypted'
propertyNames:
format: domain
hostedDomains:
title: Connector Hosted Domains
description: |-
Configure the hosted domains for this connector.
Used in `type: google`.
type: array
items:
title: Connector Hosted Domain
type: string
oneOf:
- format: hostname
- $ref: '#/$defs/encrypted'
redirectURI:
title: Connector Redirect URI
description: Configure the redirect URI for this connector.
type: string
oneOf:
- format: uri
- $ref: '#/$defs/encrypted'
examples:
- https://dex.${BASE_DOMAIN}/callback
serviceAccountFilePath:
title: Connector Service Account Path
description: |-
Used in `type: google`.
type: string
examples:
- /etc/dex/google/sa.json
required:
- id
- name
- type
- config
kubeloginClientSecret:
title: Dex Kubelogin Client Secret
type: string
staticPassword:
title: Dex Static Password
format: crypt
type: string
issuers:
title: Issuers Secrets
description: Configure secrets for issuers.
type: object
properties:
secrets:
$comment: is this just passed through as-is?
title: Issuer Secrets
description: |-
Configure secrets for issuers.
This must match the configuration set on the issuers.
Keys become the name of the secret, and the value the data of the secret.
type: object
externalDns:
title: External DNS Secrets
description: Configure secrets for External DNS.
type: object
properties:
awsRoute53:
title: AWS Route 53 Secrets
description: Configure AWS Route 53 secrets for External DNS.
type: object
properties:
accessKey:
title: AWS Access Key
type: string
secretKey:
title: AWS Secret Key
type: string
type: object