Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
170 changes: 170 additions & 0 deletions docs/details/oci-workload-identity-auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# Oracle Cloud Infrastructure (OCI) Object Storage with Workload Identity Authentication

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

Percona Backup for MongoDB (PBM) supports two Workload Identity authentication types for OCI Object Storage, in addition to the default `userPrincipal`:
Comment on lines +1 to +5

| Auth type | When to use |
|---|---|
|`userPrincipal`|PBM is running anywhere — on-premises, on other clouds, or on OCI|
| `instancePrincipal`| PBM is running on a virtual machine inside OCI |
| `okeWorkloadIdentity`| PBM is running inside an OKE enhanced cluster|

## userPrincipal

Choose `userPrincipal` when PBM runs outside OCI, or when you want a single authentication approach that works in any environment. PBM authenticates using an OCI user account and an API signing key.

### Before you begin

You need:

- An OCI user account with access to the target bucket
- An [API signing key pair :octicons-link-external-16:](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm){:target="_blank"} (private key file and its fingerprint)
- 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 user and tenancy
- The name of the OCI bucket PBM will use for backups

### Procedure

1. Create an IAM policy
Grant the user permission to manage objects in the target bucket:
```sh
oci iam policy create \
--region "$HOME_REGION" \
--compartment-id "$TENANCY_OCID" \
--name "$USER_POLICY_NAME" \
--description "Allow PBM user to access $BUCKET_NAME" \
--statements "[\"Allow group $USER_GROUP_NAME to manage objects in compartment $COMPARTMENT_NAME where target.bucket.name = '$BUCKET_NAME'\"]"
```

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 |
| `USER_POLICY_NAME` | A name for the policy (e.g. `pbm-user-policy`) |
| `USER_GROUP_NAME` | The IAM group the PBM user belongs to |
| `COMPARTMENT_NAME` | Name of the compartment containing the bucket |
| `BUCKET_NAME` | Name of the OCI Object Storage bucket |

2. Configure PBM authentication

In your PBM configuration, set the storage type to `oci` and the credentials type to `userPrincipal`. Provide the path to the private key file and its passphrase if one was set during key generation.

```yaml
storage:
type: oci
oci:
region: <bucket_region>
namespace: <namespace>
bucket: <bucket_name>
prefix: <path_prefix>
credentials:
type: userPrincipal
userPrincipal:
tenancy: <tenancy_ocid>
user: <user_ocid>
fingerprint: <key_fingerprint>
key: <path_to_private_key_file>
passphrase: <key_passphrase>
```

## 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.

### 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>
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.
14 changes: 14 additions & 0 deletions docs/install/backup-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ Percona Backup for MongoDB needs its own dedicated S3 bucket exclusively for bac
key: <your-access-key>
```

=== ":material-database: OCI Object Storage"

```yaml
storage:
type: oci
oci:
region: us-ashburn-1
namespace: your-namespace
bucket: your-bucket-name
prefix: data/pbm/backup
credentials:
type: instancePrincipal
```

Comment on lines +84 to +97
=== "Alibaba Cloud Storage"

```yaml
Expand Down
51 changes: 50 additions & 1 deletion docs/reference/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*Type*: string <br>
*Required*: YES

Remote backup storage type. Supported values: `s3`, `minio`, `gcs`, `filesystem`, `azure`.
Remote backup storage type. Supported values: `s3`, `minio`, `gcs`, `filesystem`, `azure`, `oci`.

## AWS S3 storage options

Expand Down Expand Up @@ -679,6 +679,55 @@ The minimum time to wait before the next retry, specified as a `time.Duration`.

The maximum time to wait before the next retry, specified as a `time.Duration`. Units like ms, s, etc., are supported. Defaults to nanoseconds if no unit is provided.

## OCI Object Storage options

```yaml
storage:
type: oci
oci:
region: <string>
namespace: <string>
bucket: <string>
prefix: <string>
credentials:
type: userPrincipal
```

### storage.oci.region

*Type*: string <br>
*Required*: YES

The region where your OCI Object Storage bucket is located.

### storage.oci.namespace

*Type*: string <br>
*Required*: YES

The Object Storage namespace for your tenancy.

### storage.oci.bucket

*Type*: string <br>
*Required*: YES

The name of the OCI Object Storage bucket.

### storage.oci.prefix

*Type*: string <br>
*Required*: NO

The path prefix inside the bucket where PBM stores backup data.

### storage.oci.credentials.type

*Type*: string <br>
*Required*: YES

The OCI authentication type. Supported values: `userPrincipal`, `instancePrincipal`, `okeWorkloadIdentity`.

## Alibaba Cloud OSS storage options

```yaml
Expand Down
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