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

fix(security): disable automatic mounting of service account tokens #45056

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
6 changes: 3 additions & 3 deletions chart/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5594,7 +5594,7 @@
"automountServiceAccountToken": {
"description": "Specifies if ServiceAccount's API credentials should be mounted onto Pods",
"type": "boolean",
"default": true
"default": false
},
"create": {
"description": "Specifies whether a ServiceAccount should be created.",
Expand Down Expand Up @@ -6782,7 +6782,7 @@
"automountServiceAccountToken": {
"description": "Specifies if ServiceAccount's API credentials should be mounted onto Pods",
"type": "boolean",
"default": true
"default": false
},
"create": {
"description": "Specifies whether a ServiceAccount should be created.",
Expand Down Expand Up @@ -7397,7 +7397,7 @@
"automountServiceAccountToken": {
"description": "Specifies if ServiceAccount's API credentials should be mounted onto Pods",
"type": "boolean",
"default": true
"default": false
},
"create": {
"description": "Specifies whether a ServiceAccount should be created.",
Expand Down
6 changes: 3 additions & 3 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ webserver:
serviceAccount:
# default value is true
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
automountServiceAccountToken: true
automountServiceAccountToken: false
# Specifies whether a ServiceAccount should be created
create: true
# The name of the ServiceAccount to use.
Expand Down Expand Up @@ -2096,7 +2096,7 @@ statsd:
serviceAccount:
# default value is true
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
automountServiceAccountToken: true
automountServiceAccountToken: false
# Specifies whether a ServiceAccount should be created
create: true
# The name of the ServiceAccount to use.
Expand Down Expand Up @@ -2181,7 +2181,7 @@ pgbouncer:
serviceAccount:
# default value is true
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
automountServiceAccountToken: true
automountServiceAccountToken: false
# Specifies whether a ServiceAccount should be created
create: true
# The name of the ServiceAccount to use.
Expand Down
2 changes: 1 addition & 1 deletion helm_tests/other/test_pgbouncer.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def test_default_automount_service_account_token(self):
},
show_only=["templates/pgbouncer/pgbouncer-serviceaccount.yaml"],
)
assert jmespath.search("automountServiceAccountToken", docs[0]) is True
assert jmespath.search("automountServiceAccountToken", docs[0]) is False

def test_overridden_automount_service_account_token(self):
docs = render_chart(
Expand Down
2 changes: 1 addition & 1 deletion helm_tests/other/test_statsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def test_default_automount_service_account_token(self):
},
show_only=["templates/statsd/statsd-serviceaccount.yaml"],
)
assert jmespath.search("automountServiceAccountToken", docs[0]) is True
assert jmespath.search("automountServiceAccountToken", docs[0]) is False

def test_overridden_automount_service_account_token(self):
docs = render_chart(
Expand Down
2 changes: 1 addition & 1 deletion helm_tests/webserver/test_webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ def test_default_automount_service_account_token(self):
},
show_only=["templates/webserver/webserver-serviceaccount.yaml"],
)
assert jmespath.search("automountServiceAccountToken", docs[0]) is True
assert jmespath.search("automountServiceAccountToken", docs[0]) is False

def test_overridden_automount_service_account_token(self):
docs = render_chart(
Expand Down
Loading