mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 14:10:49 -05:00
* fix(ses): verify the sender before the stored template and tenant associations A tenant-scoped SES v2 send refused an unassociated resource with the 403 before anything else, and SendEmail and SendBulkEmail looked a stored template up before checking the sender. AWS reports a missing configuration set, then an unverified sender or return path, then a missing stored template, and the tenant association 403 last. The tenant lookup and the DISABLED refusal stay early; the template lookup and the association check now run inside the send, after sender verification. SendBulkEmail and SendBulkTemplatedEmail now verify the sender and return path once for the whole call, unless no entry has a recipient. * fix(ses): run the tenant gate inside the send and order v1 bulk like v2 The first half of the tenant gate (lookup and DISABLED refusal) moves from the v2 controller into the send paths, so the association check reuses the tenant it found, and a raw message is read for its X-SES-CONFIGURATION-SET header only when the tenant is DISABLED. v1 SendBulkTemplatedEmail passes its stored template to the send, which looks it up after sender verification as v2 SendBulkEmail does. * fix(ses): read every v1 bulk destination entry like AWS SendBulkTemplatedEmail stopped reading Destinations.member.N at the first entry with no addresses, replacement data or tags. An empty ToAddresses list, which boto3 sends as a bare empty-valued key, ended the list there, so later entries were dropped and a lone empty entry was answered "At least one destination is required." instead of reaching the send. The handler now reads up to the highest member index. A missing Template (with no TemplateArn), missing Destinations, and an entry without a Destination or a skipped index are model violations, answered together as one 400 ValidationError ahead of the address syntax, the template selector and the destination count. In the send, an entry with no recipient beside entries with one fails alone with "Missing required header 'To'." on v1 and v2 alike, while a request in which no entry names a recipient still answers every entry "Destination cannot be empty", ahead of sender verification and the template lookup. All of it was probed. * refactor(ses): build the value-less not-null violation in SmithyValidationErrors Some operations answer a missing member as "Value at '<path>' failed to satisfy constraint: Member must not be null", without the null that SmithyValidationErrors.notNull puts after "Value". SesQueryHandler, SesExportJobService and SesReceiptRuleService each built that text themselves. SmithyValidationErrors.notNullWithoutValue now builds it beside notNull, and the three use it.