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
Describe the bug
When processing an admission request, that has been processed previously, the environment variables assigned during the first invocation are kept.
Failing to do so might result in a situation where the wrong credentials are projected into the container, if another admission plugin modifies the serviceAccountName.
Steps To Reproduce
Configure another mutating admission webhook (e.g. a Kyverno policy) that
is invoked after the aks-webhook-admission-controller
sets the .spec.serviceAccountName to unprivilged-account
Create a Pod that
uses Azure Workload Identities
has its serviceAccountName set to admin-account
Observe that the resulting container is assigned to the service account unprivileged-account (as per policy) while still possessing the admin-account's credentials (e.g CLIENT_ID and CLIENT_SECRET).
Expected behavior
The mutation webhook should update the SDK environment variables (e.g. CLIENT_ID, CLIENT_SECRET) whenever reinvoked.
Environment
Kubernetes version (use kubectl version): 1.28.3
Cloud provider or hardware configuration: Azure AKS
OS (e.g: cat /etc/os-release): Ubuntu
Additional context
The reinvocation has originally been added by #794.
The text was updated successfully, but these errors were encountered:
Describe the bug
When processing an admission request, that has been processed previously, the environment variables assigned during the first invocation are kept.
Failing to do so might result in a situation where the wrong credentials are projected into the container, if another admission plugin modifies the
serviceAccountName
.Steps To Reproduce
aks-webhook-admission-controller
.spec.serviceAccountName
tounprivilged-account
serviceAccountName
set toadmin-account
unprivileged-account
(as per policy) while still possessing theadmin-account
's credentials (e.gCLIENT_ID
andCLIENT_SECRET
).Expected behavior
The mutation webhook should update the SDK environment variables (e.g.
CLIENT_ID
,CLIENT_SECRET
) whenever reinvoked.Environment
kubectl version
): 1.28.3cat /etc/os-release
): UbuntuAdditional context
The reinvocation has originally been added by #794.
The text was updated successfully, but these errors were encountered: