You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error from server (Forbidden): secrets is forbidden: User "system:serviceaccount:default:sidecar" cannot list resource "secrets" in API group "" in the namespace "default"
simonsystem
changed the title
Ability to limit serviceaccount access to one secret only
Ability to limit serviceaccount to read only specified secrets/configmaps
Dec 20, 2024
For security reason, we would like to restrict access for the sidecar service-account to get only one named secret with the
resourceNames
option.See the following role:
Poorly, the sidecar is using the list_namespaced_secret and list_namespaced_config_map functions here. So it will result in a forbidden response from K8S-API (403).
I suggest adding functionality to fetch/get only specefied secrets/configmaps from K8S-API using read_namespaced_secret and read_namespaced_config_map.
An idea would be to add another environment variable
RESOURCE_NAME
for having a comma-separated list of secrets/configmaps being fetched.The text was updated successfully, but these errors were encountered: