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"170µs
And I refer to "{result}" as "vpcService"18µs
And I refer to "{UID}" as "ReceiverVpcId"14µs
And I refer to "{Cn03NonAllowlistedRequesterVpcId}" as "NonAllowlistedRequesterVpcId"15µs
And I load environment variable "CN03_PEER_TRIAL_MATRIX_FILE" as "PeerTrialMatrixFile"18µs
And "{ReceiverVpcId}" is not nil15µs
When I call "{vpcService}" with "ValidateDisallowListEnforcement" using argument "{ReceiverVpcId}"456ms
And I attach "{result.Summary}" to the test output as "Disallow-list Enforcement Summary"64µs
And I attach "{result.Results}" to the test output as "Disallow-list Enforcement"90µs
Then "{result.ListDefined}" is true53µs
And "{result.TestedCount}" should be greater than "0"68µs
And "{result.AllCorrect}" is true
30µ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-061fc0e23d1f97e09","Reason":"DryRunOperation indicates request would be allowed; CN03 guardrail mismatch: allow-list expects deny for requester vpc-035038ee014ffbedf","ReceiverVpcId":"vpc-061fc0e23d1f97e09","RequesterInAllowList":false,"RequesterVpcId":"vpc-035038ee014ffbedf","Stderr":"operation error EC2: CreateVpcPeeringConnection, https response error StatusCode: 412, RequestID: 18091e37-6cfe-472f-b880-8d9ea72093f6, 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-061fc0e23d1f97e09","Reason":"DryRunOperation indicates request would be allowed; CN03 guardrail mismatch: allow-list expects deny for requester vpc-057df3e61ae902317","ReceiverVpcId":"vpc-061fc0e23d1f97e09","RequesterInAllowList":false,"RequesterVpcId":"vpc-057df3e61ae902317","Stderr":"operation error EC2: CreateVpcPeeringConnection, https response error StatusCode: 412, RequestID: 6d7e555d-f215-4b23-8e33-ff9aad8ad5c0, 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"46µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"116µs
And I refer to "{result}" as "vpcService"30µs
And I refer to "{UID}" as "ReceiverVpcId"18µs
And I refer to "{Cn03NonAllowlistedRequesterVpcId}" as "NonAllowlistedRequesterVpcId"16µs
And I load environment variable "CN03_PEER_TRIAL_MATRIX_FILE" as "PeerTrialMatrixFile"17µs
And "{ReceiverVpcId}" is not nil15µs
Given "{NonAllowlistedRequesterVpcId}" is not nil25µs
When I call "{vpcService}" with "EvaluatePeerAgainstAllowList" using argument "{NonAllowlistedRequesterVpcId}"113µs
Then "{result.AllowedListDefined}" is true24µs
And "{result.Allowed}" is false18µs
When I call "{vpcService}" with "AttemptVpcPeeringDryRun" using arguments "{NonAllowlistedRequesterVpcId}" and "{ReceiverVpcId}"313ms
Then "{result.DryRunAllowed}" is false
61µsexpected {result.DryRunAllowed} to be falsy, got true (type: bool)
And "{result.AllowListDefined}" is true17µs
And "{result.RequesterInAllowList}" is false28µs
And "{result.GuardrailExpectation}" is "deny"47µs
And "{result.GuardrailMismatch}" is false17µs
And "{result.ExitCode}" should be greater than "0"29µs
And "{result.Reason}" contains "guardrail aligned"19µs
And "{result.ConflictType}" is ""18µs