diff --git a/docs/fleet-wif-notes.md b/docs/fleet-wif-notes.md new file mode 100644 index 000000000..2a43957bd --- /dev/null +++ b/docs/fleet-wif-notes.md @@ -0,0 +1,102 @@ +# Fleet Workload Identity Authentication + +This page contains example configuration to configure the `gcs-fuse-csi-driver` +with [Fleet Workload Identity](https://cloud.google.com/anthos/fleet-management/docs/use-workload-identity) +authentication in environments configured for +[Workload Identity Federation](https://cloud.google.com/iam/docs/workload-identity-federation) +outside of the Google Cloud. + +## `external_account` Credentials + +Instead of the Google Service Account key file, it is possible to pass a Fleet Workload Identity configuration +JSON file to the process that needs authenticating to the Google API in a Kubernetes cluster configured for +the Workload Identity Federation. The `gcs-fuse-csi-driver` pods are such processes +that need to authenticate to the Google Cloud Storage service API to provide access to the data stores in the +Google Cloud Storage buckets. + +Such configuration file contains `external_account` type of credential that does not contain any secrets similar +to the Google Service Account key. The configuration should be passed via the `GOOGLE_APPLICATION_CREDENTIALS` +environment variable, which requires the file name of the file containing the configuration on +the pod's local file system. + +A ConfigMap to host the contents of the configuration file for the `GOOGLE_APPLICATION_CREDENTIALS` environment variable +of pods on Kubernetes clusters, such as Anthos on Bare Metal clusters, that require accessing Google Cloud API using +[Fleet Workload Identity](https://cloud.google.com/kubernetes-engine/fleet-management/docs/use-workload-identity) can be created +like illustrated in the following snippet: + +```yaml +cat <