mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
* feat(ec2): support snapshot block public access Adds EnableSnapshotBlockPublicAccess, DisableSnapshotBlockPublicAccess and GetSnapshotBlockPublicAccessState over the EC2 Query protocol. The setting is account-level state scoped to one region, so it lives in a small Ec2SnapshotBlockPublicAccessService keyed by region, mirroring Ec2EbsEncryptionService. The account-aware storage backend namespaces the keys by the calling credential's account. A region that was never configured reads back unblocked. Enable accepts only block-all-sharing and block-new-sharing, per the EC2 model, and rejects unblocked with InvalidParameterValue. Disable returns the resulting unblocked rather than the prior state. Only the Get response carries managedBy, always account, since Floci has no declarative-policy layer. * fix(ec2): honor DryRun on snapshot block public access EnableSnapshotBlockPublicAccess, DisableSnapshotBlockPublicAccess and GetSnapshotBlockPublicAccessState all model the standard DryRun parameter, but none of the three handlers checked it. Enable persisted the requested state, Disable persisted unblocked and Get answered 200, so DryRun=true had real side effects on both write paths. All three handlers now take the parameter map and call the existing checkDryRun(params). Enable validates State first, through a new validateEnableState on the service, because AWS reports an invalid parameter ahead of DryRunOperation and only returns DryRunOperation once the request would otherwise have succeeded. So State=unblocked with DryRun=true still fails with InvalidParameterValue, and a missing State still fails with MissingParameter.