You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Network Firewall: DryRun is ignored, so a dry run creates and updates rule groups and firewall policies #4763
CreateRuleGroup, UpdateRuleGroup, CreateFirewallPolicy and UpdateFirewallPolicy, the four actions that take DryRun.
Expected behavior
From the Network Firewall API Reference, DryRun: "If set to TRUE, Network Firewall checks whether the request can run successfully, but doesn't actually make the requested changes. The call returns the value that the request would return if you ran it with dry run set to FALSE, but doesn't make additions or changes to your resources."
So a dry run validates the request and answers as the real call would, but nothing is created, updated or rotated: the stored resource and its UpdateToken stay as they were, and a dry-run create leaves the name free for a real create.
Actual behavior
Floci never reads DryRun (there's no reference to it anywhere under services/networkfirewall on main), so a dry run is just a normal call. CreateRuleGroup --dry-run creates the rule group, and UpdateRuleGroup --dry-run replaces its definition and rotates the token.
Once #4114 lands, an update builds its replacement before touching the store and writes it back in one place, so honoring DryRun on the two update actions comes down to skipping that write. The two create actions need the same check before they store anything.
Reproduction
aws --endpoint-url http://localhost:4566 network-firewall create-rule-group \
--rule-group-name dry-run-check --type STATEFUL --capacity 10 \
--rules 'pass tcp any any -> any any (sid:1;)' --dry-run
aws --endpoint-url http://localhost:4566 network-firewall describe-rule-group \
--rule-group-name dry-run-check --type STATEFUL
# AWS: ResourceNotFoundException, the dry run created nothing. Floci: the rule group exists.
Environment
Floci version / image tag: current main (55d37cfc4)
Java SDK version (if applicable): n/a
How you're running Floci (Docker / native / mvn quarkus:dev): any
Activity