Skip to content
Closed
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
eff9d2e
PBM-1728-OCI-with-WIA
rasika-chivate Jun 10, 2026
9e9ab9c
Create oci-workload-identity-auth.md
rasika-chivate Jun 10, 2026
4e4abdd
Potential fix for pull request finding
rasika-chivate Jun 10, 2026
4a70cc7
Potential fix for pull request finding
rasika-chivate Jun 10, 2026
2bf90e4
Fix broken OKE workload identity docs link
Copilot Jun 10, 2026
7977471
Potential fix for pull request finding
rasika-chivate Jun 10, 2026
5ee6f08
Potential fix for pull request finding
rasika-chivate Jun 10, 2026
ec4b29e
Potential fix for pull request finding
rasika-chivate Jun 10, 2026
ab65a50
Potential fix for pull request finding
rasika-chivate Jun 10, 2026
024fb34
Remove generated git-committers cache file and ignore .cache
Copilot Jun 10, 2026
67da25a
Update oci-workload-identity-auth.md
rasika-chivate Jun 10, 2026
e4e8548
Update oci-workload-identity-auth.md
rasika-chivate Jun 10, 2026
ec0514b
Potential fix for pull request finding
rasika-chivate Jun 10, 2026
19ca476
Potential fix for pull request finding
rasika-chivate Jun 10, 2026
2a3bc65
Potential fix for pull request finding
rasika-chivate Jun 10, 2026
98918bd
Potential fix for pull request finding
rasika-chivate Jun 10, 2026
fc1439f
Potential fix for pull request finding
rasika-chivate Jun 10, 2026
fc035aa
Potential fix for pull request finding
rasika-chivate Jun 10, 2026
c2132a2
Add OCI storage docs to configuration reference and setup matrix
Copilot Jun 10, 2026
703e0f6
Potential fix for pull request finding
rasika-chivate Jun 10, 2026
e602e38
Use backtick YAML fence in OCI workload identity doc
Copilot Jun 10, 2026
e1409ab
Update oci-workload-identity-auth.md
rasika-chivate Jun 12, 2026
694d98e
Update oci-workload-identity-auth.md
rasika-chivate Jun 12, 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ venv/
# Local Netlify folder
.netlify
site
.cache/

styles/

Expand Down
111 changes: 111 additions & 0 deletions docs/details/oci-workload-identity-auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Oracle Cloud Infrastructure (OCI) Object Storage with Workload Identity Authentication

Percona Backup for MongoDB (PBM) supports Workload Identity Federation (WIF) for authentication to Oracle Cloud Infrastructure (OCI) Object Storage. With WIF, PBM can access OCI resources without storing or managing API keys, reducing operational overhead and improving security.

Percona Backup for MongoDB (PBM) supports two WIF authentication types for OCI Object Storage, in addition to the default `userPrincipal`:
Comment thread
Copilot marked this conversation as resolved.
Outdated

| Auth type | When to use |
|---|---|
| `instancePrincipal` | PBM is running on a virtual machine inside OCI |
| `okeWorkloadIdentity` | PBM is running inside an OKE enhanced cluster |

## instancePrincipal

Choose `instancePrincipal` when PBM runs directly on an OCI Compute instance. PBM automatically obtains OCI credentials from the instance, eliminating the need for credential files or API keys.

### Before you begin

You need:

- The [Oracle Cloud Identifier (OCID) :octicons-link-external-16:](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle){:target="_blank"} of the OCI Compute instance running PBM
- The name of the OCI bucket PBM will use for backups
- A home region, tenancy OCID, and compartment name with sufficient IAM privileges to create dynamic groups and policies

### Procedure

Follow these steps to set up OCI using **`instancePrincipal`:**

1. **Create a dynamic group for the instance**

OCI IAM policies cannot target individual instances directly. You must first add the instance to a dynamic group, then write a policy against that group.

```sh
oci iam dynamic-group create \
--region "$HOME_REGION" \
--compartment-id "$TENANCY_OCID" \
--name "$INSTANCE_DYNAMIC_GROUP_NAME" \
--description "PBM VM instance principal" \
--matching-rule "ANY {instance.id = '$INSTANCE_OCID'}"
```

Replace the following variables:

| Variable | Description |
|---|---|
| `HOME_REGION` | Your tenancy's home region (e.g. `us-ashburn-1`) |
| `TENANCY_OCID` | OCID of your OCI tenancy |
| `INSTANCE_DYNAMIC_GROUP_NAME` | A name for the dynamic group (e.g. `pbm-vm-group`) |
| `INSTANCE_OCID` | OCID of the Compute instance running PBM |

2. **Create an IAM policy**

Grant the dynamic group permission to manage objects in the target bucket:

```sh
export INSTANCE_POLICY_STATEMENT="Allow dynamic-group $INSTANCE_DYNAMIC_GROUP_NAME \
to manage objects in compartment $COMPARTMENT_NAME \
where target.bucket.name = '$BUCKET_NAME'"

oci iam policy create \
--region "$HOME_REGION" \
--compartment-id "$TENANCY_OCID" \
--name "$INSTANCE_POLICY_NAME" \
--description "Allow PBM VM instance principal to access $BUCKET_NAME" \
--statements "[\"$INSTANCE_POLICY_STATEMENT\"]"
```

Replace the following additional variables:

| Variable | Description |
|---|---|
| `COMPARTMENT_NAME` | Name of the compartment containing the bucket |
| `BUCKET_NAME` | Name of the OCI Object Storage bucket |
| `INSTANCE_POLICY_NAME` | A name for the policy (e.g. `pbm-vm-policy`) |

3. **Configure PBM authentication**

In your PBM configuration, set the storage type to `oci` and the credentials type to `instancePrincipal`. No key file or passphrase is needed.

```yaml
storage:
type: oci
oci:
region: <bucket_region>
Comment thread
rasika-chivate marked this conversation as resolved.
Comment thread
rasika-chivate marked this conversation as resolved.
namespace: <namespace>
bucket: <bucket_name>
prefix: <path_prefix>
credentials:
type: instancePrincipal
```
Comment thread
Copilot marked this conversation as resolved.

## okeWorkloadIdentity

Choose `okeWorkloadIdentity` when PBM runs as a workload in an Oracle Kubernetes Engine (OKE) enhanced cluster. The Kubernetes service account token is exchanged for OCI credentials automatically by the OKE Workload Identity service.

!!! note
Your OKE cluster must be an **enhanced cluster** with Workload Identity enabled. Basic clusters do not support this feature.

In your PBM configuration, set the storage type to `oci` and the credentials type to `okeWorkloadIdentity`:

~~~yaml
storage:
type: oci
oci:
region: <bucket_region>
Comment thread
rasika-chivate marked this conversation as resolved.
Outdated
namespace: <namespace>
bucket: <bucket_name>
prefix: <path_prefix>
credentials:
type: okeWorkloadIdentity
~~~
For setup instructions, see [Configure OKE Workload Identity for workloads :octicons-link-external-16:](https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contenggrantingworkloadaccesstoresources.htm){:target="_blank"}.
Comment thread
Copilot 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:
- Storage:
- Remote backup storage overview: details/storage-configuration.md
- AWS S3 storage: details/s3-storage.md
- OCI Object Storage (Workload Identity): details/oci-workload-identity-auth.md
- details/minio.md
- details/gcs.md
- Workload Identity authentication: details/workload-identity-auth.md
Expand Down