feat(cloudfront): VPC origins + anycast + trust stores + resource policies (batch 6a)#786
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
7 issues found across 10 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="crates/fakecloud-cloudfront/src/extras.rs">
<violation number="1" location="crates/fakecloud-cloudfront/src/extras.rs:23">
P2: Make `Items` required in `OriginSslProtocols`; AWS expects it whenever this block is present.</violation>
<violation number="2" location="crates/fakecloud-cloudfront/src/extras.rs:23">
P2: Make the trust-store bundle source required instead of allowing an empty union.</violation>
</file>
<file name="website/content/docs/services/_index.md">
<violation number="1" location="website/content/docs/services/_index.md:10">
P3: Update the total operation count to match the service table; 2,131 is inconsistent with the rows below.</violation>
</file>
<file name="crates/fakecloud-cloudfront/src/extras_service.rs">
<violation number="1" location="crates/fakecloud-cloudfront/src/extras_service.rs:112">
P2: `update_vpc_origin` does not validate required `name`/`arn` fields before saving, so updates can store invalid VPC origin configs.</violation>
<violation number="2" location="crates/fakecloud-cloudfront/src/extras_service.rs:183">
P2: `list_vpc_origins` writes `<Arn>` from `config.arn` instead of the VPC origin resource ARN, so list output returns the wrong ARN field.</violation>
<violation number="3" location="crates/fakecloud-cloudfront/src/extras_service.rs:293">
P1: `update_anycast_ip_list` skips `IpCount` validation and does not rebuild `anycast_ips`, allowing invalid counts and mismatched response data.</violation>
</file>
<file name="crates/fakecloud-conformance/tests/cloudfront_extras.rs">
<violation number="1" location="crates/fakecloud-conformance/tests/cloudfront_extras.rs:168">
P2: Don't discard the UpdateAnycastIpList result; this test will pass even when the API returns an error.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| #[serde(rename = "HTTPSPort")] | ||
| pub https_port: i32, | ||
| pub origin_protocol_policy: String, | ||
| #[serde(default, skip_serializing_if = "skip_if_none")] |
There was a problem hiding this comment.
P2: Make the trust-store bundle source required instead of allowing an empty union.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/fakecloud-cloudfront/src/extras.rs, line 23:
<comment>Make the trust-store bundle source required instead of allowing an empty union.</comment>
<file context>
@@ -0,0 +1,149 @@
+ #[serde(rename = "HTTPSPort")]
+ pub https_port: i32,
+ pub origin_protocol_policy: String,
+ #[serde(default, skip_serializing_if = "skip_if_none")]
+ pub origin_ssl_protocols: Option<OriginSslProtocols>,
+}
</file context>
There was a problem hiding this comment.
1 issue found across 6 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="README.md">
<violation number="1" location="README.md:51">
P3: The total operations count is wrong; it should match the table below.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="crates/fakecloud-core/src/dispatch.rs">
<violation number="1" location="crates/fakecloud-core/src/dispatch.rs:696">
P1: Virtual-hosted bucket-root PUT (`PUT /`) is now misclassified as a streaming S3 object route, which bypasses the global body-size cap and can trigger unbounded in-memory buffering.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
…icies (batch 6a) - 18 new ops: 5 VPC origin, 5 anycast IP list, 5 trust store, 3 resource policy - ETag/If-Match concurrency, EntityAlreadyExists on duplicate name - IpCount validated to 3 or 21 per AWS spec - DeleteVpcOrigin returns deleted resource + ETag header - UpdateTrustStore accepts httpPayload CaCertificatesBundleSource - 4 e2e tests + 18 conformance tests, audit clean (cloudfront 136/136)
- update_anycast_ip_list: use UpdateAnycastIpListRequest shape (no Name/IpCount per AWS spec); IpCount stays immutable on update - update_vpc_origin: validate Name/Arn before saving - list_vpc_origins: emit resource ARN for <Arn>, not config.arn - create_trust_store + update_trust_store: reject empty CaCertificatesBundleSource union - OriginSslProtocols.Items now required (matches AWS shape) - conformance: stop discarding UpdateAnycastIpList result - docs: bump CloudFront 135->136, README total 2,148->2,131
f01e81c to
e486c22
Compare
Summary
Test plan
Summary by cubic
Adds CloudFront VPC origins, anycast IP lists, trust stores, and resource policies with full CRUD and ETag/If-Match concurrency, completing CloudFront API coverage (136/136). Includes conformance + e2e tests and docs updates; total operations now 2,184.
New Features
EntityAlreadyExists.IpCountmust be 3 or 21; deterministicAnycastIpsreturned.UpdateTrustStoreacceptshttpPayloadCaCertificatesBundleSource; ETag/If-Match enforced.PutResourcePolicy/GetResourcePolicy/DeleteResourcePolicy; policy stored verbatim per ARN;PutResourcePolicyreturns<PutResourcePolicyResult>200.Bug Fixes
UpdateAnycastIpListuses the correct request shape (no Name/IpCount);IpCountis immutable.UpdateVpcOriginvalidatesName/Arn;ListVpcOriginsemits the resource ARN in<Arn>.CaCertificatesBundleSourceunion.OriginSslProtocols.Itemsis required.Written for commit 7b1caf2. Summary will update on new commits.