Feature request: OIDC / STS AssumeRoleWithWebIdentity authentication for S3-compatible ObjectStores
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
この issue はまだ評価されていません。
説明
Currently, when using an S3-compatible third-party object store, the ObjectStore CRD supports providing an access key and secret key, with an optional session token.
spec:
configuration:
destinationPath: s3://backups/
endpointURL: https://minio.example.com
s3Credentials:
accessKeyId:
name: object-store
key: ACCESS_KEY_ID
secretAccessKey:
name: object-store
key: ACCESS_SECRET_KEY
sessionToken:
name: object-store
key: ACCESS_SESSION_TOKEN
This works well for long-lived credentials, but it does not work well for environments where authentication to the object store is based on OIDC federation and short-lived STS credentials.
The Barman Cloud Plugin currently documents access-key authentication and IRSA for S3. For S3-compatible providers, endpointURL can already be used to target a non-AWS S3 service.
Use case
We operate an on-premises S3-compatible object store using MinIO.
MinIO is configured to trust our OIDC identity provider. Rather than creating permanent MinIO access keys for PostgreSQL backups, we would like Barman Cloud to authenticate using the following flow:
OIDC Identity Provider
|
| OAuth/OIDC token
v
S3-compatible STS endpoint
AssumeRoleWithWebIdentity
|
| 1hr temporary AccessKeyId
| 1hr temporary SecretAccessKey
| 1hr temporary SessionToken
v
Barman Cloud
|
v
S3 backup / WAL operations
In our environment the identity provider is Microsoft Entra ID, but the proposed feature should not be specific to Entra ID.
The same mechanism should be usable with any standards-compatible OIDC provider, such as Keycloak or other identity providers, together with any S3-compatible implementation supporting AssumeRoleWithWebIdentity.
The important distinction from the existing credential configuration is that the resulting S3 credentials are short-lived. In our environment they expire approximately hourly.
Therefore, storing the resulting:
- AccessKeyId
- SecretAccessKey
- SessionToken
in a Kubernetes Secret is not sufficient. The plugin needs to be able to acquire and refresh these credentials automatically.
Proposed behavior
It would be useful if the ObjectStore CRD supported an additional authentication method under s3Credentials, for example webIdentity.
The plugin would:
-
Authenticate to the configured OIDC token endpoint using the configured client credentials.
-
Obtain an OIDC/OAuth token.
-
Present that token to the S3-compatible STS endpoint using AssumeRoleWithWebIdentity.
-
Receive temporary:
- Access key ID
- Secret access key
- Session token
- Expiration
-
Use those credentials for Barman Cloud S3 operations.
-
Automatically repeat the process before the credentials expire.
-
This would allow Barman Cloud deployments to avoid permanent S3 credentials entirely.
Example proposed ObjectStore spec
One possible ObjectStore CRD could look like this
apiVersion: barmancloud.cnpg.io/v1
kind: ObjectStore
metadata:
name: my-oidc-s3-store
spec:
configuration:
destinationPath: s3://postgres-backups/
endpointURL: https://minio.example.com
s3Credentials:
webIdentity:
tokenEndpoint: https://idp.example.com/oauth2/v2.0/token
trustedCA:
name: <Optional name of secret>
key: <Optional name of value; IE ca.crt>
clientId:
name: barman-oidc
key: CLIENT_ID
clientSecret:
name: barman-oidc
key: CLIENT_SECRET
scope:
name: barman-oidc
key: SCOPE
stsEndpoint: https://minio.example.com
wal:
compression: gzip:
This approach also assumes that Roles are handled properly via OIDC claims.
Proposed Acceptance criteria
- ObjectStore supports an OIDC/web-identity authentication option for S3-compatible storage.
- The identity provider is configurable and is not tied specifically to AWS, Microsoft Entra ID, Keycloak, or another vendor.
- Client credentials can be referenced from Kubernetes Secrets.
- The OIDC token endpoint and S3 STS endpoint can be independently configured.
- The obtained identity token can be exchanged through AssumeRoleWithWebIdentity.
- Returned S3 AccessKeyId, SecretAccessKey, and SessionToken credentials are used transparently by Barman Cloud.
- Credentials are refreshed automatically before expiration.
- Backup, WAL archive, WAL restore, and recovery operations all use the same credential mechanism.
- Existing static S3 credential and IRSA authentication mechanisms continue to work unchanged.
- 主要言語
- Go
- スター
- 219
- フォーク
- 92
- 平均マージ
- 2日 11時間
- マージ済み PR(30日)
- 38
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudnative-pg/plugin-barman-cloud のほかの issue
-
Cluster never reconciles when created before its ObjectStore: requeue without RequeueAfter is dropped対応中かも @shanurwan が 18 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
cloudnative-pg/plugin-barman-cloud#1236 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
cloudnative-pg/plugin-barman-cloud#1117 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Add RBAC aggregation labels to ObjectStore editor/viewer ClusterRoles対応中かも @stefanpeknik が 77 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
cloudnative-pg/plugin-barman-cloud#1102 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 47/100
cloudnative-pg/plugin-barman-cloud#1268 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
cloudnative-pg/plugin-barman-cloud#1263 ·
メンテナーはふだん 2 日以内に返信
cloudnative-pg/plugin-barman-cloud の issue をすべて見る
似ている issue
-
gui: a narrow window's gateway key row with a line under it wraps its faded badges onto blank linesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Scope: a trailing dot on the host or root host breaks rdn, dn and fqdn scope checks対応中かも @hakarrr が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
projectdiscovery/katana#2068 ·
メンテナーはふだん 1 日以内に返信
-
priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
rossoctl/context-guru#1625 ·
メンテナーはふだん 1 日以内に返信
-
Fixed
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
router-for-me/CLIProxyAPI#8683 ·
メンテナーはふだん 8 日以内に返信