CORS-4361: aws: add aws-eusc partition support for OIDC S3 buckets #995
@tthvo: This pull request references CORS-4361 which is a valid jira issue.
<details>
In response to this:
>Add support for eusc partition (eusc-*) regions in getPartition() function to ensure S3 bucket ARNs use the correct partition (arn:aws-eusc:s3:::...) when creating public OIDC endpoints.
>This enables STS authentication to work correctly in eusc regions by generating partition-aware bucket policies for public S3 buckets used as OIDC identity provider endpoints.
>## Important
>I didn't add changes related to private bucket + CloudFront because EU Sovereign Cloud does not yet support Cloud Front. See docs. This means EU Sovereign Cloud can only support STS cluster via public S3 buckets.
>> November 25, 2025: Roadmap update – Amazon CloudFront is expected to be available in by the end of 2026.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.
</details>
<!-- This is an auto-generated comment: summarize by coderabbit.ai -->
No actionable comments were generated in the recent review. 🎉
<details>
<summary>ℹ️ Recent review info</summary>
<details>
<summary>⚙️ Run configuration</summary>
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bdbb4711-1792-4f25-8a75-b6fdcf1d72ed
</details>
<details>
<summary>📥 Commits</summary>
Reviewing files that changed from the base of the PR and between 2ed316a92eee9ca9e9d9cf9c2b89985ad7fcf00b and 919a6c7bec1efd857c80b8d022cc556e66d36265.
</details>
<details>
<summary>📒 Files selected for processing (1)</summary>
pkg/cmd/provisioning/aws/create_identity_provider.go</details>
</details>
---
<!-- walkthrough_start -->
Walkthrough
The getPartition function in AWS provisioning identity provider creation now recognizes AWS regions with the eusc- prefix and maps them to the aws-eusc partition, while maintaining existing region-to-partition mappings for other region types.
Changes
|Cohort / File(s)|Summary|
|---|---|
|AWS partition detection <br> pkg/cmd/provisioning/aws/create_identity_provider.go|Added support for mapping AWS regions with the eusc- prefix to the aws-eusc partition in the getPartition function.|
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~5 minutes
<!-- walkthrough_end -->
<!-- finishing_touch_checkbox_start -->
<details>
<summary>✨ Finishing Touches</summary>
<details>
<summary>🧪 Generate unit tests (beta)</summary>
</details>
</details>
<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->
---
<sub>Comment @coderabbitai help to get the list of available commands and usage tips.</sub>
<!-- tips_end -->
<!-- internal state start -->
<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKPR1AGxJcAwgHkbAGUwABYAZgA2AEYuNAB3RFjaenjEMBJsRAYeZ3FxfCwHbm58ClxIADNSyD8ASQARH0hAsMgBbAYAaxJcZEgDADlHAUouAE4xgFZIfoBVGwAZLlhcXG5EgHoNonVYbAENJmYN/G4yRAQK3A2GD3xsWjAGCjp2eDQPMFPlAgoN7mwHg8Gwm0zmiFGkFWsAk+BmBkC9woDBIbSoGAYsF8AWC4WikEASYQwZykcoCdGYrjMNCIGh8fo+F7UOjoTiQABMAAZ2REwJywmB2SFoJzORx2QB2DiigBa8MCuGomS43wwRnq0me8G4+QwHAMUAAgslkEUSmVKtVcLBURksjkyup4AVIAAKF47ArIam4THwDBESAAAztDDAACogwBKFBYa2o0lWXJOgqumMVbAY3X2OEtNodbrlQ02AbITKo+MKCgvMQOvLOrCuoPOPWpdKZBgcRBhDi96OQOI2rDPEjUf2BgECDzwbJ1RqQMi0Er+3oaA2QACiGBUXmQgWggRw8Yw4gYY5dBAHpU6VZruA88n9m9mzXwUhe8CIWB8dwekA9DYyPIpDkFQ4gBnWKYYGA8TOKi7RdD0PD4NODDwNIlp8JOqHNK0CGFmWEIpMgc5NPASgnuo8i8G+5GUAuGBLvgK6IGuUADPgNDINa1CQBgcKYpgpDIHElCotSSiYTwFCSMy+aIeUADUkA/vctAAGIUAUZKiGg5bPq+74kJ+36/vQtD4Bh/HlLISFmqU5SqQ8mnaQA3FCNovFULzNAejAeJkdLIE+G4voiRkmSpZmMJg/AYA+bSovZZQshI7w8PsO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eBtJcif2/qCsYUQxhoAiAwCUIwGBRCKrQAAHJMCUDBCWcgEIS2g3J2QMAYJMSYEQSARAiLQSIPJpj9wMKCu24LyJQphehOF8Dh670HkefAqC9IQgRYqBBiKLRcoAN44J6rSJM5ZaCGlwDYPZQq6A+BWuoQ1mZcA4OlAAX3uRKqV5ZZXMhFVDfQQA -->
<!-- internal state end -->
/cc @patrickdillon
Codecov Report
:x: Patch coverage is
0% with 2 lines in your changes missing coverage. Please review.:white_check_mark: Project coverage is 46.22%. Comparing base (
2ed316a) to head (919a6c7).:warning: Report is 6 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...g/cmd/provisioning/aws/create\_identity\_provider.go | 0.00% | 1 Missing and 1 partial :warning: |
<details><summary>Additional details and impacted files</summary>

@@ Coverage Diff @@
## master #995 +/- ##
==========================================
- Coverage 46.27% 46.22% -0.05%
==========================================
Files 98 98
Lines 12262 12583 +321
==========================================
+ Hits 5674 5817 +143
- Misses 5938 6115 +177
- Partials 650 651 +1
| Files with missing lines | Coverage Δ | |
|---|---|---|
| ...g/cmd/provisioning/aws/create\_identity\_provider.go | 62.53% <0.00%> (-0.32%) | :arrow_down: |
... and 6 files with indirect coverage changes
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
</details>
/test security
/approve
/lgtm
/override ci/prow/security
Unrelated, will be resolved by another bug.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: <a href="https://github.com/openshift/cloud-credential-operator/pull/995#pullrequestreview-4000683882" title="LGTM">jstuever</a>, <a href="https://github.com/openshift/cloud-credential-operator/pull/995#" title="Author self-approved">tthvo</a>
The full list of commands accepted by this bot can be found here.
The pull request process is described here
<details >
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
</details>
<!-- META={"approvers":[]} -->
@jstuever: Overrode contexts on behalf of jstuever: ci/prow/security
<details>
In response to this:
>/override ci/prow/security
>Unrelated, will be resolved by another bug.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
</details>
I don't have access to the specified partition, so I'm absolutely relying on QE to test it.
@liweinan Will you test it as QA of CORS-4361? If need support on ccoctl, pls. let me know, thx
@jianping-shu Sure, I'll check it this week.
Test Report: PR #995 - AWS EUSC Partition Support
PR: https://github.com/openshift/cloud-credential-operator/pull/995
JIRA: CORS-4361
Tester: Weinan Li (weli)
Date: 2026-03-31
Status: ✅ PASSED
---
Summary
Successfully verified that PR #995 adds AWS European Sovereign Cloud (EUSC) partition support to the getPartition() function in ccoctl. The change ensures S3 bucket ARNs and IAM OIDC provider ARNs use the correct aws-eusc partition when creating OIDC identity providers in EUSC regions.
---
Test Environment
---
Build and Setup
1. Clone and Build
# Clone repository
cd /Users/weli/works/oc-swarm
git clone https://github.com/openshift/cloud-credential-operator.git
cd cloud-credential-operator
# Checkout PR branch
git fetch origin pull/995/head:pr-995
git checkout pr-995
# Build ccoctl
make build
Build Output:
go build -mod=vendor -trimpath -ldflags "-X github.com/openshift/cloud-credential-operator/pkg/version.versionFromGit="v0.0.0-unknown-919a6c7be" ...
Binary created: ./ccoctl (131MB)
2. Generate Test Keys
cd /tmp/ccoctl-eusc-test
# Generate service account signing key pair
ssh-keygen -t rsa -b 4096 -f serviceaccount-signer -N '' -m PEM
# Convert to public key format
openssl rsa -in serviceaccount-signer -pubout -out serviceaccount-signer.public
Output:
Generating public/private rsa key pair.
Your identification has been saved in serviceaccount-signer
Your public key has been saved in serviceaccount-signer.pub
writing RSA key
3. Verify AWS Credentials
AWS_PROFILE=weli-eus aws sts get-caller-identity --region eusc-de-east-1
Output:
{
"UserId": "xxx",
"Account": "xxx",
"Arn": "arn:aws-eusc:iam::xxx:user/weli"
}
✅ AWS credentials verified successfully with EUSC region access.
---
Test Execution
Test Case: Create OIDC Identity Provider in EUSC Region
Command:
cd /tmp/ccoctl-eusc-test
AWS_PROFILE=weli-eus /Users/weli/works/oc-swarm/cloud-credential-operator/ccoctl aws create-identity-provider \
--name="pr995-test-1774933339" \
--region="eusc-de-east-1" \
--public-key-file=serviceaccount-signer.public \
--output-dir=./output
Output:
2026/03/31 13:03:06 Bucket pr995-test-1774933339-oidc created
2026/03/31 13:03:08 OpenID Connect discovery document in the S3 bucket pr995-test-1774933339-oidc at .well-known/openid-configuration updated
2026/03/31 13:03:08 Reading public key
2026/03/31 13:03:08 JSON web key set (JWKS) in the S3 bucket pr995-test-1774933339-oidc at keys.json updated
2026/03/31 13:03:12 Identity Provider created with ARN: arn:aws-eusc:iam::082250599274:oidc-provider/pr995-test-1774933339-oidc.s3.eusc-de-east-1.amazonaws.eu
2026/03/31 13:03:12 Wrote cluster authentication manifest at path output/manifests/cluster-authentication-02-config.yaml
2026/03/31 13:03:12 Issuer URL (serviceAccountIssuer) is https://pr995-test-1774933339-oidc.s3.eusc-de-east-1.amazonaws.eu
Analysis: ✅ Command executed successfully. Key observation: Identity Provider ARN correctly uses arn:aws-eusc:iam:: prefix.
---
Verification
1. Verify S3 Bucket Policy ARN Format
Command:
AWS_PROFILE=weli-eus aws s3api get-bucket-policy \
--bucket "pr995-test-1774933339-oidc" \
--region "eusc-de-east-1" \
--query Policy --output text | jq .
Output:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowReadPublicAccess",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws-eusc:s3:::pr995-test-1774933339-oidc/*"
}
]
}
Analysis: ✅ PASS - S3 bucket policy correctly uses arn:aws-eusc:s3::: partition ARN format (not arn:aws:s3:::).
---
2. Verify OIDC Provider ARN
Command:
AWS_PROFILE=weli-eus aws iam list-open-id-connect-providers \
--region "eusc-de-east-1" \
--query "OpenIDConnectProviderList[?contains(Arn, 'pr995-test-1774933339')].Arn" \
--output text
Output:
arn:aws-eusc:iam::082250599274:oidc-provider/pr995-test-1774933339-oidc.s3.eusc-de-east-1.amazonaws.eu
Analysis: ✅ PASS - OIDC provider ARN correctly uses arn:aws-eusc:iam:: partition format.
---
3. Verify OIDC Discovery Document Accessibility
Command:
curl -s "https://pr995-test-1774933339-oidc.s3.eusc-de-east-1.amazonaws.eu/.well-known/openid-configuration" | jq .
Output:
{
"issuer": "https://pr995-test-1774933339-oidc.s3.eusc-de-east-1.amazonaws.eu",
"jwks_uri": "https://pr995-test-1774933339-oidc.s3.eusc-de-east-1.amazonaws.eu/keys.json",
"response_types_supported": [
"id_token"
],
"subject_types_supported": [
"public"
],
"id_token_signing_alg_values_supported": [
"RS256"
],
"claims_supported": [
"aud",
"exp",
"sub",
"iat",
"iss",
"sub"
]
}
Analysis: ✅ PASS - Discovery document is publicly accessible and contains valid OIDC configuration with correct issuer URL.
---
4. Verify JWKS Document Accessibility
Command:
curl -s "https://pr995-test-1774933339-oidc.s3.eusc-de-east-1.amazonaws.eu/keys.json" | jq .
Output:
{
"keys": [
{
"use": "sig",
"kty": "RSA",
"kid": "...",
"alg": "RS256",
"n": "...",
"e": "AQAB"
}
]
}
Analysis: ✅ PASS - JWKS document is publicly accessible and contains the RSA-4096 public key in JWK format.
---
5. Verify Generated Cluster Authentication Manifest
Command:
cat output/manifests/cluster-authentication-02-config.yaml
Output:
apiVersion: config.openshift.io/v1
kind: Authentication
metadata:
name: cluster
spec:
serviceAccountIssuer: https://pr995-test-1774933339-oidc.s3.eusc-de-east-1.amazonaws.eu
Analysis: ✅ PASS - Cluster authentication manifest generated with correct EUSC-based issuer URL.
---
Test Results Summary
| Verification Point | Expected | Actual | Status |
|-------------------|----------|--------|--------|
| S3 Bucket ARN Partition | arn:aws-eusc:s3::: | arn:aws-eusc:s3:::pr995-test-1774933339-oidc/ | ✅ PASS |
| OIDC Provider ARN Partition | arn:aws-eusc:iam:: | arn:aws-eusc:iam::xxx:oidc-provider/... | ✅ PASS |
| Discovery Document Accessible | HTTP 200, Valid JSON | ✅ Accessible with valid OIDC config | ✅ PASS |
| JWKS Document Accessible | HTTP 200, Contains RSA key | ✅ Accessible with RSA-4096 JWK | ✅ PASS |
| Cluster Manifest Generated | Valid YAML with issuer | ✅ Generated with correct issuer URL | ✅ PASS |
---
Conclusion
✅ All tests passed successfully.
PR #995 correctly implements AWS European Sovereign Cloud (EUSC) partition support in the ccoctl tool. The getPartition() function now properly detects eusc- region prefixes and returns the aws-eusc partition, ensuring:
1. S3 bucket policies use the correct ARN format: arn:aws-eusc:s3:::bucket-name/*
2. IAM OIDC providers use the correct ARN format: arn:aws-eusc:iam::account-id:oidc-provider/...
3. OIDC endpoints (discovery document and JWKS) are publicly accessible via S3
4. Cluster authentication manifests are generated with the correct issuer URL
The implementation is minimal (3 lines of code), follows the existing pattern for other AWS partitions (GovCloud, China), and does not introduce any regressions.
Recommendation: This PR is ready to merge.
/verified by liweinan
@liweinan: This PR has been marked as verified by liweinan.
<details>
In response to this:
>/verified by liweinan
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.
</details>
/test e2e-hypershift
@tthvo: all tests passed!
Full PR test history. Your PR dashboard.
<details>
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.
</details>
<!-- test report -->
jstuever
tthvo
Add support for eusc partition (
eusc-*) regions ingetPartition()function to ensure S3 bucket ARNs use the correct partition (arn:aws-eusc:s3:::...) when creating public OIDC endpoints.This enables STS authentication to work correctly in eusc regions by generating partition-aware bucket policies for public S3 buckets used as OIDC identity provider endpoints.
Important
I didn't add changes related to private bucket + CloudFront because EU Sovereign Cloud does not yet support Cloud Front. See docs. This means EU Sovereign Cloud can only support STS cluster via public S3 buckets.