Scenario: Enforcement proof (dry-run): all disallowed requesters are denied against in-scope receiver VPC
@vpc @tlp-amber @tlp-red @CCC.VPC.CN03 @CCC.VPC.CN03.AR01 @Destructive @MAIN @DEFAULT @CCC.VPCGiven a cloud api for "{Instance}" in "api"45µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"125µs
And I refer to "{result}" as "vpcService"16µs
And I refer to "{UID}" as "ReceiverVpcId"14µs
And I refer to "{Cn03NonAllowlistedRequesterVpcId}" as "NonAllowlistedRequesterVpcId"12µs
And I load environment variable "CN03_PEER_TRIAL_MATRIX_FILE" as "PeerTrialMatrixFile"16µs
And "{ReceiverVpcId}" is not nil14µs
When I call "{vpcService}" with "ValidateDisallowListEnforcement" using argument "{ReceiverVpcId}"342ms
And I attach "{result.Summary}" to the test output as "Disallow-list Enforcement Summary"70µs
And I attach "{result.Results}" to the test output as "Disallow-list Enforcement"100µs
Then "{result.ListDefined}" is true74µs
And "{result.TestedCount}" should be greater than "0"36µs
And "{result.AllCorrect}" is true
45µsexpected {result.AllCorrect} to be truthy, got false (type: bool)
And "{result.ViolationCount}" is "0"21µs
📎 Attachments:Disallow-list Enforcement Summary
View Content (50 bytes)
2 of 2 disallow-list VPC(s) had guardrail mismatch
Disallow-list Enforcement
View JSON (1649 bytes)
[{"AllowListDefined":true,"ConflictMessage":"non-allowlisted requester permitted by guardrail policy","ConflictType":"DENYLIST_CONFLICT","DryRunAllowed":true,"ErrorCode":"DryRunOperation","ExitCode":0,"GuardrailExpectation":"deny","GuardrailMismatch":true,"Origin":"terraform-fixture","PeerOwnerId":"","PeerVpcId":"vpc-08d29b9a77c3a1931","Reason":"DryRunOperation indicates request would be allowed; CN03 guardrail mismatch: allow-list expects deny for requester vpc-06343230833672ab6","ReceiverVpcId":"vpc-08d29b9a77c3a1931","RequesterInAllowList":false,"RequesterVpcId":"vpc-06343230833672ab6","Stderr":"operation error EC2: CreateVpcPeeringConnection, https response error StatusCode: 412, RequestID: f44d1568-5704-452e-822c-31db3d91ab21, api error DryRunOperation: Request would have succeeded, but DryRun flag is set."},{"AllowListDefined":true,"ConflictMessage":"non-allowlisted requester permitted by guardrail policy","ConflictType":"DENYLIST_CONFLICT","DryRunAllowed":true,"ErrorCode":"DryRunOperation","ExitCode":0,"GuardrailExpectation":"deny","GuardrailMismatch":true,"Origin":"terraform-fixture","PeerOwnerId":"","PeerVpcId":"vpc-08d29b9a77c3a1931","Reason":"DryRunOperation indicates request would be allowed; CN03 guardrail mismatch: allow-list expects deny for requester vpc-08678ebdbec637832","ReceiverVpcId":"vpc-08d29b9a77c3a1931","RequesterInAllowList":false,"RequesterVpcId":"vpc-08678ebdbec637832","Stderr":"operation error EC2: CreateVpcPeeringConnection, https response error StatusCode: 412, RequestID: 67ff3750-56ce-45cc-98db-fb4366444e20, api error DryRunOperation: Request would have succeeded, but DryRun flag is set."}] Scenario: Enforcement proof (dry-run): non-allowlisted requester is denied even when not explicitly listed as disallowed
@vpc @tlp-amber @tlp-red @CCC.VPC.CN03 @CCC.VPC.CN03.AR01 @Destructive @MAIN @CCC.VPCGiven a cloud api for "{Instance}" in "api"43µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"141µs
And I refer to "{result}" as "vpcService"28µs
And I refer to "{UID}" as "ReceiverVpcId"26µs
And I refer to "{Cn03NonAllowlistedRequesterVpcId}" as "NonAllowlistedRequesterVpcId"19µs
And I load environment variable "CN03_PEER_TRIAL_MATRIX_FILE" as "PeerTrialMatrixFile"18µs
And "{ReceiverVpcId}" is not nil14µs
Given "{NonAllowlistedRequesterVpcId}" is not nil16µs
When I call "{vpcService}" with "EvaluatePeerAgainstAllowList" using argument "{NonAllowlistedRequesterVpcId}"90µs
Then "{result.AllowedListDefined}" is true24µs
And "{result.Allowed}" is false19µs
When I call "{vpcService}" with "AttemptVpcPeeringDryRun" using arguments "{NonAllowlistedRequesterVpcId}" and "{ReceiverVpcId}"260ms
Then "{result.DryRunAllowed}" is false
45µsexpected {result.DryRunAllowed} to be falsy, got true (type: bool)
And "{result.AllowListDefined}" is true21µs
And "{result.RequesterInAllowList}" is false24µs
And "{result.GuardrailExpectation}" is "deny"27µs
And "{result.GuardrailMismatch}" is false21µs
And "{result.ExitCode}" should be greater than "0"26µs
And "{result.Reason}" contains "guardrail aligned"24µs
And "{result.ConflictType}" is ""23µs