Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
20fe494
PBM-1660
rasika-chivate Feb 23, 2026
c8628e3
Create workload_identity_auth.md
rasika-chivate Feb 23, 2026
0c990aa
Update workload_identity_auth.md
rasika-chivate Feb 23, 2026
30df35c
Update workload_identity_auth.md
rasika-chivate Feb 23, 2026
cd9e686
Update workload_identity_auth.md
rasika-chivate Feb 23, 2026
5b65344
Update mkdocs-base.yml
rasika-chivate Feb 23, 2026
6a6ab6a
changed file name
rasika-chivate Feb 23, 2026
162cb6f
Update workload-identity-auth.md
rasika-chivate Feb 23, 2026
52a58d2
Update workload-identity-auth.md
rasika-chivate Feb 23, 2026
673d20a
Update workload-identity-auth.md
rasika-chivate Feb 23, 2026
82948f2
Update workload-identity-auth.md
rasika-chivate Feb 23, 2026
71deba5
Update workload-identity-auth.md
rasika-chivate Feb 23, 2026
1ae0b80
Update workload-identity-auth.md
rasika-chivate Feb 23, 2026
754d42e
Update workload-identity-auth.md
rasika-chivate Feb 23, 2026
79b800b
Update workload-identity-auth.md
rasika-chivate Feb 23, 2026
839a1ef
Update docs/details/workload-identity-auth.md
rasika-chivate Feb 23, 2026
6872d36
Update docs/details/workload-identity-auth.md
rasika-chivate Feb 23, 2026
a6e1b6d
Update docs/details/workload-identity-auth.md
rasika-chivate Feb 23, 2026
65b46e2
Update docs/details/workload-identity-auth.md
rasika-chivate Feb 23, 2026
9545352
Update workload-identity-auth.md
rasika-chivate Feb 24, 2026
6ec13b9
implemented feedback
rasika-chivate Feb 24, 2026
176b9a9
Update workload-identity-auth.md
rasika-chivate Feb 24, 2026
ea94464
Update workload-identity-auth.md
rasika-chivate Feb 24, 2026
ed24bae
Update workload-identity-auth.md
rasika-chivate Feb 24, 2026
b7ff186
Update docs/details/workload-identity-auth.md
rasika-chivate Feb 24, 2026
3e95c92
Update docs/details/workload-identity-auth.md
rasika-chivate Feb 24, 2026
d228d64
Update docs/details/workload-identity-auth.md
rasika-chivate Feb 24, 2026
4d82e49
Update docs/details/workload-identity-auth.md
rasika-chivate Feb 24, 2026
efee755
Update docs/details/workload-identity-auth.md
rasika-chivate Feb 24, 2026
39cdf23
Update docs/details/workload-identity-auth.md
rasika-chivate Feb 24, 2026
6a46e74
Update docs/details/workload-identity-auth.md
rasika-chivate Feb 24, 2026
0e8380e
Update docs/details/workload-identity-auth.md
rasika-chivate Feb 24, 2026
7db123f
Update workload-identity-auth.md
rasika-chivate Feb 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 134 additions & 0 deletions docs/details/workload-identity-auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# Workload Identity authentication for Google Cloud Storage

Check warning on line 1 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L1

[Google.Headings] 'Workload Identity authentication for Google Cloud Storage' should use sentence-style capitalization.
Raw output
{"message": "[Google.Headings] 'Workload Identity authentication for Google Cloud Storage' should use sentence-style capitalization.", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 1, "column": 3}}}, "severity": "WARNING"}

Check warning on line 1 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L1

[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.
Raw output
{"message": "[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 1, "column": 47}}}, "severity": "WARNING"}

!!! admonition "Version added: 2.13.0"
Workload Identity Federation (WIF) for Google Cloud Storage (GCS) is supported in PBM version 2.13.0 or later.

Check warning on line 4 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L4

[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.
Raw output
{"message": "[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 4, "column": 51}}}, "severity": "WARNING"}

Percona Backup for MongoDB (PBM) now supports Workload Identity Federation (WIF) for authenticating with Google Cloud Storage (GCS).

Check warning on line 6 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L6

[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.
Raw output
{"message": "[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 6, "column": 113}}}, "severity": "WARNING"}

This feature enables secure backup uploads without relying on static service account JSON keys. Instead, PBM uses short-lived, **automatically refreshed tokens** obtained through federation with an external identity provider (IdP).

Workload Identity Federation lets on-premises or multicloud workloads access Google Cloud resources using federated identities instead of a service account key, eliminating the maintenance and security burden of service account keys.

Check warning on line 10 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L10

[Vale.Spelling] Did you really mean 'multicloud'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'multicloud'?", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 10, "column": 50}}}, "severity": "WARNING"}

Check warning on line 10 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L10

[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.
Raw output
{"message": "[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 10, "column": 85}}}, "severity": "WARNING"}


!!! note
The exact configuration steps depend on where PBM is deployed (GCE VM, GKE, on-prem, AWS, Azure, GitHub Actions, etc.). This section outlines the requirements for PBM and provides a comprehensive end-to-end example for GCE VM, which is the simplest setup.


## How it works with PBM

PBM integrates with Workload Identity Federation as follows:
{.power-number}

1. PBM authenticates with its external IdP (e.g., OIDC, SAML, AWS, Azure).

Check failure on line 22 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L22

[Google.Latin] Use 'for example' instead of 'e.g.'.
Raw output
{"message": "[Google.Latin] Use 'for example' instead of 'e.g.'.", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 22, "column": 45}}}, "severity": "ERROR"}

2. PBM exchanges the IdP credential with Google’s Security Token Service (STS).

3. STS issues a short-lived federated token.

4. PBM uses this token to impersonate a Google Cloud service account with the required GCS permissions. PBM communicates with GCS using Google Cloud libraries/SDKs (PBM 2.10.0+ uses the Google Cloud SDK for GCS).

Check warning on line 28 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L28

[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.
Raw output
{"message": "[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 28, "column": 48}}}, "severity": "WARNING"}

Check warning on line 28 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L28

[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.
Raw output
{"message": "[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 28, "column": 144}}}, "severity": "WARNING"}

Check warning on line 28 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L28

[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.
Raw output
{"message": "[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 28, "column": 194}}}, "severity": "WARNING"}

5. Backups are uploaded securely to GCS without static keys.

With Workload Identity Authentication, PBM uses [Application Default Credentials :octicons-link-external-16:](https://cloud.google.com/docs/authentication/application-default-credentials) (ADC) provided by the runtime, such as the GKE metadata server or an external Workload Identity Federation credential configuration file. When ADC is available, PBM can upload and download backups from Google Cloud Storage (GCS) **without the need to embed JSON private keys** in the PBM configuration.

Check warning on line 32 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L32

[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.
Raw output
{"message": "[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 32, "column": 398}}}, "severity": "WARNING"}

## Prerequisites

To use Workload Identity with GCS, you must have the following:
{.power-number}

1. Your runtime environment must provide ADC.
- A Google Compute Engine (GCE) VM or GKE node/pod with Google identity available via metadata server, or

- An external WIF credential configuration file referenced via `GOOGLE_APPLICATION_CREDENTIALS`.

2. The Google service account (GSA) that PBM uses must have the required GCS permissions on the target bucket.

3. Enable Workload Identity in PBM’s GCS storage config:

```yaml
storage:
type: gcs
gcs:
bucket: <YOUR_BUCKET_NAME>
prefix: <YOUR_PREFIX>
credentials:
workloadIdentity: true
```
PBM will then use the ADC credentials provided by the environment (rather than a static JSON private key). You can find [the configuration file template :octicons-link-external-16:](https://github.com/percona/percona-backup-mongodb/blob/v{{release}}/packaging/conf/pbm-conf-reference.yml) and uncomment the required fields.

Check warning on line 57 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L57

[Google.Will] Avoid using 'will'.
Raw output
{"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 57, "column": 9}}}, "severity": "WARNING"}


## Use case: GCE Virtual Machine (simplest path)

Check warning on line 60 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L60

[Google.Headings] 'Use case: GCE Virtual Machine (simplest path)' should use sentence-style capitalization.
Raw output
{"message": "[Google.Headings] 'Use case: GCE Virtual Machine (simplest path)' should use sentence-style capitalization.", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 60, "column": 4}}}, "severity": "WARNING"}

!!! info "Important"
These commands assume the **Google Cloud CLI** (gcloud) is installed and configured on the machine you run them from, and that you have permission to create service accounts, VMs, and update IAM.

Check warning on line 63 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L63

[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.
Raw output
{"message": "[Google.WordList] Use 'Google Cloud Platform' or 'GCP' instead of 'Cloud'.", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 63, "column": 40}}}, "severity": "WARNING"}

Check warning on line 63 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L63

[Google.WordList] Use 'command-line tool' instead of 'CLI'.
Raw output
{"message": "[Google.WordList] Use 'command-line tool' instead of 'CLI'.", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 63, "column": 46}}}, "severity": "WARNING"}

Check warning on line 63 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L63

[Vale.Spelling] Did you really mean 'gcloud'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'gcloud'?", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 63, "column": 53}}}, "severity": "WARNING"}

Check warning on line 63 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L63

[Vale.Spelling] Did you really mean 'VMs'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'VMs'?", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 63, "column": 180}}}, "severity": "WARNING"}

On a GCE VM, Workload Identity is implemented by attaching a GSA to the VM and letting applications use ADC from the metadata server.
{.power-number}

1. Create a bucket.

```bash
gcloud storage buckets create gs://<BUCKET_NAME> --location=<REGION>
```

2. Create a Google service account (GSA).

```bash
gcloud iam service-accounts create <GSA_NAME> \
--project=<PROJECT_ID> \
--display-name="<GSA_NAME>"
```

3. Grant the GSA permissions on the bucket.

For example, grant object read/write (choose the role that matches your needs/policy):

```bash
gcloud storage buckets add-iam-policy-binding gs://<BUCKET_NAME> \
--member="serviceAccount:<GSA_NAME>@<PROJECT_ID>.iam.gserviceaccount.com" \
--role="roles/storage.objectUser"
```

4. Create a VM with the GSA attached.

Comment thread
rasika-chivate marked this conversation as resolved.
```bash
gcloud compute instances create <VM_NAME> \
--project=<PROJECT_ID> \
--zone=<ZONE> \
--service-account=<GSA_NAME>@<PROJECT_ID>.iam.gserviceaccount.com \
--scopes=cloud-platform
```
5. Use the PBM config snippet below (note the workloadIdentity: `true` flag, and no JSON key):

Check warning on line 101 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L101

[Vale.Spelling] Did you really mean 'workloadIdentity'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'workloadIdentity'?", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 101, "column": 47}}}, "severity": "WARNING"}

```yaml
storage:
type: gcs
gcs:
bucket: <BUCKET_NAME>
prefix: pbm
credentials:
workloadIdentity: true
```

!!! note
- Application Default Credentials (ADC) are used by PBM only when `credentials.workloadIdentity: true` is set.
- With `workloadIdentity: true`, PBM relies on standard ADC sources such as the GCE/GKE metadata server or a **Workload Identity Federation external account configuration file** referenced via `GOOGLE_APPLICATION_CREDENTIALS`.
- When using `workloadIdentity: true`, pbm validates that `GOOGLE_APPLICATION_CREDENTIALS` file is configured for workload federation and will reject any other credentials.

Check warning on line 116 in docs/details/workload-identity-auth.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-auth.md#L116

[Google.Will] Avoid using 'will'.
Raw output
{"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/details/workload-identity-auth.md", "range": {"start": {"line": 116, "column": 147}}}, "severity": "WARNING"}

6. Apply the config.

```bash
pbm config --file pbm_config.yaml
```
Comment thread
rasika-chivate marked this conversation as resolved.

7. Verify authentication.

On the VM, you can check that the identity is available through ADC by listing the bucket contents. Then, run a PBM backup to ensure that the uploads succeed.

```bash
gcloud storage ls gs://<BUCKET_NAME>
```

```bash
pbm backup
```
Comment thread
rasika-chivate marked this conversation as resolved.
1 change: 1 addition & 0 deletions mkdocs-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ nav:
- AWS storage: details/s3-storage.md
- details/minio.md
- details/gcs.md
- Workload Identity authentication: details/workload-identity-auth.md
- details/azure.md
- details/oss.md
- details/filesystem-storage.md
Expand Down