-
Notifications
You must be signed in to change notification settings - Fork 23
/
values.yaml
1615 lines (1480 loc) · 63.4 KB
/
values.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
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Default values for audit.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# Global configuration
global:
# -- (map) AWS configuration
aws:
# -- (bool) Set to true if deploying to AWS. Controls ingress annotations.
enabled: false
# -- (string) Credentials for AWS stuff.
awsAccessKeyId:
# -- (string) Credentials for AWS stuff.
awsSecretAccessKey:
# -- (map) Local secret setting if using a pre-exising secret.
useLocalSecret:
# -- (bool) Set to true if you would like to use a secret that is already running on your cluster.
enabled: false
# -- (string) Name of the local secret.
localSecretName:
# -- (string) Namespace of the local secret.
localSecretNamespace:
# -- (bool) Whether the deployment is for development purposes.
dev: true
postgres:
# -- (bool) Whether the database should be created.
dbCreate: true
# -- (string) Name of external secret. Disabled if empty
externalSecret: ""
# -- (map) Master credentials to postgres. This is going to be the default postgres server being used for each service, unless each service specifies their own postgres
master:
# -- (string) hostname of postgres server
host:
# -- (string) username of superuser in postgres. This is used to create or restore databases
username: postgres
# -- (string) password for superuser in postgres. This is used to create or restore databases
password:
# -- (string) Port for Postgres.
port: "5432"
# -- (string) Environment name. This should be the same as vpcname if you're doing an AWS deployment. Currently this is being used to share ALB's if you have multiple namespaces. Might be used other places too.
environment: default
# -- (string) Hostname for the deployment.
hostname: localhost
# -- (string) ARN of the reverse proxy certificate.
revproxyArn: arn:aws:acm:us-east-1:123456:certificate
# -- (string) URL of the data dictionary.
dictionaryUrl: https://s3.amazonaws.com/dictionary-artifacts/datadictionary/develop/schema.json
# -- (string) Portal application name.
portalApp: gitops
# -- (string) S3 bucket name for Kubernetes manifest files.
kubeBucket: kube-gen3
# -- (string) S3 bucket name for log files.
logsBucket: logs-gen3
# -- (bool) Whether to sync data from dbGaP.
syncFromDbgap: false
# -- (bool) Whether public datasets are enabled.
publicDataSets: true
# -- (string) Access level for tiers. acceptable values for `tier_access_level` are: `libre`, `regular` and `private`. If omitted, by default common will be treated as `private`
tierAccessLevel: libre
# -- (int) Only relevant if tireAccessLevel is set to "regular". Summary charts below this limit will not appear for aggregated data.
tierAccessLimit: "1000"
# -- (map) Controls network policy settings
netPolicy:
enabled: false
# -- (int) Number of dispatcher jobs.
dispatcherJobNum: "10"
# -- (bool) If the service will be deployed with a Pod Disruption Budget. Note- you need to have more than 2 replicas for the pdb to be deployed.
pdb: false
# -- (int) The minimum amount of pods that are available at all times if the PDB is deployed.
minAvialable: 1
# -- (map) External Secrets settings.
externalSecrets:
# -- (bool) Will use ExternalSecret resources to pull secrets from Secrets Manager instead of creating them locally. Be cautious as this will override any fence secrets you have deployed.
deploy: false
# -- (string) Will deploy a separate External Secret Store for this service.
separateSecretStore: false
# -- (bool) Whether Metrics are enabled.
metricsEnabled: false
# -- (map) External Secrets settings.
externalSecrets:
# -- (string) Will create the Helm "fence-config" secret even if Secrets Manager is enabled. This is helpful if you are wanting to use External Secrets for some, but not all secrets.
createK8sFenceConfigSecret: false
# -- (string) Will create the Helm "fence-jwt-keys" secret even if Secrets Manager is enabled. This is helpful if you are wanting to use External Secrets for some, but not all secrets.
createK8sJwtKeysSecret: false
# -- (string) Will create the Helm "fence-google-app-creds-secret" and "fence-google-storage-creds-secret" secrets even if Secrets Manager is enabled. This is helpful if you are wanting to use External Secrets for some, but not all secrets.
createK8sGoogleAppSecrets: false
# -- (string) Will override the name of the aws secrets manager secret. Default is "fence-jwt-keys"
fenceJwtKeys:
# -- (string) Will override the name of the aws secrets manager secret. Default is "fence-google-app-creds-secret"
fenceGoogleAppCredsSecret:
# -- (string) Will override the name of the aws secrets manager secret. Default is "fence-google-storage-creds-secret"
fenceGoogleStorageCredsSecret:
# -- (string) Will override the name of the aws secrets manager secret. Default is "fence-config"
fenceConfig:
# -- (string) Will override the name of the aws secrets manager secret. Default is "Values.global.environment-.Chart.Name-creds"
dbcreds:
# -- (map) Configuration options for usersync cronjob.
usersync:
# -- (bool) Whether to run Fence usersync or not.
usersync: false
# -- (string) The cron schedule expression to use in the usersync cronjob. Runs every 30 minutes by default.
schedule: "*/30 * * * *"
# -- (string) To set a custom image for pulling the user.yaml file from S3. Default is the Gen3 Awshelper image.
custom_image:
# -- (bool) Whether to sync data from dbGaP.
syncFromDbgap: false
# -- (bool) Force attempting a dbgap sync if "true", falls back on user.yaml
addDbgap: false
# -- (bool) Forces ONLY a dbgap sync if "true", IGNORING user.yaml
onlyDbgap: false
# -- (string) Path to the user.yaml file in S3.
userYamlS3Path: s3://cdis-gen3-users/helm-test/user.yaml
# -- (string) Slack webhook endpoint used with certain jobs.
slack_webhook: None
# -- (bool) Will echo what files we are seeing on dbgap ftp to Slack.
slack_send_dbgap: false
# -- (map) Secret information for Usersync and External Secrets.
secrets:
# -- (str) AWS access key ID. Overrides global key.
awsAccessKeyId:
# -- (str) AWS access key ID. Overrides global key.
awsSecretAccessKey:
# -- (map) Postgres database configuration. If db does not exist in postgres cluster and dbCreate is set ot true then these databases will be created for you
postgres:
# (bool) Whether the database should be restored from s3. Default to global.postgres.dbRestore
dbRestore: false
# -- (bool) Whether the database should be created. Default to global.postgres.dbCreate
dbCreate:
# -- (string) Hostname for postgres server. This is a service override, defaults to global.postgres.host
host:
# -- (string) Database name for postgres. This is a service override, defaults to <serviceName>-<releaseName>
database:
# -- (string) Username for postgres. This is a service override, defaults to <serviceName>-<releaseName>
username:
# -- (string) Port for Postgres.
port: "5432"
# -- (string) Password for Postgres. Will be autogenerated if left empty.
password:
# -- (string) Will create a Database for the individual service to help with developing it.
separate: false
# -- (map) Postgresql subchart settings if deployed separately option is set to "true".
# Disable persistence by default so we can spin up and down ephemeral environments
postgresql:
primary:
persistence:
# -- (bool) Option to persist the dbs data.
enabled: false
# -- (int) Number of desired replicas
replicaCount: 1
image:
# -- (string) The Docker image repository for the fence service
repository: quay.io/cdis/fence
# -- (string) When to pull the image. This value should be "Always" to ensure the latest image is used.
pullPolicy: Always
# -- (string) Overrides the image tag whose default is the chart appVersion.
tag: "master"
# -- (list) Docker image pull secrets.
imagePullSecrets: []
# -- (string) Override the name of the chart.
nameOverride: ""
# -- (string) Override the full name of the deployment.
fullnameOverride: ""
# -- (map) Service account to use or create.
serviceAccount:
# -- (bool) Specifies whether a service account should be created.
create: true
# -- (map) Annotations to add to the service account.
annotations:
# -- (string) The Amazon Resource Name (ARN) of the role to associate with the service account
eks.amazonaws.com/role-arn:
# If not set and create is true, a name is generated using the fullname template
# -- (string) The name of the service account
name: "fence-sa"
# -- (map) Annotations to add to the pod
podAnnotations: {}
# -- (map) Security context for the pod
podSecurityContext:
fsGroup: 101
# -- (map) Security context for the containers in the pod
securityContext:
{}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
# -- (map) Kubernetes service information.
service:
# -- (string) Type of service. Valid values are "ClusterIP", "NodePort", "LoadBalancer", "ExternalName".
type: ClusterIP
# -- (int) The port number that the service exposes.
port: 80
# -- (map) Resource requests and limits for the containers in the pod
resources:
# -- (map) The amount of resources that the container requests
requests:
# -- (string) The amount of CPU requested
cpu: 0.3
# -- (string) The amount of memory requested
memory: 128Mi
# -- (map) The maximum amount of resources that the container is allowed to use
limits:
# -- (string) The maximum amount of CPU the container can use
cpu: 1.0
# -- (string) The maximum amount of memory the container can use
memory: 2Gi
# -- (map) Configuration for autoscaling the number of replicas
autoscaling:
# -- (bool) Whether autoscaling is enabled
enabled: false
# -- (int) The minimum number of replicas to scale down to
minReplicas: 1
# -- (int) The maximum number of replicas to scale up to
maxReplicas: 4
# -- (int) Target CPU utilization percentage
targetCPUUtilizationPercentage: 80
# -- (int) Target Memory utilization percentage
targetMemoryUtilizationPercentage: 80
# -- (map) Node Selector for the pods
nodeSelector: {}
# -- (list) Tolerations for the pods
tolerations: []
# -- (map) Labels to add to the pod.
labels:
# -- (string) Grants egress from all pods to pods labeled with authrpovider=yes. For network policy selectors.
authprovider: "yes"
# -- (string) Grants egress from pods labeled with netnolimit=yes to any IP address. Use explicit proxy and AWS APIs
netnolimit: "yes"
# -- (string) Grants ingress from the revproxy service for pods labeled with public=yes
public: "yes"
# -- (string) Grants ingress from pods in usercode namespaces for gen3 pods labeled with userhelper=yes
userhelper: "yes"
# -- (map) Affinity to use for the deployment.
affinity:
podAntiAffinity:
# -- (map) Option for scheduling to be required or preferred.
preferredDuringSchedulingIgnoredDuringExecution:
# -- (int) Weight value for preferred scheduling.
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
# -- (list) Label key for match expression.
- key: app
# -- (string) Operation type for the match expression.
operator: In
# -- (list) Value for the match expression key.
values:
- fence
# -- (string) Value for topology key label.
topologyKey: "kubernetes.io/hostname"
# -- (list) Environment variables to pass to the container
env:
- name: GEN3_UWSGI_TIMEOUT
valueFrom:
configMapKeyRef:
name: manifest-global
key: uwsgi-timeout
optional: true
- name: DD_AGENT_HOST
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: AWS_STS_REGIONAL_ENDPOINTS
value: regional
- name: PYTHONPATH
value: /var/www/fence
- name: GEN3_DEBUG
value: "False"
- name: PGHOST
valueFrom:
secretKeyRef:
name: fence-dbcreds
key: host
optional: false
- name: PGUSER
valueFrom:
secretKeyRef:
name: fence-dbcreds
key: username
optional: false
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: fence-dbcreds
key: password
optional: false
- name: PGDB
valueFrom:
secretKeyRef:
name: fence-dbcreds
key: database
optional: false
- name: DBREADY
valueFrom:
secretKeyRef:
name: fence-dbcreds
key: dbcreated
optional: false
- name: DB
value: postgresql://$(PGUSER):$(PGPASSWORD)@$(PGHOST):5432/$(PGDB)
- name: INDEXD_PASSWORD
valueFrom:
secretKeyRef:
name: indexd-service-creds
key: fence
- name: gen3Env
valueFrom:
configMapKeyRef:
name: manifest-global
key: hostname
# -- (list) Volumes to attach to the container.
volumes:
- name: old-config-volume
secret:
secretName: "fence-secret"
- name: json-secret-volume
secret:
secretName: "fence-json-secret"
optional: true
- name: creds-volume
secret:
secretName: "fence-creds"
- name: config-helper
configMap:
name: config-helper
optional: true
- name: logo-volume
configMap:
name: "logo-config"
- name: config-volume
secret:
secretName: "fence-config"
- name: fence-google-app-creds-secret-volume
secret:
secretName: "fence-google-app-creds-secret"
- name: fence-google-storage-creds-secret-volume
secret:
secretName: "fence-google-storage-creds-secret"
- name: fence-jwt-keys
secret:
secretName: "fence-jwt-keys"
- name: privacy-policy
configMap:
name: "privacy-policy"
- name: yaml-merge
configMap:
name: "fence-yaml-merge"
optional: false
- name: config-volume-public
configMap:
name: "manifest-fence"
optional: true
# -- (list) Volumes to mount to the container.
volumeMounts:
- name: "old-config-volume"
readOnly: true
mountPath: "/var/www/fence/local_settings.py"
subPath: local_settings.py
- name: "json-secret-volume"
readOnly: true
mountPath: "/var/www/fence/fence_credentials.json"
subPath: fence_credentials.json
- name: "creds-volume"
readOnly: true
mountPath: "/var/www/fence/creds.json"
subPath: creds.json
- name: "config-helper"
readOnly: true
mountPath: "/var/www/fence/config_helper.py"
subPath: config_helper.py
- name: "logo-volume"
readOnly: true
mountPath: "/fence/fence/static/img/logo.svg"
subPath: "logo.svg"
- name: "privacy-policy"
readOnly: true
mountPath: "/fence/fence/static/privacy_policy.md"
subPath: "privacy_policy.md"
- name: "config-volume"
readOnly: true
mountPath: "/var/www/fence/fence-config-secret.yaml"
subPath: fence-config.yaml
- name: "yaml-merge"
readOnly: true
mountPath: "/var/www/fence/yaml_merge.py"
subPath: yaml_merge.py
- name: "fence-google-app-creds-secret-volume"
readOnly: true
mountPath: "/var/www/fence/fence_google_app_creds_secret.json"
subPath: fence_google_app_creds_secret.json
- name: "fence-google-storage-creds-secret-volume"
readOnly: true
mountPath: "/var/www/fence/fence_google_storage_creds_secret.json"
subPath: fence_google_storage_creds_secret.json
- name: "fence-jwt-keys"
readOnly: true
mountPath: "/fence/keys/key/jwt_private_key.pem"
subPath: "jwt_private_key.pem"
- name: "config-volume-public"
readOnly: true
mountPath: "/var/www/fence/fence-config-public.yaml"
subPath: fence-config-public.yaml
# -- (list) Volumes to mount to the init container.
initVolumeMounts:
- name: "config-volume"
readOnly: true
mountPath: "/var/www/fence/fence-config-secret.yaml"
subPath: fence-config.yaml
- name: "config-volume-public"
readOnly: true
mountPath: "/var/www/fence/fence-config-public.yaml"
subPath: fence-config-public.yaml
- name: "yaml-merge"
readOnly: true
mountPath: "/var/www/fence/yaml_merge.py"
subPath: yaml_merge.py
- name: "fence-google-app-creds-secret-volume"
readOnly: true
mountPath: "/var/www/fence/fence_google_app_creds_secret.json"
subPath: fence_google_app_creds_secret.json
- name: "fence-google-storage-creds-secret-volume"
readOnly: true
mountPath: "/var/www/fence/fence_google_storage_creds_secret.json"
subPath: fence_google_storage_creds_secret.json
# -- (list) Volumes to attach to the init container.
initEnv:
- name: PGHOST
valueFrom:
secretKeyRef:
name: fence-dbcreds
key: host
optional: false
- name: PGUSER
valueFrom:
secretKeyRef:
name: fence-dbcreds
key: username
optional: false
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: fence-dbcreds
key: password
optional: false
- name: PGDB
valueFrom:
secretKeyRef:
name: fence-dbcreds
key: database
optional: false
- name: DBREADY
valueFrom:
secretKeyRef:
name: fence-dbcreds
key: dbcreated
optional: false
- name: DB
value: postgresql://$(PGUSER):$(PGPASSWORD)@$(PGHOST):5432/$(PGDB)
- name: FENCE_DB
value: postgresql://$(PGUSER):$(PGPASSWORD)@$(PGHOST):5432/$(PGDB)
- name: PYTHONPATH
value: /var/www/fence
# Values to determine the labels that are used for the deployment, pod, etc.
# -- (string) Valid options are "production" or "dev". If invalid option is set- the value will default to "dev".
release: "production"
# -- (string) Valid options are "true" or "false". If invalid option is set- the value will default to "false".
criticalService: "true"
# -- (string) Label to help organize pods and their use. Any value is valid, but use "_" or "-" to divide words.
partOf: "Authentication"
# -- (map) Will completely override the selectorLabels defined in the common chart's _label_setup.tpl
selectorLabels:
# -- (map) Will completely override the commonLabels defined in the common chart's _label_setup.tpl
commonLabels:
logo:
privacy_policy:
projects:
# USER_SYNC_CRON:
# LOCATION:
# TYPE:
# S3:
# github.com:
# -- (string) USER YAML. Passed in as a multiline string.
USER_YAML: |
cloud_providers: {}
authz:
# policies automatically given to anyone, even if they are not authenticated
anonymous_policies:
- open_data_reader
# policies automatically given to authenticated users (in addition to their other policies)
all_users_policies: []
groups:
# can CRUD programs and projects and upload data files
- name: data_submitters
policies:
- services.sheepdog-admin
- data_upload
- MyFirstProject_submitter
users:
- username1@gmail.com
# can create/update/delete indexd records
- name: indexd_admins
policies:
- indexd_admin
users:
- username1@gmail.com
resources:
- name: workspace
- name: data_file
- name: services
subresources:
- name: sheepdog
subresources:
- name: submission
subresources:
- name: program
- name: project
- name: 'indexd'
subresources:
- name: 'admin'
- name: audit
subresources:
- name: presigned_url
- name: login
- name: open
- name: programs
subresources:
- name: MyFirstProgram
subresources:
- name: projects
subresources:
- name: MyFirstProject
policies:
- id: workspace
description: be able to use workspace
resource_paths:
- /workspace
role_ids:
- workspace_user
- id: data_upload
description: upload raw data files to S3
role_ids:
- file_uploader
resource_paths:
- /data_file
- id: services.sheepdog-admin
description: CRUD access to programs and projects
role_ids:
- sheepdog_admin
resource_paths:
- /services/sheepdog/submission/program
- /services/sheepdog/submission/project
- id: indexd_admin
description: full access to indexd API
role_ids:
- indexd_admin
resource_paths:
- /programs
- id: open_data_reader
role_ids:
- peregrine_reader
- guppy_reader
- fence_storage_reader
resource_paths:
- /open
- id: all_programs_reader
role_ids:
- peregrine_reader
- guppy_reader
- fence_storage_reader
resource_paths:
- /programs
- id: MyFirstProject_submitter
role_ids:
- reader
- creator
- updater
- deleter
- storage_reader
- storage_writer
resource_paths:
- /programs/MyFirstProgram/projects/MyFirstProject
roles:
- id: file_uploader
permissions:
- id: file_upload
action:
service: fence
method: file_upload
- id: workspace_user
permissions:
- id: workspace_access
action:
service: jupyterhub
method: access
- id: sheepdog_admin
description: CRUD access to programs and projects
permissions:
- id: sheepdog_admin_action
action:
service: sheepdog
method: '*'
- id: indexd_admin
description: full access to indexd API
permissions:
- id: indexd_admin
action:
service: indexd
method: '*'
- id: admin
permissions:
- id: admin
action:
service: '*'
method: '*'
- id: creator
permissions:
- id: creator
action:
service: '*'
method: create
- id: reader
permissions:
- id: reader
action:
service: '*'
method: read
- id: updater
permissions:
- id: updater
action:
service: '*'
method: update
- id: deleter
permissions:
- id: deleter
action:
service: '*'
method: delete
- id: storage_writer
permissions:
- id: storage_creator
action:
service: '*'
method: write-storage
- id: storage_reader
permissions:
- id: storage_reader
action:
service: '*'
method: read-storage
- id: peregrine_reader
permissions:
- id: peregrine_reader
action:
method: read
service: peregrine
- id: guppy_reader
permissions:
- id: guppy_reader
action:
method: read
service: guppy
- id: fence_storage_reader
permissions:
- id: fence_storage_reader
action:
method: read-storage
service: fence
clients:
wts:
policies:
- all_programs_reader
- open_data_reader
users:
username1@gmail.com: {}
username2:
tags:
name: John Doe
email: johndoe@gmail.com
policies:
- MyFirstProject_submitter
cloud_providers: {}
groups: {}
# -- (map) Public configuration settings for Fence app
FENCE_CONFIG_PUBLIC: {}
# -- (map) Private configuration settings for Fence app
FENCE_CONFIG:
# -- (string) Name of the Fence app
APP_NAME: "Gen3 Data Commons"
# -- (string) A URL-safe base64-encoded 32-byte key for encrypting keys in db
# in python you can use the following script to generate one:
# import base64
# import os
# key = base64.urlsafe_b64encode(os.urandom(32))
# print(key)
ENCRYPTION_KEY: REPLACEME
# -- (map) Debug and security settings
# Modify based on whether you're in a dev environment or in production
DEBUG: false
# -- (bool) if true, will automatically login a user with username "test"
# WARNING: DO NOT ENABLE IN PRODUCTION (for testing purposes only)
MOCK_AUTH: false
# -- (bool) if true, will fake a successful login response from Google in /login/google
# NOTE: this will also modify the behavior of /link/google endpoints
# WARNING: DO NOT ENABLE IN PRODUCTION (for testing purposes only)
# will login as the username set in cookie DEV_LOGIN_COOKIE_NAME
MOCK_GOOGLE_AUTH: false
# -- (str) the name of the cookie set by mock authentication (used for testing only)
DEV_LOGIN_COOKIE_NAME: "dev_login"
# -- (bool) if true, will ignore anything configured in STORAGE_CREDENTIALS
MOCK_STORAGE: false
# -- (bool) allow OIDC traffic on http for development. By default it requires https.
#
# WARNING: ONLY set to true when fence will be deployed in such a way that it will
# ONLY receive traffic from internal clients and can safely use HTTP.
AUTHLIB_INSECURE_TRANSPORT: true
# -- (bool) enable Prometheus Metrics for observability purposes
#
# WARNING: Any counters, gauges, histograms, etc. should be carefully
# reviewed to make sure its labels do not contain any PII / PHI
ENABLE_PROMETHEUS_METRICS: false
# -- (bool) set if you want browsers to only send cookies with requests over HTTPS
SESSION_COOKIE_SECURE: true
# -- (bool) enable CSRF protection
ENABLE_CSRF_PROTECTION: true
# -- (str) signing key for WTForms to sign CSRF tokens with
WTF_CSRF_SECRET_KEY: "{{ENCRYPTION_KEY}}"
# -- (bool) fence (at the moment) attempts a migration on startup. setting this to false will disable that
# WARNING: ONLY set to false if you do NOT want to automatically migrate your database.
# You should be careful about incompatible versions of your db schema with what
# fence expects. In other words, things could be broken if you update to a later
# fence that expects a schema your database isn't migrated to.
# NOTE: We are working to improve the migration process in the near future
ENABLE_DB_MIGRATION: true
# -- (dict) Configurations for OpenID Connect (OIDC) authentication
# - Fully configure at least one client so login works
# - WARNING: Be careful changing the *_ALLOWED_SCOPES as you can break basic
# and optional functionality
OPENID_CONNECT:
# any OIDC IDP that does not differ from the generic implementation can be
# configured without code changes
generic_oidc_idp: # choose a unique ID and replace this key
# -- (str) Optional; display name for this IDP
name: "some_idp"
# -- (str) Client ID
client_id: ""
# -- (str) Client secret
client_secret: ""
# -- (str) Redirect URL for this IDP
redirect_url: "{{BASE_URL}}/login/some_idp/login" # replace IDP name
# use `discovery` to configure IDPs that do not expose a discovery
# endpoint. One of `discovery_url` or `discovery` should be configured
# -- (str) URL of the OIDC discovery endpoint for the IDP
discovery_url: "https://server.com/.well-known/openid-configuration"
discovery:
# -- (str) Authorization endpoint URL
authorization_endpoint: ""
# -- (str) Token endpoint URL
token_endpoint: ""
# -- (str) JSON Web Key Set (JWKS) URI
jwks_uri: ""
# -- (str) Optional; claims field to get the user_id from (default "sub")
user_id_field: ""
# -- (str) Optional; claims field to get the user email from (default "email")
email_field: ""
# -- (str) Optional; default is "openid"
scope: ""
# These Google values must be obtained from Google's Cloud Console
# Follow: https://developers.google.com/identity/protocols/OpenIDConnect
#
# You'll need to obtain a Client ID and Client Secret. Set the redirect URIs
# in Google to be '{{BASE_URL}}/login/google/login', but expand BASE_URL to
# whatever you set it to above.
# -- (dict) Configuration for Google authentication provider
google:
# -- (str) URL of the OIDC discovery endpoint for Google
discovery_url: "https://accounts.google.com/.well-known/openid-configuration"
# -- (str) Client ID
client_id: ""
# -- (str) Client secret
client_secret: ""
# -- (str) The allowed redirect back to fence, should not need to change
redirect_url: "{{BASE_URL}}/login/google/login/"
# -- (str) The scope to request from Google (default "openid email")
scope: "openid email"
# if mock is true, will fake a successful login response from Google in /login/google
# NOTE: this will also modify the behavior of /link/google endpoints
# WARNING: DO NOT ENABLE IN PRODUCTION (for testing purposes only)
# will login as the username set in cookie DEV_LOGIN_COOKIE_NAME or default provided
# here
# -- (str) Optional; defaults to '{{MOCK_GOOGLE_AUTH}}' for backwards compatibility with older cfg files
mock: ""
# -- (str) Optional; defaults to 'test@example.com'
mock_default_user: "test@example.com"
# -- (dict): Contains multi-tenant Fence configuration
# Support for multi-tenant fence (another fence is this fence's IDP)
# If this fence instance is a client of another fence, fill this cfg out.
# REMOVE if not needed
fence:
# -- (str): Root URL for the other fence
# this api_base_url should be the root url for the OTHER fence
# something like: https://example.com
api_base_url: ""
# -- (str): ID of the client of this fence on the other fence
# this client_id and client_secret should be obtained by registering THIS fence as
# a new client of the OTHER fence
client_id: ""
# -- (str): Secret of the client of this fence on the other fence
client_secret: ""
# -- dict: Additional client parameters
client_kwargs:
# -- (str): Space-separated string of scopes
# openid is required to use OIDC flow
scope: "openid"
# -- (str): The URL to which the other fence will redirect after logging in
redirect_uri: "{{BASE_URL}}/login/fence/login"
# -- (str): URL for authorization endpoint of the other fence
# The next 3 should not need to be changed if the provider is following
# Oauth2 endpoint naming conventions
authorize_url: "{{api_base_url}}/oauth2/authorize"
# -- (str): URL for access token endpoint of the other fence
access_token_url: "{{api_base_url}}/oauth2/token"
# -- (str): URL for refresh token endpoint of the other fence
refresh_token_url: "{{api_base_url}}/oauth2/token"
# -- (str): Name of the provider for consent screens
# Custom name to display for consent screens. If not provided, will use `fence`.
# If the other fence is using NIH Login, you should make name: `NIH Login`
name: ""
# -- (bool): Whether to mock a successful login response for testing purposes
# if mock is true, will fake a successful login response for login
# WARNING: DO NOT ENABLE IN PRODUCTION (for testing purposes only)
mock: false
# -- (str): Default user for mock login
mock_default_user: "test@example.com"
# -- (str): URL of the shibboleth discovery endpoint if needed for InCommon login
# this is needed to enable InCommon login, if some LOGIN_OPTIONS are configured with idp=fence and a list of shib_idps:
shibboleth_discovery_url: "https://login.bionimbus.org/Shibboleth.sso/DiscoFeed"
orcid:
discovery_url: "https://orcid.org/.well-known/openid-configuration"
client_id: ""
client_secret: ""
# make sure you put the FULL url for this deployment in the allowed redirects in
# ORCID.org. DO NOT include {{BASE_URL}} at ORCID.org, you need to actually put the
# full url
redirect_url: "{{BASE_URL}}/login/orcid/login/"
scope: "openid"
# if mock is true, will fake a successful login response for login
# WARNING: DO NOT ENABLE IN PRODUCTION (for testing purposes only)
mock: false
mock_default_user: "0000-0002-2601-8132"
ras:
discovery_url: "https://sts.nih.gov/.well-known/openid-configuration"
client_id: ""
client_secret: ""
redirect_url: "{{BASE_URL}}/login/ras/callback"
scope: "openid email profile ga4gh_passport_v1"
# if mock is true, will fake a successful login response for login
# WARNING: DO NOT ENABLE IN PRODUCTION (for testing purposes only)
mock: false
mock_default_user: "test@example.com"
# Create a client in Azure here:
# https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview
# Currently supports organizational account only, so when registering a new App in
# Azure, make sure to select the `Accounts in any organizational directory` for
# supported account types.
microsoft:
discovery_url: "https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration"
# after registering a new appl, client_id can be found as
# "APPLICATION (CLIENT) ID" in Microsoft Azure
client_id: ""
# You have a generate a secret in Azure for this app, there should be a
# "Certificates & secrets" section where you can create a "New client secret"
client_secret: ""
# make sure you put the FULL url for this deployment in the allowed redirects in
# your app in Azure. DO NOT include {{BASE_URL}} in Azure, you need to actually put the
# full url
redirect_url: "{{BASE_URL}}/login/microsoft/login/"
scope: "openid email"
# if mock is true, will fake a successful login response for login
# WARNING: DO NOT ENABLE IN PRODUCTION (for testing purposes only)
mock: false
mock_default_user: "test@example.com"
# For information on configuring an Okta tenant as an OIDC IdP refer to Okta documentation at:
# https://developer.okta.com/docs/reference/api/oidc/#2-okta-as-the-identity-platform-for-your-app-or-api
okta:
discovery_url: ""
client_id: ""
client_secret: ""
redirect_url: "{{BASE_URL}}/login/okta/login/"
scope: "openid email"
cognito:
# You must create a user pool in order to have a discovery url
discovery_url: "https://cognito-idp.{REGION}.amazonaws.com/{USER-POOL-ID}/.well-known/openid-configuration"
client_id: ""
client_secret: ""
redirect_url: "{{BASE_URL}}/login/cognito/login/"
scope: "openid email"
# In the case where Cognito is being used solely as an intermediary to a single IdP,
# and that IdP is a SAML IdP with no 'email_verified' outgoing claim, but it is safe
# to assume all emails from this SAML IdP are in fact verified, we may set this to True
# assume_emails_verified: False
# CILogon subscribers can create and manage OIDC clients using COmanage Registry.
# Free tier users may request OIDC clients at https://cilogon.org/oauth2/register
cilogon:
discovery_url: "https://cilogon.org/.well-known/openid-configuration"
client_id: ""
client_secret: ""
# When registering the Callback URLs for your CILogon OIDC client be
# sure to include the FULL url for this deployment, including the https:// scheme
# and server FQDN.
redirect_url: "{{BASE_URL}}/login/cilogon/login/"
scope: "openid email profile"
# if mock is true, will fake a successful login response for login
# WARNING: DO NOT ENABLE IN PRODUCTION (for testing purposes only)
mock: false
mock_default_user: "http://cilogon.org/serverT/users/64703"
synapse:
discovery_url: ""
client_id: ""
client_secret: ""
redirect_url: ""
scope: "openid"
shibboleth:
client_id: ""
client_secret: ""
redirect_url: "{{BASE_URL}}/login/shib/login"
# these are the *possible* scopes a client can be given, NOT scopes that are
# given to all clients. You can be more restrictive during client creation
# -- (list) These are the *possible* scopes a client can be given, NOT scopes that are given to all clients. You can be more restrictive during client creation