Skip to content

Commit d2e1180

Browse files
committed
feat(web-ui): switch CloudFront origin access from OAI to OAC (#369)
1 parent 6486ee6 commit d2e1180

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ SPDX-License-Identifier: MIT-0
1515

1616
- **Global split panel ("documents selected")** — Removed the persistent bottom split panel from the global Web UI layout and deleted the related split-panel components and `use-split-panel` hook. The split-panel was noisy on non-document-list pages and only provided full details for single-document selection; reintroduce as an opt-in, per-page component if needed (recommendation: enable only on `DocumentList`).
1717

18+
### Changed
19+
20+
- **Web UI CloudFront origin access: OAI → OAC (#369)** — The CloudFront-hosted Web UI now reads its S3 origin (`WebUIBucket`) using **Origin Access Control (OAC)** instead of the legacy **Origin Access Identity (OAI)**. The distribution origin references a new `AWS::CloudFront::OriginAccessControl` resource (SigV4, `SigningBehavior: always`), and the `WebUIBucketPolicy` now grants `s3:GetObject` to the `cloudfront.amazonaws.com` service principal scoped by an `AWS:SourceArn` condition matching this distribution — strictly tighter than the previous shared canonical-user grant. This fixes a **403 / Access Denied** loading the Web UI in accounts whose org-level SCP or data-perimeter guardrails silently deny legacy OAI requests to S3 (OAI requests carry no `aws:SourceAccount`/`aws:SourceArn` and are blocked). OAC is the AWS-recommended successor to OAI. **Upgrade is in-place and non-disruptive:** the CloudFront distribution keeps the same domain name (existing Web UI URLs and the welcome-email link continue to work), and `WebUIBucket` is unaffected. GovCloud and ALB-hosted deployments are unchanged — the resource is gated on `WebUIHosting=CloudFront`.
21+
1822
## [0.5.15]
1923

2024
### Added

docs/alb-hosting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,15 @@ You can switch an existing CloudFront-hosted stack to ALB hosting (or vice versa
160160

161161
When `WebUIHosting=ALB`:
162162

163-
- CloudFront distribution, Origin Access Identity, and security headers policy are **not created**
163+
- CloudFront distribution, Origin Access Control (OAC), and security headers policy are **not created**
164164
- ALB nested stack is created with all ALB infrastructure
165165
- S3 WebUI bucket omits `WebsiteConfiguration` (ALB handles routing)
166-
- S3 bucket policy grants access via `aws:sourceVpce` condition instead of CloudFront OAI
166+
- S3 bucket policy grants access via `aws:sourceVpce` condition instead of CloudFront OAC
167167

168168
When `WebUIHosting=CloudFront` (default):
169169

170170
- ALB nested stack is **not created**
171-
- Standard CloudFront distribution with OAI is created
171+
- Standard CloudFront distribution with Origin Access Control (OAC) is created
172172

173173
### Request Flow (ALB Mode)
174174

lib/idp_feature_sdk/idp_feature_sdk/cli.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,7 @@ def publish_pack_cmd(
268268
"""
269269
from .pack import PackPublisher
270270

271-
artifacts_bucket = _resolve_bucket(
272-
bucket_basename, region, make_public=make_public
273-
)
271+
artifacts_bucket = _resolve_bucket(bucket_basename, region, make_public=make_public)
274272
try:
275273
publisher = PackPublisher(project_dir, console=console)
276274
result = publisher.publish(

template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4614,7 +4614,7 @@ Resources:
46144614
- UseCloudFrontHosting
46154615
- Effect: Allow
46164616
Principal:
4617-
Service: cloudfront.amazonaws.com
4617+
Service: !Sub "cloudfront.${AWS::URLSuffix}"
46184618
Action: s3:GetObject
46194619
Resource: !Sub "${WebUIBucket.Arn}/*"
46204620
Condition:

0 commit comments

Comments
 (0)