Skip to content

Harden Helm admin API defaults - #1524

Merged
xxx7xxxx merged 2 commits into
easegress-io:mainfrom
xxx7xxxx:dev
Jul 1, 2026
Merged

xxx7xxxx merged 2 commits into
easegress-io:mainfrom
xxx7xxxx:dev

Conversation

@xxx7xxxx

@xxx7xxxx xxx7xxxx commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Address

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens the Easegress Helm chart defaults so the Admin API is not exposed unintentionally, while adding chart-level tests to prevent regressions. It fits into the codebase by tightening Kubernetes deployment defaults and adding Go-based checks for Helm chart security posture.

Changes:

  • Default Admin API to loopback (127.0.0.1:2381) and disable the admin Service by default; require explicit opt-in + authentication for external exposure.
  • Reduce default Kubernetes privileges by disabling service account token automount and gating Secrets read RBAC behind a value flag.
  • Add Helm chart security tests and ensure CI/make test runs them when chart files change.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Makefile Runs go test for the Helm chart package as part of make test.
helm-charts/easegress/values.yaml Introduces hardened defaults and new knobs for admin exposure/auth, SA token automount, and secrets RBAC.
helm-charts/easegress/templates/StatefulSet.yaml Sets automountServiceAccountToken from values for primary workloads.
helm-charts/easegress/templates/Service.yaml Adds an opt-in admin Service and enforces auth for external exposure.
helm-charts/easegress/templates/Deployment.yaml Sets automountServiceAccountToken from values for secondary workloads.
helm-charts/easegress/templates/ConfigMap.yaml Wires admin.apiAddr and optional basic-auth into generated Easegress config.
helm-charts/easegress/templates/ClusterRole.yaml Gates Secrets permissions behind rbac.readSecrets.
helm-charts/easegress/README.md Documents new secure defaults and how to intentionally expose/administer the Admin API.
helm-charts/easegress/chart_security_test.go Adds Go tests to assert chart defaults and template guardrails.
.github/workflows/test.yml Triggers tests when Helm chart files change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +30 to +34
{{- $adminType := default "ClusterIP" .Values.service.admin.type -}}
{{- $adminExternallyExposed := or (eq $adminType "NodePort") (eq $adminType "LoadBalancer") -}}
{{- if and .Values.service.admin.enabled $adminExternallyExposed (empty .Values.admin.basicAuth) (not .Values.admin.allowUnsafeNoAuth) -}}
{{- fail "admin service type NodePort/LoadBalancer requires admin.basicAuth or admin.allowUnsafeNoAuth=true" -}}
{{- end }}
@xxx7xxxx
xxx7xxxx added this pull request to the merge queue Jul 1, 2026
Merged via the queue into easegress-io:main with commit 3bdb192 Jul 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants