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"34µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"140µs
And I refer to "{result}" as "vpcService"20µs
And I refer to "{UID}" as "ReceiverVpcId"15µs
And I refer to "{Cn03NonAllowlistedRequesterVpcId}" as "NonAllowlistedRequesterVpcId"13µs
And I load environment variable "CN03_PEER_TRIAL_MATRIX_FILE" as "PeerTrialMatrixFile"16µs
And "{ReceiverVpcId}" is not nil15µs
When I call "{vpcService}" with "ValidateDisallowListEnforcement" using argument "{ReceiverVpcId}"212ms
And I attach "{result.Summary}" to the test output as "Disallow-list Enforcement Summary"45µs
And I attach "{result.Results}" to the test output as "Disallow-list Enforcement"68µs
Then "{result.ListDefined}" is true35µs
And "{result.TestedCount}" should be greater than "0"36µs
And "{result.AllCorrect}" is true
47µsexpected {result.AllCorrect} to be truthy, got false (type: bool)
And "{result.ViolationCount}" is "0"20µ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-0133444d5fa2f6bba","Reason":"DryRunOperation indicates request would be allowed; CN03 guardrail mismatch: allow-list expects deny for requester vpc-02f7f1c9c21fbf4c8","ReceiverVpcId":"vpc-0133444d5fa2f6bba","RequesterInAllowList":false,"RequesterVpcId":"vpc-02f7f1c9c21fbf4c8","Stderr":"operation error EC2: CreateVpcPeeringConnection, https response error StatusCode: 412, RequestID: d8ff3515-f0ac-4593-9dc4-7fc28b7bd973, 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-0133444d5fa2f6bba","Reason":"DryRunOperation indicates request would be allowed; CN03 guardrail mismatch: allow-list expects deny for requester vpc-0cd15c2c6c3933bcc","ReceiverVpcId":"vpc-0133444d5fa2f6bba","RequesterInAllowList":false,"RequesterVpcId":"vpc-0cd15c2c6c3933bcc","Stderr":"operation error EC2: CreateVpcPeeringConnection, https response error StatusCode: 412, RequestID: e5d9c403-4ecb-4443-8ffb-63f66dd1fb36, 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"30µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"149µs
And I refer to "{result}" as "vpcService"16µs
And I refer to "{UID}" as "ReceiverVpcId"12µs
And I refer to "{Cn03NonAllowlistedRequesterVpcId}" as "NonAllowlistedRequesterVpcId"15µs
And I load environment variable "CN03_PEER_TRIAL_MATRIX_FILE" as "PeerTrialMatrixFile"17µs
And "{ReceiverVpcId}" is not nil18µs
Given "{NonAllowlistedRequesterVpcId}" is not nil16µs
When I call "{vpcService}" with "EvaluatePeerAgainstAllowList" using argument "{NonAllowlistedRequesterVpcId}"85µs
Then "{result.AllowedListDefined}" is true22µs
And "{result.Allowed}" is false19µs
When I call "{vpcService}" with "AttemptVpcPeeringDryRun" using arguments "{NonAllowlistedRequesterVpcId}" and "{ReceiverVpcId}"116ms
Then "{result.DryRunAllowed}" is false
40µsexpected {result.DryRunAllowed} to be falsy, got true (type: bool)
And "{result.AllowListDefined}" is true17µs
And "{result.RequesterInAllowList}" is false17µs
And "{result.GuardrailExpectation}" is "deny"17µs
And "{result.GuardrailMismatch}" is false16µs
And "{result.ExitCode}" should be greater than "0"17µs
And "{result.Reason}" contains "guardrail aligned"18µs
And "{result.ConflictType}" is ""15µs