Skip to content

Commit

Permalink
feat(helm): new value to opt-out from cluster-wide view access to sec…
Browse files Browse the repository at this point in the history
…rets
  • Loading branch information
erikgb committed Jan 30, 2025
1 parent a917763 commit a095ac3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/gitops-server/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ rules:
{{- with .Values.rbac.impersonationResourceNames }}
resourceNames: {{ . | toJson }}
{{- end }}
{{- if .Values.rbac.viewSecretsEnabled }}
# Access to enterprise entitlement
- apiGroups: [""]
resources: [ "secrets" ]
Expand All @@ -26,6 +27,7 @@ rules:
{{- with (or .Values.rbac.viewSecretsResourceNames .Values.rbac.viewSecrets) }}
resourceNames: {{ . | toJson }}
{{- end }}
{{- end }}

# The service account needs to read namespaces to know where it can query
- apiGroups: [ "" ]
Expand Down
3 changes: 3 additions & 0 deletions charts/gitops-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ rbac:
impersonationResourceNames: []
# -- Limit the type of principal that can be impersonated
impersonationResources: ["users", "groups"]
# -- Specifies whether the service account should have cluster-wide view access to secrets.
# If enabled, the secrets permitted to read can be limited by name with `viewSecretsResourceNames`.
viewSecretsEnabled: true
# -- If non-empty, this limits the secrets that can be accessed by
# the service account to the specified ones, e.g. `['weave-gitops-enterprise-credentials']`
viewSecretsResourceNames: ["cluster-user-auth", "oidc-auth"]
Expand Down

0 comments on commit a095ac3

Please sign in to comment.