Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
db33e76
PBM-1660-Add-support-for-Workload-Identity-Authentication
rasika-chivate Feb 18, 2026
8e3c167
Create workload-identity-authentication.md.md
rasika-chivate Feb 18, 2026
74c60b0
Update workload-identity-authentication.md.md
rasika-chivate Feb 19, 2026
ad4da50
Update workload-identity-authentication.md.md
rasika-chivate Feb 19, 2026
5895f49
removed extra.md from the file
rasika-chivate Feb 19, 2026
7785668
Formatting fixes
rasika-chivate Feb 19, 2026
fe4c2de
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
c31911a
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
729b30a
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
d057c3b
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
bbbbdca
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
bf7b36f
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
f591cb2
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
7c7c3ea
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
f9e0181
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
9e93a80
Merge branch 'PBM-1660-Add-support-for-Workload-Identity-Authenticati…
rasika-chivate Feb 19, 2026
243ed80
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
b8a7728
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
fdb6d85
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
4b90312
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
78688bc
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
eda9fc1
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
fbfcf87
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
e3a6594
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
6cd53c0
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
cf584ac
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
29b8439
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
9ba5143
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
1725b92
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
27ba289
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
9bd561b
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
52ff0ac
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
358f940
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
01097ea
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
ea89433
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
933c279
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
81c8a41
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
d8b7585
Merge branch 'PBM-1660-Add-support-for-Workload-Identity-Authenticati…
rasika-chivate Feb 19, 2026
e35eb97
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
d1fbf3b
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 19, 2026
a188da8
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
b0106e5
Merge branch 'PBM-1660-Add-support-for-Workload-Identity-Authenticati…
rasika-chivate Feb 19, 2026
ed41f73
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
86333fc
Update workload-identity-authentication.md
rasika-chivate Feb 19, 2026
7b2eebc
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 20, 2026
2495ec5
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 20, 2026
02052a0
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 20, 2026
bfffb33
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 20, 2026
0c77d3e
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 20, 2026
511b7e3
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 20, 2026
10297a7
Update docs/details/workload-identity-authentication.md
rasika-chivate Feb 20, 2026
de56c15
Update workload-identity-authentication.md
rasika-chivate Feb 20, 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
109 changes: 109 additions & 0 deletions docs/details/workload-identity-authentication.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Workload Identity authentication

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

Check warning on line 3 in docs/details/workload-identity-authentication.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-authentication.md#L3

[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-authentication.md", "range": {"start": {"line": 3, "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).

## Why Workload Identity

Check warning on line 7 in docs/details/workload-identity-authentication.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-authentication.md#L7

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

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 9 in docs/details/workload-identity-authentication.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-authentication.md#L9

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

Check warning on line 9 in docs/details/workload-identity-authentication.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-authentication.md#L9

[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-authentication.md", "range": {"start": {"line": 9, "column": 85}}}, "severity": "WARNING"}

## How this works with PBM

This is how Workload Identity Federation Works:
{ .power-number }

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

Check failure on line 16 in docs/details/workload-identity-authentication.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-authentication.md#L16

[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-authentication.md", "range": {"start": {"line": 16, "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 22 in docs/details/workload-identity-authentication.md

View workflow job for this annotation

GitHub Actions / vale

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

[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-authentication.md", "range": {"start": {"line": 22, "column": 48}}}, "severity": "WARNING"}

Check warning on line 22 in docs/details/workload-identity-authentication.md

View workflow job for this annotation

GitHub Actions / vale

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

[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-authentication.md", "range": {"start": {"line": 22, "column": 144}}}, "severity": "WARNING"}

Check warning on line 22 in docs/details/workload-identity-authentication.md

View workflow job for this annotation

GitHub Actions / vale

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

[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-authentication.md", "range": {"start": {"line": 22, "column": 194}}}, "severity": "WARNING"}

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

With Workload Identity Authentication, PBM relies on **Application Default Credentials** (ADC) provided by the runtime (for example, GKE metadata server, or an external Workload Identity Federation credential configuration file). When ADC is available, PBM can upload and download backups from GCS **without embedding JSON private keys** in the PBM config.

Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a brief "Prerequisites" or "Before you begin" section before "Configuration steps" that lists what users need to have ready (e.g., a GCS bucket, appropriate GCP permissions to create workload identity pools, PBM version 2.10.0 or higher installed). This follows the pattern seen in other storage configuration documents and helps users prepare before starting the configuration process.

Suggested change
## Prerequisites
Before you begin configuring Workload Identity Federation for PBM, ensure that you have:
- **Percona Backup for MongoDB (PBM) 2.10.0 or higher** installed and running on your MongoDB cluster.
- A **Google Cloud project** where you can create and manage IAM resources.
- Permission in that project to **create Workload Identity pools and providers**, **create service accounts**, and **grant IAM roles** (for example, project-level IAM admin or equivalent delegated rights).
- A **Google Cloud Storage (GCS) bucket** (existing or planned) to store PBM backups.
- The **`gcloud` CLI** installed and configured (`gcloud auth` completed and the correct project set) on the system from which you will run the commands below.
- Access to your **external identity provider (IdP)** (for example, OIDC provider, Kubernetes, GitHub Actions, AWS, or Azure) and the ability to obtain the issuer URI and subject/identity that PBM will use.

Copilot uses AI. Check for mistakes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommendation is fundamentally wrong in the version. WIF support will be 2.13.0+ feature

## Configuration steps

Follow theese steps to configure Workload Identity Federation for PBM:

Check warning on line 30 in docs/details/workload-identity-authentication.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-authentication.md#L30

[Vale.Spelling] Did you really mean 'theese'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'theese'?", "location": {"path": "docs/details/workload-identity-authentication.md", "range": {"start": {"line": 30, "column": 8}}}, "severity": "WARNING"}
{ .power-number }

1. Create a Workload Identity pool:

```
gcloud iam workload-identity-pools create pbm-pool \
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The placeholder pbm-pool is used in the command but the variable $POOL_ID was defined in step 1. For consistency with the rest of the commands that use variables, this should be $POOL_ID instead of the hardcoded value.

Suggested change
gcloud iam workload-identity-pools create pbm-pool \
gcloud iam workload-identity-pools create "$POOL_ID" \

Copilot uses AI. Check for mistakes.
--location="global" \
--display-name="PBM Workload Identity Pool"
```

2. Configure a provider (OIDC Example):

The following example uses an OIDC provider (e.g., Kubernetes, GitHub Actions). For AWS, replace `--oidc-issuer-uri` with `--aws`.

Check failure on line 43 in docs/details/workload-identity-authentication.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-authentication.md#L43

[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-authentication.md", "range": {"start": {"line": 43, "column": 50}}}, "severity": "ERROR"}

```
gcloud iam workload-identity-pools providers create-oidc pbm-provider \
--workload-identity-pool="pbm-pool" \
--issuer-uri="https://YOUR-IDP.example.com" \
--location="global" \
--attribute-mapping="google.subject=assertion.sub"
```

3. Grant service account impersonation:

```sh
gcloud iam service-accounts add-iam-policy-binding \
pbm-backup-sa@PROJECT_ID.iam.gserviceaccount.com \
--role="roles/iam.workloadIdentityUser" \
--member="principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/pbm-pool/subject/WORKLOAD_ID"
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command uses hardcoded placeholders pbm-backup-sa@PROJECT_ID.iam.gserviceaccount.com, PROJECT_NUMBER, pbm-pool, and WORKLOAD_ID instead of the variables defined in step 1. This is inconsistent and error-prone. Should use $SA_EMAIL, $PROJECT_NUMBER, $POOL_ID, and $WORKLOAD_SUBJECT respectively.

Copilot uses AI. Check for mistakes.
```

4. Assign GCS permissions:

```
gcloud projects add-iam-policy-binding PROJECT_ID \
--member="serviceAccount:pbm-backup-sa@PROJECT_ID.iam.gserviceaccount.com" \
--role="roles/storage.objectAdmin"
```

5. PBM configuration:

Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The configuration file template reference is missing. Following the established pattern in other storage documentation (gcs.md, azure.md, s3-storage.md, minio.md), you should add a sentence before the configuration section that reads: "You can find the configuration file template :octicons-link-external-16: and uncomment the required fields."

Suggested change
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.

Copilot uses AI. Check for mistakes.
When using Workload Identity, you omit the credentials block in the PBM configuration. The Google Cloud SDK (used by PBM 2.10+) will automatically detect the environment's identity.

Check warning on line 72 in docs/details/workload-identity-authentication.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-authentication.md#L72

[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-authentication.md", "range": {"start": {"line": 72, "column": 103}}}, "severity": "WARNING"}

Check warning on line 72 in docs/details/workload-identity-authentication.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-authentication.md#L72

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

1. **New config format (YAML)**
Create a file named `pbm_config.yaml`:

```bash
storage:
type: gcs
gcs:
bucket: [YOUR_BUCKET_NAME]
prefix: [YOUR_PREFIX]
# No credentials block here!
# PBM will use the ambient Workload Identity.
```

2. Apply the config:

```bash
pbm config --file pbm_config.yaml
```
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a reference to the standard configuration options documentation. Following the pattern in other storage configuration files (azure.md:82, s3-storage.md:57, filesystem-storage.md:25), add: "For the description of configuration options, see Configuration file options." This helps users understand all available configuration parameters beyond what's shown in the example.

Copilot uses AI. Check for mistakes.

??? Example "Example PBM configuration snippet"
```yaml
storage:
type: gcs
bucket: my-backup-bucket
auth:
method: workload-identity
provider: pbm-provider
service-account: pbm-backup sa@PROJECT_ID.iam.gserviceaccount.com
```

!!! note
- **PBM version:** Ensure you are using PBM 2.10.0 or higher. Earlier versions used the AWS SDK (S3 compatibility) which required HMAC keys.
- **ADC (Application Default Credentials):** The PBM agent code calls the Google Cloud storage client. By removing the credentials from the config, the client defaults to google.FindDefaultCredentials().

Check warning on line 106 in docs/details/workload-identity-authentication.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-authentication.md#L106

[Google.Colons] ': T' should be in lowercase.
Raw output
{"message": "[Google.Colons] ': T' should be in lowercase.", "location": {"path": "docs/details/workload-identity-authentication.md", "range": {"start": {"line": 106, "column": 9}}}, "severity": "WARNING"}

Check warning on line 106 in docs/details/workload-identity-authentication.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-authentication.md#L106

[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-authentication.md", "range": {"start": {"line": 106, "column": 86}}}, "severity": "WARNING"}

Check failure on line 106 in docs/details/workload-identity-authentication.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-authentication.md#L106

[Google.Spacing] 'e.F' should have one space.
Raw output
{"message": "[Google.Spacing] 'e.F' should have one space.", "location": {"path": "docs/details/workload-identity-authentication.md", "range": {"start": {"line": 106, "column": 181}}}, "severity": "ERROR"}
- **Environment variables:** If you are using Workload Identity Federation (for on-prem/other clouds), you must set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable on the PBM agent pods/servers to point to the generated `credential-configuration.json` file.

Check warning on line 107 in docs/details/workload-identity-authentication.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/details/workload-identity-authentication.md#L107

[Google.Colons] ': I' should be in lowercase.
Raw output
{"message": "[Google.Colons] ': I' should be in lowercase.", "location": {"path": "docs/details/workload-identity-authentication.md", "range": {"start": {"line": 107, "column": 9}}}, "severity": "WARNING"}


Comment on lines +191 to +192
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note mentions setting GOOGLE_APPLICATION_CREDENTIALS environment variable, but doesn't provide instructions on how to do this for PBM agents. Consider adding a brief example or reference on how to set this environment variable for pbm-agent processes, similar to how other configuration documents provide complete setup instructions. This is especially important since the note says "you must set" this variable.

Suggested change
**Example (Linux / systemd service):**
```bash
export GOOGLE_APPLICATION_CREDENTIALS=/etc/pbm/credential-configuration.json
pbm-agent ...
```
**Example (Kubernetes pbm-agent Pod):**
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: pbm-agent
spec:
template:
spec:
containers:
- name: pbm-agent
image: percona/pbm:latest
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /etc/pbm/credential-configuration.json
volumeMounts:
- name: pbm-credentials
mountPath: /etc/pbm
volumes:
- name: pbm-credentials
secret:
secretName: pbm-wif-credentials
```

Copilot uses AI. Check for mistakes.
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-authentication.md
- details/azure.md
- details/oss.md
- details/filesystem-storage.md
Expand Down