Skip to content

fix(apigw,apigwv2,cognito,wafv2,ecs): persist dropped params + validate managed rule groups (bug-hunt)#2284

Merged
vieiralucas merged 2 commits into
mainfrom
bh-stubsA
Jul 15, 2026
Merged

fix(apigw,apigwv2,cognito,wafv2,ecs): persist dropped params + validate managed rule groups (bug-hunt)#2284
vieiralucas merged 2 commits into
mainfrom
bh-stubsA

Conversation

@vieiralucas

@vieiralucas vieiralucas commented Jul 15, 2026

Copy link
Copy Markdown
Member

Summary

Stubs cluster A from the 2026-07-15 bug hunt (findings 1.26-1.30). Five
write-then-read asymmetries where a Create/Update accepted a parameter that the
corresponding Get/Describe never reflected, plus one op fabricating data for any
input.

# Service Bug Fix
1.26 apigateway UpdateUsagePlan remove op was dead (guard rejected it) → API-stage detach silently no-op'd Guard admits replace/add/remove
1.27 apigatewayv2 UpdateRouteResponse/UpdateIntegrationResponse wholesale-replaced the record, dropping fields absent from the request Merge incoming fields onto existing record
1.28 cognito AnalyticsConfiguration accepted on Create/Update but dropped; Describe showed default Persist + echo
1.29 wafv2 DescribeManagedRuleGroup returned hardcoded Capacity=50 + fabricated "RuleA" for ANY vendor/name Validate against real managed-rule-group catalog; unknown → WAFInvalidParameterException; real capacities + rule names
1.30 ecs CreateService/UpdateService dropped serviceConnectConfiguration; Describe never surfaced it Persist + echo on PRIMARY deployment

The wafv2 catalog (Common/KnownBadInputs/SQLi with their real capacities and
rule names) is now the single source of truth behind
ListAvailableManagedRuleGroups and DescribeAllManagedProducts, so the three ops
can no longer disagree.

No new public API surface (behavior + validation fixes on existing ops), so no
SDK/docs regeneration needed.

Test plan

  • New E2E tests, one per fix:
    • apigateway::usage_plan_api_stage_add_then_remove
    • apigatewayv2::update_route_response_merges_fields
    • cognito::cognito_user_pool_client_analytics_configuration_round_trips
    • wafv2::describe_managed_rule_group_returns_real_rules_and_rejects_unknown
    • ecs::service_connect_configuration_round_trips_on_describe
  • cargo build, cargo clippy --all-targets, cargo fmt clean across the five
    service crates + fakecloud-e2e.

Summary by cubic

Fixes five write/read mismatches across apigateway, apigatewayv2, cognito, wafv2, and ecs. Parameters accepted on Create/Update now persist to Get/Describe, wafv2 validates managed rule groups against a real catalog, and cloudformation provisioners pass these fields through on create.

  • Bug Fixes
    • apigateway: UpdateUsagePlan now honors remove for /apiStages/<apiId>:<stage> so detaching an API stage works.
    • apigatewayv2: UpdateRouteResponse/UpdateIntegrationResponse merge fields on update (partial patch) instead of replacing the record; unspecified fields persist.
    • cognito: AnalyticsConfiguration on user pool clients is stored and returned by DescribeUserPoolClient.
    • wafv2: DescribeManagedRuleGroup checks vendor/name against a catalog and returns real capacities and rule names; unknown groups raise WAFInvalidParameterException. The same catalog backs ListAvailableManagedRuleGroups and DescribeAllManagedProducts.
    • ecs: serviceConnectConfiguration is persisted and echoed on the PRIMARY deployment in DescribeServices; updating with an empty object disables it.
    • cloudformation: Cognito and ECS provisioners now persist AnalyticsConfiguration and ServiceConnectConfiguration supplied in templates.

Written for commit 74fc063. Summary will update on new commits.

Review in cubic

…te managed rule groups (bug-hunt)

Stubs cluster A from the 2026-07-15 bug hunt (1.26-1.30) — five write-then-read
asymmetries where a Create/Update accepted a parameter the corresponding
Get/Describe never reflected, plus one op fabricating data for any input.

- apigateway (1.26): UpdateUsagePlan `remove` op guard was dead code, so
  detaching an API stage via {op:remove, /apiStages/<id>:<stage>} silently
  no-op'd. Guard now admits replace/add/remove.
- apigatewayv2 (1.27): UpdateRouteResponse / UpdateIntegrationResponse
  wholesale-replaced the stored record, dropping any field not in the request.
  Now merges incoming fields onto the existing record so partial updates
  preserve untouched fields.
- cognito (1.28): CreateUserPoolClient / UpdateUserPoolClient accepted
  AnalyticsConfiguration but dropped it; DescribeUserPoolClient showed the
  default. Now persisted and echoed.
- wafv2 (1.29): DescribeManagedRuleGroup returned a hardcoded Capacity=50 and a
  fabricated "RuleA" for ANY vendor/name. Now validated against a real managed
  rule group catalog (Common/KnownBadInputs/SQLi) with real capacities + rule
  names; unknown groups return WAFInvalidParameterException. The catalog is the
  single source of truth behind ListAvailableManagedRuleGroups and
  DescribeAllManagedProducts too.
- ecs (1.30): CreateService / UpdateService dropped
  serviceConnectConfiguration; DescribeServices never surfaced it. Now
  persisted and echoed on the PRIMARY deployment (AWS's shape).

E2E tests added for each fix.
@vieiralucas vieiralucas requested a review from Copilot July 15, 2026 22:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vieiralucas vieiralucas requested a review from Copilot July 15, 2026 22:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vieiralucas vieiralucas merged commit d1a2a97 into main Jul 15, 2026
156 checks passed
@vieiralucas vieiralucas deleted the bh-stubsA branch July 15, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants