Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(helm): allow configuring security section of management api conf… #4941

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
11 changes: 10 additions & 1 deletion helm/templates/api/api-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,16 @@ data:
{{- end }}
# Allows to define if cookie secure only (default false)
cookie-secure: {{ .Values.api.jwt.cookie.secure | default false }}

security:
defaultAdmin: {{ .Values.api.security.defaultAdmin | default true }}
accountAccessTokens:
encoder:
settings:
rounds: {{ .Values.api.security.accountTokenBcryptRounds | default 10 }}
{{- if .Values.api.security.providers }}
providers:
{{- toYaml .Values.api.security.providers | nindent 8 }}
{{- end}}
Comment on lines +399 to +408
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: I would do a test on the security section as you did for .Values.api.security.providers line 405. In that way we are expecting the same structure as the one in the gravitee.yaml. And in future if new entries in the security section are added, they will be taken into account automatically. wdyt ?

{{- if .Values.userManagement }}
user:
{{ toYaml .Values.userManagement | indent 6 }}
Expand Down
24 changes: 24 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,30 @@ api:
internalPortName: http
# appProtocol: http
# annotations:
security:
defaultAdmin: true
accountTokenBcryptRounds: 10
providers:
- type: memory
enabled: false
## Name of IdentityProvider
## If missing the type will be used to create a generic name (ex: Memory users)
#name:
## password encoding/hashing algorithm. One of:
## - BCrypt : passwords are hashed with bcrypt (supports only $2a$ algorithm)
## - none : passwords are not hashed/encrypted
#default value is BCrypt
password-encoding-algo: BCrypt
users:
- user:
username: admin
#email:
firstname: Administrator
lastname: Administrator
## Passwords are encoded using BCrypt
## Password value: adminadmin
password: $2a$10$NG5WLbspq8V1yJDzUKfUK.oum94qL/Ne3B5fQCgekw/Y4aOEaoFZq
role: ORGANIZATION_OWNER
Comment on lines +439 to +462
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you accept the comment made for the api-configmap.yalm this section will have to be updated for the accountToken.

securityContext:
runAsUser: 1001
runAsNonRoot: true
Expand Down