mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 14:10:49 -05:00
* fix(ses): enforce full AWS tag validation across all SES resources The shared SES tag validator only checked a single tag's key/value length, so CreateConfigurationSet, CreateEmailTemplate, CreateEmailIdentity, CreateContactList, TagResource, and tenant tagging all silently accepted invalid tag sets. Add SesTags.validate(List<Tag>) matching probe-confirmed AWS SES v2 behavior: at most 50 tags, unique keys, key 1-128 / value 0-256 code points, both key and value restricted to letters, numbers, Unicode whitespace, and _ . : / = + - @, and the aws: key prefix (case-insensitive) reserved for system tags. Lengths are counted by Unicode code point (Smithy semantics), not UTF-16 code units. TagResource enforces the 50-tag limit on the merged (existing + incoming) set, allowing updates to existing keys. Messages and evaluation order mirror AWS; all violations are BadRequestException / 400. Route every SES tag entry point through the validator, and validate CreateEmailIdentity's tags before the identity is persisted so an invalid tag set fails atomically instead of leaving the identity behind. Update the integration tests that encoded the old non-AWS behavior (an omitted tag value now returns 400 like real AWS). * test(ses): cover CreateEmailTemplate invalid-tag rejection Route-level coverage that CreateEmailTemplate rejects an invalid tag set (duplicate keys) atomically without persisting the template. The service-level SesTags call was otherwise only exercised through SesTagsTest, so a regression removing it could pass unnoticed.