Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions charts/trustify/templates/helpers/_oidc.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,20 @@ Arguments: (dict)
UI scopes passed to the backend for the frontend client.
Arguments: .
*/}}
{{- define "trustification.oidc.uiScopes" -}}
{{- if .Values.oidc.uiScopes -}}
{{- .Values.oidc.uiScopes -}}
{{- define "trustification.oidc.uiScope" -}}
{{- if .Values.oidc.uiScope -}}
{{- .Values.oidc.uiScope -}}
{{- end -}}
{{- end -}}

{{/*
OIDC user Info boolean.
Arguments: .
*/}}
{{- define "trustification.oidc.loadUser" -}}
{{- .Values.oidc.loadUser | quote -}}
{{- end -}}

{{/*
Configuration required for setting up an OIDC client for making requests

Expand Down
6 changes: 4 additions & 2 deletions charts/trustify/templates/services/server/030-Deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ spec:
value: {{ include "trustification.oidc.frontendIssuerUrl" . }}
- name: UI_CLIENT_ID
value: {{ include "trustification.oidc.frontendClientId" . }}
{{- with (include "trustification.oidc.uiScopes" . | trim) }}
- name: UI_SCOPES
- name: UI_LOAD_USER
value: {{ include "trustification.oidc.loadUser" . }}
{{- with (include "trustification.oidc.uiScope" . | trim) }}
- name: UI_SCOPE
value: {{ . | quote }}
{{- end }}

Expand Down
9 changes: 7 additions & 2 deletions charts/trustify/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -762,9 +762,9 @@
"type": "object",
"additionalProperties": false,
"properties": {
"uiScopes": {
"uiScope": {
"type": "string",
"description": "Optional value for the `UI_SCOPES` environment variable in the server deployment.\n"
"description": "Optional value for the `UI_SCOPE` environment variable in the server deployment.\n"
},
"issuerUrl": {
"$ref": "#/definitions/ValueOrRef"
Expand All @@ -774,6 +774,11 @@
"description": "Use insecure TLS when communicating with the issuer (DANGER!)\n",
"default": false
},
"loadUser": {
"type": "boolean",
"description": "Value for the `UI_LOAD_USER` environment variable in the server deployment\n",
"default": true
},
"clients": {
"properties": {
"frontend": {
Expand Down
10 changes: 8 additions & 2 deletions charts/trustify/values.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -592,10 +592,10 @@ definitions:
type: object
additionalProperties: false
properties:
uiScopes:
uiScope:
type: string
description: |
Optional value for the `UI_SCOPES` environment variable in the server deployment.
Optional value for the `UI_SCOPE` environment variable in the server deployment.

issuerUrl:
$ref: "#/definitions/ValueOrRef"
Expand All @@ -606,6 +606,12 @@ definitions:
Use insecure TLS when communicating with the issuer (DANGER!)
default: false

loadUser:
type: boolean
description: |
Value for the `UI_LOAD_USER` environment variable in the server deployment
default: true

clients:
properties:
frontend:
Expand Down
3 changes: 2 additions & 1 deletion charts/trustify/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ openshift:
useServiceCa: true

oidc:
uiScopes: ""
uiScope: ""
loadUser: true
clients:
frontend: {}
cli:
Expand Down
Loading