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
**Note**: The service account key *must* be named `cloud-sa.json` at driver deploy time
34
34
35
35
However, if there is no pre-existing service account for use the provided script
36
-
can be used to create a new service account with all the required permissions:
36
+
can be used to create a new service account with all the required permissions.
37
+
38
+
#### Security Note: Service Account Impersonation
39
+
40
+
The CSI driver requires the `roles/iam.serviceAccountUser` role to impersonate node service accounts when attaching and detaching disks. This role can be configured in two ways:
41
+
42
+
***Recommended (Scoped)**: Grant the role only for specific node service accounts
43
+
***Default (Project-wide)**: Allow project-wide service account impersonation (less secure)
44
+
45
+
For improved security, specify the node service accounts that the CSI driver needs to impersonate using the `NODE_SERVICE_ACCOUNTS` environment variable. This limits the role to only the specified accounts. Without `NODE_SERVICE_ACCOUNTS`, the CSI driver can impersonate any service account in the project.
For more details, see [How to remediate over privileged service account users](https://cloud.google.com/security-command-center/docs/how-to-remediate-security-health-analytics-findings#over_privileged_service_account_user).
52
+
53
+
#### Create service account for the CSI driver
37
54
38
55
```console
39
56
$ PROJECT=your-project-here # GCP project
@@ -46,9 +63,10 @@ $ ./deploy/setup-project.sh
46
63
deployment, all actions performed by the driver will be performed as the
0 commit comments