Skip to content

Commit

Permalink
Condition test users on dev mode (#1567)
Browse files Browse the repository at this point in the history
* condition test users on dev mode

* Update values.yaml
  • Loading branch information
theosanderson authored Apr 8, 2024
1 parent e233ac4 commit 6e4c9f7
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 124 deletions.
250 changes: 126 additions & 124 deletions kubernetes/loculus/templates/keycloak-config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,141 +29,143 @@ data:
"accessTokenLifespan": 36000,
"ssoSessionIdleTimeout": 36000,
"users": [
{{- $browsers := list "firefox" "webkit" "chromium"}}
{{- range $_, $browser := $browsers }}
{{- range $index, $_ := until 20}}
{
"username": "testuser_{{$index}}_{{$browser}}",
"enabled": true,
"email": "testuser_{{$index}}_{{$browser}}@void.o",
"emailVerified": true,
"firstName": "{{$index}}_{{$browser}}",
"lastName": "TestUser",
"credentials": [
{
"type": "password",
"value": "testuser_{{$index}}_{{$browser}}"
{{ if $.Values.devMode }}
{{- $browsers := list "firefox" "webkit" "chromium"}}
{{- range $_, $browser := $browsers }}
{{- range $index, $_ := until 20}}
{
"username": "testuser_{{$index}}_{{$browser}}",
"enabled": true,
"email": "testuser_{{$index}}_{{$browser}}@void.o",
"emailVerified": true,
"firstName": "{{$index}}_{{$browser}}",
"lastName": "TestUser",
"credentials": [
{
"type": "password",
"value": "testuser_{{$index}}_{{$browser}}"
}
],
"realmRoles": [
"user",
"offline_access"
],
"attributes": {
"university": "University of Test"
},
"clientRoles": {
"account": [
"manage-account"
]
}
],
"realmRoles": [
"user",
"offline_access"
],
"attributes": {
"university": "University of Test"
},
"clientRoles": {
"account": [
"manage-account"
]
}
},
{{ end }}
{{ end }}
{{ end }}
{
"username": "testuser",
"enabled": true,
"email": "[email protected]",
"emailVerified" : true,
"firstName": "Test",
"lastName": "User",
"credentials": [
{
"type": "password",
"value": "testuser"
{
"username": "testuser",
"enabled": true,
"email": "[email protected]",
"emailVerified" : true,
"firstName": "Test",
"lastName": "User",
"credentials": [
{
"type": "password",
"value": "testuser"
}
],
"realmRoles": [
"user",
"offline_access"
],
"attributes": {
"university": "University of Test"
},
"clientRoles": {
"account": [
"manage-account"
]
}
],
"realmRoles": [
"user",
"offline_access"
],
"attributes": {
"university": "University of Test"
},
"clientRoles": {
"account": [
"manage-account"
]
}
},
{
"username": "insdc_ingest_user",
"enabled": true,
"email": "[email protected]",
"emailVerified" : true,
"firstName": "INSDC Ingest",
"lastName": "User",
"credentials": [
{
"type": "password",
"value": "insdc_ingest_user"
{
"username": "insdc_ingest_user",
"enabled": true,
"email": "[email protected]",
"emailVerified" : true,
"firstName": "INSDC Ingest",
"lastName": "User",
"credentials": [
{
"type": "password",
"value": "insdc_ingest_user"
}
],
"realmRoles": [
"user",
"offline_access"
],
"attributes": {
"university": "University of Test"
},
"clientRoles": {
"account": [
"manage-account"
]
}
],
"realmRoles": [
"user",
"offline_access"
],
"attributes": {
"university": "University of Test"
},
"clientRoles": {
"account": [
"manage-account"
]
}
},
{
"username": "dummy_preprocessing_pipeline",
"enabled": true,
"email": "[email protected]",
"emailVerified" : true,
"firstName": "Dummy",
"lastName": "Preprocessing",
"credentials": [
{
"type": "password",
"value": "dummy_preprocessing_pipeline"
{
"username": "dummy_preprocessing_pipeline",
"enabled": true,
"email": "[email protected]",
"emailVerified" : true,
"firstName": "Dummy",
"lastName": "Preprocessing",
"credentials": [
{
"type": "password",
"value": "dummy_preprocessing_pipeline"
}
],
"realmRoles": [
"preprocessing_pipeline",
"offline_access"
],
"attributes": {
"university": "University of Test"
},
"clientRoles": {
"account": [
"manage-account"
]
}
],
"realmRoles": [
"preprocessing_pipeline",
"offline_access"
],
"attributes": {
"university": "University of Test"
},
"clientRoles": {
"account": [
"manage-account"
]
}
},
{
"username": "superuser",
"enabled": true,
"email": "[email protected]",
"emailVerified" : true,
"firstName": "Dummy",
"lastName": "SuperUser",
"credentials": [
{
"type": "password",
"value": "superuser"
{
"username": "superuser",
"enabled": true,
"email": "[email protected]",
"emailVerified" : true,
"firstName": "Dummy",
"lastName": "SuperUser",
"credentials": [
{
"type": "password",
"value": "superuser"
}
],
"realmRoles": [
"super_user",
"offline_access"
],
"attributes": {
"university": "University of Test"
},
"clientRoles": {
"account": [
"manage-account"
]
}
],
"realmRoles": [
"super_user",
"offline_access"
],
"attributes": {
"university": "University of Test"
},
"clientRoles": {
"account": [
"manage-account"
]
}
},
{{ end }}
{
"username": "silo_import_job",
"enabled": true,
Expand Down
1 change: 1 addition & 0 deletions kubernetes/loculus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -900,3 +900,4 @@ auth:
envelopeFrom: "[email protected]"
verifyEmail: true
resetPasswordAllowed: true
devMode: true # TODO https://github.com/loculus-project/loculus/issues/1568: remove this from default Values

0 comments on commit 6e4c9f7

Please sign in to comment.