mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
* feat(redshift-serverless): allow cross-account restore of a snapshot its policy shares (#7801) RestoreFromSnapshot with an ownerAccount other than the caller's now reads the snapshot from the owner's account and evaluates its resource policy for redshift-serverless:RestoreFromSnapshot. A policy that allows the caller or the caller's account grants the restore, an explicit Deny wins, and a snapshot with no policy is not shared (AccessDeniedException). The dump is read from the owner's directory and the restore targets the caller's namespace and workgroup. * fix(redshift-serverless): restore a shared snapshot by the owner's ARN and check its policy under the service lock A cross-account RestoreFromSnapshot with the owner's snapshotArn failed validation because only the caller's account was accepted. The snapshot and its policy were also checked before the service lock was taken, so a deletion, expiry or policy revocation could land between the check and the restore. The check now runs under the lock. * fix(redshift-serverless): evaluate a shared snapshot's policy through a ResourcePolicyProvider (#7801) Move the snapshot policy check out of the service and into IAM enforcement, as SQS, SNS and S3 do: - RedshiftServerlessResourcePolicyProvider supplies the snapshot's policy and the account in its ARN. A statement with no Resource, as in AWS's own PutResourcePolicy example, applies to the snapshot. - redshift-serverless leaves NOT_COVERED: namespaces, workgroups and snapshots are found by name through StoredResourceArns, and RestoreFromSnapshot and GetSnapshot name the owner's snapshot when ownerAccount is set. - Drop RedshiftServerlessSharedSnapshots and the snapshot-taking restoreFromSharedSnapshot overload. * fix(redshift-serverless): derive snapshot account from the generator and find endpoint access ARNs (#7801) Take ownerAccount as an account member in the request-resources generator and honor account on found resources, replacing the hand-written CORRECTIONS entries and the two-name branch in find. Answer endpointAccess in find. Share one call in handleRestoreFromSnapshot. * fix: derive account members from service models and reuse endpoint lookup