Skip to content
Snippets Groups Projects
Commit 208e7e9f authored by OZGCloud's avatar OZGCloud
Browse files

OZG-7092 modify deployment chart for postfachId mappings

parent 4856d08a
Branches
No related tags found
1 merge request!1OZG-7092 Anpassung TokenChecker
......@@ -70,10 +70,14 @@ spec:
value: file:///keystore/enc.crt
- name: OZGCLOUD_TOKEN_CHECK_ENTITIES_0_METADATA
value: file:///metadata/muk-idp-infra.xml
- name: OZGCLOUD_TOKEN_CHECK_ENTITIES_0_USE-ID-AS-POSTKORB-HANDLE
value: {{ quote (index ((.Values.ozgcloud).tokenChecker).entities 0).useIdAsPostkorbHandle | default "\"true\""}}
- name: OZGCLOUD_TOKEN_CHECK_ENTITIES_0_USE-ID-AS-POSTFACH-ID
value: {{ quote (index ((.Values.ozgcloud).tokenChecker).entities 0).useIdAsPostfachId | default "\"true\""}}
- name: OZGCLOUD_TOKEN_CHECK_ENTITIES_0_MAPPINGS_TRUST-LEVEL
value: {{ required "at least one ozgcloud.token.check.entities.mappings trustlevel must be set" (index ((.Values.ozgcloud).tokenChecker).entities 0).mappings.trustLevel }}
{{- if eq (index ((.Values.ozgcloud).tokenChecker).entities 0).useIdAsPostfachId false }}
- name: OZGCLOUD_TOKEN_CHECK_ENTITIES_0_MAPPINGS_POSTFACH-ID
value: {{ required "at least one ozgcloud.token.check.entities.mappings postfachId must be set" (index ((.Values.ozgcloud).tokenChecker).entities 0).mappings.postfachId }}
{{- end }}
{{- with include "app.getCustomList" . }}
{{ . | indent 10 }}
......
......@@ -130,11 +130,6 @@ tests:
content:
name: OZGCLOUD_TOKEN_CHECK_ENTITIES_0_METADATA
value: file:///metadata/muk-idp-infra.xml
- contains:
path: spec.template.spec.containers[0].env
content:
name: OZGCLOUD_TOKEN_CHECK_ENTITIES_0_USE-ID-AS-POSTKORB-HANDLE
value: "true"
- contains:
path: spec.template.spec.containers[0].env
content:
......@@ -169,3 +164,77 @@ tests:
asserts:
- failedTemplate:
errormessage: "at least one ozgcloud.token.check.entities.mappings trustlevel must be set"
- it: should set default for useIdAsPostfachId
set:
env.customList:
- name: my_test_environment_name
value: "A test value"
- name: test_environment
value: "B test value"
imagePullSecret: test-image-secret
samlRegistrationSecretName: muk-saml-registration-secret
ozgcloud:
environment: dev
tokenChecker:
entities:
- idpEntityId: https://idp-id
mappings:
trustLevel: TrustLevelNameUsedByIdp
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: OZGCLOUD_TOKEN_CHECK_ENTITIES_0_USE-ID-AS-POSTFACH-ID
value: "true"
- it: should set custom mapping for PostfachId
set:
env.customList:
- name: my_test_environment_name
value: "A test value"
- name: test_environment
value: "B test value"
imagePullSecret: test-image-secret
samlRegistrationSecretName: muk-saml-registration-secret
ozgcloud:
environment: dev
tokenChecker:
entities:
- idpEntityId: https://idp-id
useIdAsPostfachId: false
mappings:
trustLevel: TrustLevelNameUsedByIdp
postfachId: PostfachIdNameUsedByIdp
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: OZGCLOUD_TOKEN_CHECK_ENTITIES_0_USE-ID-AS-POSTFACH-ID
value: "false"
- contains:
path: spec.template.spec.containers[0].env
content:
name: OZGCLOUD_TOKEN_CHECK_ENTITIES_0_MAPPINGS_POSTFACH-ID
value: PostfachIdNameUsedByIdp
- it: should set fail due to missing mapping for PostfachId
set:
env.customList:
- name: my_test_environment_name
value: "A test value"
- name: test_environment
value: "B test value"
imagePullSecret: test-image-secret
samlRegistrationSecretName: muk-saml-registration-secret
ozgcloud:
environment: dev
tokenChecker:
entities:
- idpEntityId: https://idp-id
useIdAsPostfachId: false
mappings:
trustLevel: TrustLevelNameUsedByIdp
asserts:
- failedTemplate:
errormessage: "at least one ozgcloud.token.check.entities.mappings postfachId must be set"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment