SendBulkTemplatedEmail rejected the whole call for an entry with more
than 50 recipients, for template data that is not a JSON object, and
for a tag with an empty name. AWS answers each of these with a 200 and
that entry's InvalidParameterValue ("Recipient count exceeds 50.",
"The template data is invalid", "The tag name must be specified."),
while the other entries still send. DefaultTemplateData that is not a
JSON object, or a DefaultTags tag with an empty name, fails every
entry. Within one entry an address syntax error wins over an empty tag
name, which wins over invalid template data, which wins over the
recipient count.
A DefaultTags or ReplacementTags tag without a Name or a Value is a
model violation, and a skipped tag index is a tag with neither, listed
in the 400 ValidationError after the top-level members. A missing or
empty DefaultTemplateData is a 400 InvalidParameterValue, "The default
template data does not exist".
The handler marks such an entry with its message, and the send answers
it in the per-entry loop after the address syntax. The recipient limit
stays in the service: per entry for v1, whole call for v2 SendBulkEmail,
which was not probed.
* feat(ses): add SES v2 GetEmailAddressInsights
Answer GetEmailAddressInsights offline with verdicts derived from the
address alone. Malformed and over-long addresses answer 200 with every
verdict LOW, the operation is not gated on Virtual Deliverability
Manager, and only suppressionlist@simulator.amazonses.com reports a
missing mailbox, as real SES does. Domains reserved by RFC 2606 and
RFC 6761 have no valid DNS records; every other domain is taken to
have them.
* docs(ses): scope the non-ASCII insights deviation to unquoted parts
A send does not inspect a quoted local part, so GetEmailAddressInsights
rates "é"@gmail.com like any other address. Say so in the deviation
note and pin it, with the unquoted and domain cases, in unit tests.
* 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.
* feat(ses): add the v2 reputation entity operations
Implement ListReputationEntities, GetReputationEntity,
UpdateReputationEntityPolicy and UpdateReputationEntityCustomerManagedStatus.
Every tenant is a reputation entity referenced by its full ARN. The policy
and the customer-managed status live on the tenant record, and the status
is the tenant's aggregate SendingStatus. A tenant whose status is DISABLED
is now refused on SendEmail and SendBulkEmail with MessageRejected.
Shapes, messages and validation order follow probes against real SES.
* test(ses): surface unexpected tenant cleanup failures in the reputation compat test
Every SES v2 operation reads its body through readOptionBody, now also
CreateEmailIdentity, CreateEmailTemplate, UpdateEmailTemplate,
CreateCustomVerificationEmailTemplate,
UpdateCustomVerificationEmailTemplate and TagResource, which read a body
that is not a JSON object as one without members. Only an empty body is
read as one without members; a whitespace-only body, malformed JSON and
anything but whitespace after the object are a SerializationException
without a message, as AWS answers them. The hand-rolled copies in the
tenant, contact, account, identity, import job, send, dedicated IP,
suppression and template controllers, which answered malformed JSON
with a BadRequestException carrying Jackson's message, are gone, and so
is the import job controller's own strict reader. The operations that
answer an empty body with "Request body is required." no longer give
that answer for a whitespace-only one.
* fix(ses): answer SES v2 wire-type errors with AWS's messages
A scalar for a map member is "Expected map or null", a string, boolean,
object or list for an integer member gets the Integer conversion message,
and a number is narrowed to an int the way AWS reads it (1.5 is accepted,
a value above the int range saturates before the range check). A body that
is not a JSON object is a SerializationException instead of a BadRequest.
* test(ses): give the new SES v2 tests their own order and share the non-object bodies
* fix(ses): check v2 metrics, import, export and account bodies against the service model
BatchGetMetricData, CreateImportJob, CreateExportJob,
PutAccountSuppressionAttributes and PutAccountVdmAttributes now check their
body against the vendored SES v2 shapes before their own validation, as the
send and configuration set operations do. A member of the wrong JSON type,
nested ones included, is a SerializationException with the deserializer's
message. BatchGetMetricData keeps its Virtual Deliverability Manager gate
ahead of the check.
The type checks the walk makes unreachable are removed from the metrics,
import and account handlers and from the export service; null list
elements are still rejected where they were before.
* docs(ses): describe what the export filter validation still checks
* style(ses): drop the AwsException import the filter check no longer uses
* feat(ses): validate v2 tracking configuration overrides
SendEmail and SendBulkEmail now check ConfigurationOverrides.Tracking's
values the way SES v2 does: a value outside ENABLED/DISABLED is a
validation error, both values reported together with the click one first,
ahead of the tags and the configuration set. The shapes pre-check already
refuses a wrong JSON type. Floci has no open or click tracking, so a valid
override is accepted and has no effect.
* test(ses): check a refused tracking override records no message
* refactor(core): share the Smithy validation-error message
The "N validation error(s) detected: a; b" message is Smithy's, not SES's, yet
SES built it in eight places, plus five helpers that wrote the single-violation
form by hand. They now all go through core.common.SmithyValidationErrors,
which takes the protocol's error code. No message changes.
* fix(ses): check v2 contact request bodies against the service model
CreateContactList, UpdateContactList, CreateContact, UpdateContact and
ListContacts read their members by hand. A Topics or TopicPreferences
value that was not an array was a Floci-specific BadRequestException,
and a topic or preference member of the wrong JSON type was read as its
text, so it reached the enum and name validation instead of failing
deserialization as on AWS.
These operations now check their body against the SES v2 shapes right
after the JSON object check, like the send operations. The first member
of the wrong JSON type, in body order, is a SerializationException with
AWS's deserializer message, ahead of the name validation, the page size
and the contact list lookup. The type checks this makes unreachable are
removed, including the hand-built AttributesData messages, which the
walk now produces through the shared helper. UnsubscribeAll and
UseDefaultIfPreferenceUnavailable keep their boolean coercion, and
PageSize its integer check.
* docs(ses): note the null contact topic element deviation
A null element of Topics or TopicPreferences passes the SES v2 shape
check like a null address element, but SES then answers it with a 500
InternalFailure. Floci keeps a 400 BadRequestException naming the
element. The request member types section only described the address
case, "as on AWS", so it now says that this one deviates.
* fix(ses): check v2 configuration set request bodies against the service model
CreateConfigurationSet, UpdateConfigurationSet,
PutConfigurationSetSuppressionOptions, PutConfigurationSetVdmOptions and
Create/UpdateConfigurationSetEventDestination now check their body against
the vendored SES v2 shapes before any other validation, as the send
operations do. A member of the wrong JSON type, nested ones included, is a
SerializationException with the deserializer's message, ahead of the name
validation and the configuration set lookup.
The type checks the walk makes unreachable are removed from the option
parsers and parseSuppressedReasons. requireOptionObject and coerceBoolean
build their messages through the SesV2Json helpers. A non-object event
destination is now a SerializationException instead of "EventDestination is
required.", and these operations answer a non-object body with "Request
body must be a JSON object." while a blank body still reads as {}.
* fix(ses): read the suppression-options body like the other checked operations
PutConfigurationSetSuppressionOptions inlined the blank-body, parse and
requireJsonObject steps that readOptionBody already performs, which made
its order look different from the other checked operations. It now calls
readOptionBody, so all six read the body the same way before the shape
check. Behaviour is unchanged.
* test(ses): share the SES v2 member-type test helpers
The configuration set member-type test copied the send test's request
assertion and deserializer message constants. Both now use
SesV2SerializationErrors, which takes the HTTP method, so the Contact and
metrics/import/export PRs can reuse it.
* fix(ses): check v2 send request bodies against the service model
SendEmail, SendBulkEmail and SendCustomVerificationEmail read their
members by hand, so a member of the wrong JSON type was coerced, read as
empty, or rejected with a Floci-specific BadRequestException, depending
on which member it was. AWS deserializes the whole body against the
model first and answers the first member of the wrong type, in body
order, with a SerializationException and its deserializer message.
tools/aws/regen_sesv2_shapes.py vendors the body shapes of botocore's
SES v2 model into src/main/resources/aws/sesv2-request-shapes.json, kept
in sync by make aws-data-check like the DynamoDB shapes.
SesV2RequestShapes checks a body against them, and the three send
endpoints call it before reading any member. The type checks it makes
redundant are removed from the send helpers. A null address list
element still passes and fails as "Invalid email address null.", as on
AWS.
Only the string, blob, list, structure and map messages have been
probed, so number, boolean and timestamp members are left to their
controllers.
* fix(ses): report a null v2 send address where SES does
A null element of a v2 send address list was rejected for the whole
request while the body was read. SES lets it through deserialization
and reports it later: SendEmail answers "Invalid email address null."
after its content and sender checks and before the tenant lookup, and
SendBulkEmail reports it as the INVALID_PARAMETER status of the entry it
belongs to, of every entry for a null Reply-To, or as "Destination
cannot be empty" when no entry of the request has a non-null recipient.
The address lists now keep the null, SendEmail checks for it ahead of
the tenant gate, and the bulk entry check reports it per entry. Two
ordered integration tests that shared an @Order value get their own.
* chore(core): share the vendored request-shape model
DynamoDbRequestShapes and SesV2RequestShapes each carried the same
Shape and Model records and the same parse() and load(), and load()
repeated VendoredResources.read. RequestShapeModel in core.common now
holds that half and both checks use it; each keeps its own walk and its
protocol's messages.
Under IAM enforcement, SES published event-destination events and identity notifications to
whatever SNS topic it was configured with, through an internal call nothing checked, so a caller
refused sns:Publish could still put messages on a topic by pointing a configuration set at it. On
AWS, SES publishes as ses.amazonaws.com and the topic's policy decides: it has to allow SES, under
an aws:SourceArn naming the configuration set or identity whose configuration names the topic.
- ServiceCallAuthorizer decides a call one AWS service makes to another's resource on its own
behalf from the target's resource policy alone, read through the same providers the request
filter uses and picked by the target ARN's service. A target with no policy refuses, and with
enforcement off every call is allowed. ResourcePolicyProviders collects what the providers
supply, for the filter and the authorizer alike.
- IamConditionContextResolver.serviceCallContext builds that call's request context from the IAM
User Guide's global keys: aws:PrincipalIsAWSService, aws:PrincipalServiceName and
aws:PrincipalServiceNamesList, aws:SourceArn and aws:SourceAccount, aws:ResourceAccount and
aws:RequestedRegion, and none of the keys that describe an IAM principal. A publish to an SNS
topic from SES also carries aws:SourceOwner, which the SNS Developer Guide lists SES among the
services setting, and which the default topic policy checks.
- SnsResourcePolicyProvider supplies a topic's policy and the account in its ARN, also when the
topic does not exist. A topic with no Policy attribute gets the default a new topic has, for the
topic's own account. Topic policies so also take part in a JSON-protocol request that names a
topic, as any resource policy does.
- SesEventPublisher asks before publishing to SNS: for an event destination with the configuration
set's ARN, for an identity notification with the ARN of the identity that names the topic, the
sender's own or its domain's, both with the sending account. A refused event is dropped. A
notification SES cannot publish, because the topic is gone from its own account or its policy
refuses SES, also takes the topic out of the identity's bounce and complaint settings and turns
email feedback forwarding back on, as the SES Developer Guide describes; a delivery setting
stays. The identity's notification settings are written under the identity lock, so that
write and an API call changing them cannot lose each other.
- CreateReceiptRule and UpdateReceiptRule ask the same question of an action's TopicArn, with the
rule's ARN as aws:SourceArn, and answer InvalidSnsTopic when the topic's policy does not let SES
publish, which the SES API Reference lists as "could not publish to the topic, possibly due to
permissions issues". The rules still route no mail.
- A resource policy statement that names the caller only through its account, by its id, root ARN
or S3 canonical user ID, delegates to that account (IAM User Guide, "AWS account principals"):
across accounts it is still the owner's half of the grant, but within the account it no longer
grants on its own, and the caller's identity policies have to allow the request. Floci let such
a statement grant on its own, for bucket and function policies already, so a topic policy naming
its own account would have let every user of the account publish.
- A Deny's NotPrincipal follows the IAM User Guide ("AWS JSON policy elements: NotPrincipal"): it
spares an IAM caller only when it names the caller's account as well as the caller, since without
the account AWS "might deny access to the entire account", and never spares one with a permissions
boundary attached, which it "will always deny". CallerArns says whether a boundary is attached to
the user or to the role a session assumed. An Allow's NotPrincipal still grants everyone it does
not name, as Access Analyzer warns it can.
* fix(ses): delete by id and filter by source in /_aws/ses
The inspection endpoint follows LocalStack's contract, as
docs/services/ses.md says, but differed from it in two ways. LocalStack
documents that "The query parameter id can be used to delete only a
specific message", and that "Query parameters id and email can be used
to filter by message ID and message source respectively".
- DELETE /_aws/ses?id=<id> cleared every message. It now deletes only
that message, in whichever region it was sent. An unknown id deletes
nothing.
- GET /_aws/ses?email=<address> matched the address against each
message's ToAddresses. It now matches the message's Source, as
LocalStack does.
GET also listed messages in storage hash order. It now lists them
oldest first by Timestamp, the order LocalStack keeps them in.
Floci's own tests read Cognito codes and other mail with
?email=<recipient>. They now list the mailbox and pick the recipient's
messages out of it, through a new SesMailbox test helper in src/test and
the same filtering in the Java and Node compatibility tests. A raw
send's mailbox entry shows RawData without its recipients, so the test
for recipients read from a raw message's headers checks the stored
record.
* fix(codeartifact): run the pypiserver sidecar under an init process so a stop ends it at once
The pypiserver image's entrypoint execs pypi-server, which installs no SIGTERM handler. The kernel
gives PID 1 no default signal actions, so the container ignored every stop request and went only
when Docker sent SIGKILL at the end of the 5-second timeout: each reset, repository delete and
shutdown waited that long for every pypi repository's container, one after another.
ContainerBuilder gains withInit(), carried on ContainerSpec as init and passed to Docker as
HostConfig.Init (docker run --init), and PypiserverSidecarManager uses it. Docker's init runs as
PID 1 and forwards the SIGTERM, so a stop now returns in a fraction of a second. Verdaccio already
handles the signal itself and is unchanged.
* fix(firehose): check buffers every second so delivery follows the buffering interval
AWS delivers a Firehose buffer once the first buffer condition is met. Floci checked for elapsed
buffering intervals on a 10-second tick, so a buffer was delivered up to 10 seconds after its
IntervalInSeconds ended: a 5-second interval landed anywhere from 5 to 15 seconds after the first
record. The default tick is now one second; the check is a scan of the in-memory buffers.
FirehoseFlushIntegrationTest's profile only set the same one-second tick, so it is removed and the
class shares the default test application. The compat tests that wait for a delivery checked S3
every 2 or 5 seconds; against Floci they now check every 250 ms, and keep their cadence against
real AWS.
* test: make subclass mocks the default so mocking stays cheap in a loaded test JVM
Mockito's default inline mock maker redefines every class it mocks in the running JVM. A
redefinition gets slow once the test JVM has loaded the Quarkus applications of the classes that
ran before, which in CI is most of the run: a unit class's first test spent seconds building its
mocks, and EmulatorLifecycleTest, which mocks some fifty types, spent 22 seconds. Subclass mocks
generate a subclass instead and redefine nothing. After twelve Quarkus applications in one JVM, the
fourteen Mockito classes whose first test was slowest in CI take 20.5 seconds instead of 41.9, and
their first tests 6.9 seconds instead of 27.8.
mockito-extensions/org.mockito.plugins.MockMaker makes the subclass mock maker the default. A
subclass cannot extend a final class, record or enum, so those mocks go through
InlineMocks.inlineMock and inlineSpy, or @Mock(mockMaker = MockMakers.INLINE), and
EmulatorLifecycleTest's static mock of Quarkus asks for the inline maker. The ContainerSpec mocks
a mocked ContainerBuilder.Builder returned were opaque values, so they are real specs now.
* fix(cloudformation): leave the last rollback's failed delete to ContinueUpdateRollback
#4949 refuses an update over UPDATE_ROLLBACK_FAILED until ContinueUpdateRollback finishes the
rollback, as AWS does. #4834, merged minutes earlier, had seven tests that update over that
status, and main has failed them since c4a809f47.
Six are in CloudFormationSchedulerScheduleIntegrationTest. They now reach their next update the
way AWS requires: ContinueUpdateRollback, which retries the schedule's own rollback, or, where the
replacement's delete has to keep failing, a skip of the schedule. The two whose update was meant to
be blocked by the pending rollback now check that the update is refused.
The seventh shows a real clash. #4949 made a second ReplacementCleanup.rollback retry the delete
the first one could not make, which is ContinueUpdateRollback's job. The Scheduler provisioner also
calls rollbackUpdate inside an update, to undo its own failed call, so after a skip a failed group
move deleted the earlier orphan there and then, and a failure of that delete would have failed the
move's restore. An update now ends that retry as it starts, through
ReplacementCleanup.endRollbackRetry, so the orphan stays owed for the next committed update or the
stack delete, as both changes document.
Three more provisioners roll an update back before ReplacementCleanup.record has cleared the retry,
and each returns as soon as the retry ran, skipping its own restore. CloudWatchDashboard and
IotAuthorizer unwind a failed in-place update that way, and CognitoResourceServer's failed attempt
is rolled back the same way, so after a skip the update's snapshot was never put back while the
resource was reported restored. They end the retry as an update starts too.
---------
Co-authored-by: Priamo <pgermosen@gmail.com>
SendEmail, SendRawEmail and SendTemplatedEmail (v1) and SendEmail (v2)
accepted any Source or FromEmailAddress, so a send from an address that
was never verified succeeded and landed in /_aws/ses. The SendEmail API
Reference says "The message must be sent from a verified email address
or domain", and AWS rejects anything else with MessageRejected.
The send path now checks every address the developer guide names for
this error ("This error could apply to the "From", "Source", "Sender",
or "Return-Path" address"): the Source or FromEmailAddress, the
ReturnPath or FeedbackForwardingEmailAddress and, on a raw message,
every mailbox of its From header, its Sender and its Return-Path
header. A v2 raw send reads the From header only in place of a missing
FromEmailAddress and accepts any From header when one is given
(probe-confirmed), so the header is checked only then. An address
counts as verified when the address itself, its domain or a parent
domain is a verified identity ("if you create and verify an identity
for example.com, you don't need to create separate identities for
a.example.com, a.b.example.com, user@example.com, user@a.example.com").
The error matches AWS: one MessageRejected, "Email address is not
verified. The following identities failed the check in region
US-EAST-1: <address>, <address>", and nothing is captured or relayed.
The check runs after the request's own validation, so the existing
error order is unchanged.
A delegate sender names the owner's identity with SourceArn, FromArn
and ReturnPathArn, their X-SES-SOURCE-ARN, X-SES-FROM-ARN and
X-SES-RETURN-PATH-ARN headers, or v2 FromEmailAddressIdentityArn and
FeedbackForwardingEmailAddressIdentityArn. These are now read (a
parameter wins over its header, and only the first instance of a header
counts), and an address covered by another account's identity ARN is
not checked against the caller's identities. Floci does not evaluate
sending-authorization policies, so it lets such a send through, as it
did before. On a raw send the source ARN also covers the From and
return-path addresses that have no ARN of their own, as SendRawEmail
describes.
Cognito's verification codes and invitations go through SES too, from
Cognito's own no-reply@verificationemail.com or a pool's
EmailConfiguration sender that Cognito has already found verified. They
now use a separate entry point, sendServiceEmail, that skips the check.
Tests and compatibility tests that sent from an unverified address now
verify it first; where a test sent from an address under a domain
identity, the domain is verified by publishing its DKIM records, since
Floci keeps a domain Pending until they exist. SesDomainIdentityTestHelper
does that, and the two copies of the same setup in the configuration-set
tests and the one in SesV2IntegrationTest now use it.
Closes#5141
* fix(ses): match AWS tag ARN parsing and configuration set name errors
The SES v2 tag endpoints rejected malformed ARNs with messages that were
never checked against AWS, refused ARNs whose service was not "ses", and
compared the region before checking the resource exists. Configuration
set names were rejected with an invented message on both APIs.
Probed against AWS in us-west-2:
- Every malformed ARN (missing partition, service, account or resource
name, unknown type, ":" or "/" in the name) is BadRequestException
"ResourceArn is not the expected format", including an unknown type,
which was a 404.
- The partition and service are required but never compared.
- An invalid configuration-set name in the ARN is a message-less
ValidationException after the account check.
- TagResource and UntagResource check existence before the region.
- An omitted ResourceArn on Tag/Untag is a message-less
ValidationException. ListTagsForResource keeps a 400 where AWS
answers 500.
- "ResourceArn=" is read raw, since @QueryParam binds an empty value
as null.
- Configuration set names use AWS's three messages on every v1 and v2
operation, including sends: must be specified, cannot exceed 64
characters, and invalid characters.
* refactor(ses): share the configuration set name check and map tag domains by type
The v1 helper and the v2 CreateConfigurationSet handler now call the
service's validateName instead of repeating the empty-name check, and the
name pattern no longer restates the 64-character limit the length check
owns.
The seven taggable domain services implement SesTaggable, and SesService
keys them by ARN type in one map. That map replaces the type set and the
three dispatch switches, whose default arms could no longer be reached.
* feat(ses): support Content.Simple.Attachments in SESv2 SendEmail
Parse and validate Simple attachments, assemble them into one MIME message
with the relay's encoder, run the content scan over it as for raw sends,
relay them over SMTP, and expose them in the /_aws/ses mailbox as an
Attachments summary plus the base64 MIME message in RawData.
* fix(ses): sort SesService imports and document attachment encoding and RawData recipients
RawData keeps the To and Cc recipients the request named, including any
suppression later kept from delivery, and ContentTransferEncoding is validated
but every attachment part is base64-encoded. Both are now stated in the SES docs.
* fix(ses): reject line breaks in attachment MIME header members
ContentType, ContentDescription and ContentId are written verbatim into the
attachment part's MIME headers, so a CR or LF in any of them added header lines
to that part. They are now refused with BadRequestException by the same rule
MessageHeader.isSafe applies to custom headers. missingHeaderMember now builds
its message through constraintViolation.
* fix(ses): refuse attachments with unsupported file extensions
SES does not accept attachments whose file names end in one of the
extensions listed under "SES unsupported attachment types" in the developer
guide. The content scan now walks the parsed MIME for attachment file names,
from Content-Disposition or the Content-Type name parameter, and both the
Simple-with-attachments and raw send paths refuse such a message with
MessageRejected before anything is recorded.
* refactor(ses): share one MIME part walk between the content scans
hasBlockedAttachment repeated the worklist entityContains already used.
Both now go through anyPart, which walks every part, forwarded messages
and multiparts included, and runs the given check on each.
* feat(ses): add the S/MIME identity certificate operations
Implement AssociateEmailIdentityCertificate,
DisassociateEmailIdentityCertificate and ListEmailIdentityCertificates
as a control plane only: associations are stored per region and Floci
never signs mail.
Request validation, messages and precedence follow real SES: a domain
identity needs a FromAddress in the domain or a subdomain, one
certificate per address regardless of case, the request members are
checked before the identity, and the certificate is not inspected on
association. The reported status is Floci's own rule: ACTIVE while the
ARN names an issued, unexpired ACM certificate (with its expiry as
CertificateExpiryTime), FAILED otherwise. Disassociation is immediate
and idempotent, and the list pages through SesListPaging.
DeleteEmailIdentity now refuses an identity that still has a
certificate associated, as SES does. The v1 DeleteIdentity and
DeleteVerifiedEmailAddress share the identities and refuse it too.
* fix(ses): apply the documented S/MIME certificate requirements
ListEmailIdentityCertificates now reports ACTIVE only when the
association meets the SES Developer Guide's S/MIME certificate
considerations: the identity is verified, and the certificate is
currently valid, has an allowed key (RSA 2048/3072/4096 or EC P-256,
P-384, P-521, read from the certificate itself since ACM's stored key
algorithm folds other sizes into those) and an RFC822Name SAN equal to
the From address, case-sensitively. The docs link that section instead
of calling the criteria undocumented.
* fix(ses): require an email-signing end-entity S/MIME certificate
A probe against SES found requirements beyond the Developer Guide's
list: a CA certificate fails even with the right usages, and the
certificate needs both a key usage including digitalSignature and an
extended key usage including emailProtection, while other usages may
sit alongside them. ListEmailIdentityCertificates now applies them, and
the docs list them next to the guide's link.
* refactor(ses): reuse SesIdentityService's verified-identity check
The SES v2 model release of 2026-09-01 (botocore 1.43.86) added
UpdateConfigurationSet, a partial update whose only member is
MessageSecurityOptions, the S/MIME signing scheme of a configuration
set. CreateConfigurationSet accepts the same member and
GetConfigurationSet returns it.
Floci stores and returns the setting but never signs a message. Where
the API reference is silent, the request handling follows what SES
answered in us-west-2: an absent SigningScheme leaves the stored value
alone, an empty one resets it to DefaultScheme, both union members
store SmimeScheme, and a missing SignatureFormat stores DETACHED.
ListTenants now honours Filter.TENANT_NAME_CONTAINS and Filter.SENDING_STATUS
the way SES v2 matches them, with the validation messages and precedence SES
answers: the filter's keys and values, then the page size and an empty token,
then the filter's values. The filter is applied before the page is cut, and a
token continues only the filter it was taken with.
* fix(ses): serve the POST list bindings and Filter of ListEmailIdentities and ListConfigurationSets
Since AWS SDK for Java 2.55.8 and botocore 1.43.105 the SES v2 model sends
ListEmailIdentities as POST /v2/email/list-identities and ListConfigurationSets
as POST /v2/email/list-configuration-sets, each with a new Filter member.
Floci only served the GET bindings, so these lists failed for current SDKs.
Both lists now answer on both bindings. The filter follows real SES, probed
on 2026-10-03: what it matches, its validation messages and their precedence,
and a NextToken that continues only the filter it was taken with. The filter
is applied before the page is cut, so filtered pages are exact.
* fix(ses): bind identity list tokens to an unambiguous filter scope
A name filter of "null" produced the same token scope as an absent name, so a
token from one filter continued the other. The scope now leads with the type
and status, which never hold the separator, and ends with the name. The name
filter also runs before the status refresh, so domains it excludes are not
checked against Route 53.
* docs(ses): mark the GET list bindings as the pre-Filter ones
* feat(ses): apply the ListContacts filter
ListContacts now honours Filter.FilteredStatus and Filter.TopicFilter the way
SES v2 matches them, with the validation messages and precedence SES answers.
The filter is applied before the page is cut, so filtered pages are exact,
and a token stays a position in the list, as on SES, rather than being bound
to the filter.
* test(ses): name the filter unit test SesContactFilterServiceTest
* feat(ses): paginate the contact, dedicated IP pool, suppressed destination and receipt rule set lists
Page ListContactLists, ListContacts, ListDedicatedIpPools, GetDedicatedIps,
ListSuppressedDestinations and v1 ListReceiptRuleSets with the probed bounds
and messages. ListContacts serves 50 by default and receipt rule sets 100, the
figure the model documents; the lists whose default could not be measured
serve up to 1000. Where SES's own order is not stable Floci keeps the order
its unpaged lists already had. A suppressed-destination token is bound to the
reason filter and tenant it was taken with, as on SES.
* test(ses): isolate the contact paging compat test and cover v1 receipt rule set paging on the wire
The contact paging compatibility test cleared every contact list in the
account before and after it ran; it now runs as its own account and removes
only the list it created. A new integration test pages 101 receipt rule sets
through the Query API, where the earlier coverage only reached the service.
* docs(ses): note that SES lists receipt rule sets by name
Floci pages ListReceiptRuleSets in the creation order its unpaged list already
had; the paging paragraph now says SES lists them by name.
* feat(ses): paginate the tenant and import job lists
Page ListTenants, ListTenantResources, ListResourceTenants and ListImportJobs
on the shared SES paging, each with its own token namespace, and delete
SesTenantService.validateListPaging. The tenant lists answer the probed SES
rules: PageSize 1 to 100 with the Smithy validation messages, an empty
NextToken refused with its Smithy message before the tenant or resource is
looked up, an unreadable token answered "Invalid Next Token", tenants listed
by name, a tenant's resources by ARN and a resource's tenants in association
order. ListImportJobs could not be probed and is modelled on the tenant lists,
keeping Floci's oldest-first order. Without a PageSize all four lists serve up
to 100, a Floci assumption where nothing could be measured.
* fix(ses): follow the probed order, aggregation and token binding on the tenant lists
A second probe of real SES showed three differences on ListTenantResources and
ListResourceTenants: the tenant or resource is looked up, and the filter
checked, before the page size and token; a page size outside the bound and an
empty NextToken are reported together in one validation message; and a token
is refused once the tenant, resource or filter changes. ListImportJobs, which
cannot be probed, follows the same rules. The service docs keep the per-list
paging detail and gain a paragraph for these four lists.
* feat(ses): paginate the identity, configuration set and custom verification template lists
Move paging into the SES services, so each resource's cursor lives with its
list and the v1 and v2 operations of the same resource share it. Page
ListIdentities/ListEmailIdentities, ListConfigurationSets (v1 and v2) and
ListCustomVerificationEmailTemplates (v1 and v2) with the probed defaults,
bounds and messages: identities default to 25 on v2, configuration sets and
custom verification templates to 50, and a v1 page size outside the bound is
served the probed size instead of refused.
* fix(ses): refuse a list token replayed in another region
A list token carried only the resource kind and the cursor, so the same list
in another region read it as a position and could answer an empty last page.
Real SES refuses such a token with the operation's unreadable-token error
(probed on the identity and configuration-set lists), so the token namespace
now includes the region. The v1 and v2 lists of one resource still share
tokens within a region.
SES v1 is a Query API, so IAM enforcement resolves its action from the
request's Action like any other. SES v2 is REST-JSON under /v2/email and
IamActionRegistry had no rules for it, so every v2 call resolved to no action,
which the enforcement filter lets through: with enforcement on, the whole v2
API was unguarded, CreateConfigurationSetEventDestination included.
IamActionRegistry now has one rule per operation in the SES v2 model
(botocore sesv2/2019-09-27, 112 operations), each mapped to the IAM action
AWS's service reference lists for it
(servicereference.us-east-1.amazonaws.com/v1/ses/ses.json). That is always
ses:<Operation>, in the ses namespace v1 and v2 share. SendEmail has no entry
there; the Service Authorization Reference's SES v2 page defines ses:SendEmail
as v2's only send action whatever the content (ses:SendRawEmail is a v1
action), so it takes its name too. No two rules can match the
same path, so their order does not matter. The 20 operations Floci does not
serve yet are mapped too, so a route added later is guarded from the start.
Two ways round a rule are closed for every REST service, not only SES v2.
IamActionRegistry.resolve read X-Amz-Target before the path rules, so a REST
request carrying one was checked as whatever operation the header named: a
POST /v2/email/outbound-emails with X-Amz-Target: SES.GetAccount went through
for a caller denied ses:SendEmail. REST-claimed requests now resolve through a
new resolveRoute, from method and path alone. And the rules matched the
decoded path while the router matches the encoded one, so a%2Fb@example.com
reached the suppressed-destination endpoint while its decoded path matched no
rule and passed as an unknown action. resolveRoute matches the path still
percent-encoded, read from the request URI since RESTEasy Reactive does not
serve UriInfo.getPath(false).
A denied call answers AccessDeniedException with HTTP 403, as the SES v2 API
Reference lists among its common errors. Like v1, v2 is evaluated with
resource "*"; resource ARNs for SES, and the extra actions the service
reference lists for some operations (ses:TagResource on the create operations,
iam:PassRole for event destinations), are left for later and documented in
docs/services/ses.md.
IamActionRegistryTest checks every operation against a table generated from
the model and the service reference, not from the rule table.
SesV2IamEnforcementIntegrationTest shows a caller without SES permissions
refused, a single allowed action granting only that operation, a target header
not changing the checked action, and an encoded slash still authorized.
* fix(s3): align generated presigned URLs with SigV4 and request region
* fix(s3): refresh presign credentials after storage reset
* fix(s3): retire expired generated presign sessions
* fix(iam): sweep expired sessions by stored key
* fix(s3): scope generated presign credentials
* fix(s3): authorize conditional generated URLs and slash keys
* test(s3): preserve signed URL semantics in tagging and SES regressions
* fix(s3): reject tag injection on scoped generated PUT URLs
* style(s3): alphabetize presigner Java imports
* fix(s3): deny scoped requests without a raw HTTP path
* fix(s3): authorize proxied presigned URLs by signed path
* fix(s3): use signed path for proxied object requests
* style(s3): order presigned URL test imports
* feat(ses): paginate template lists and align ListExportJobs paging
Add a namespaced Pagination.paginate overload and SesListPaging, which
holds the probed per-operation page-size bounds, default page sizes,
error messages and empty-token handling. ListTemplates (v1) and
ListEmailTemplates (v2) now page newest first and share one token
namespace, so a token from either continues the other. Without a page
size the template lists serve 10, as SES does. ListExportJobs refuses a
PageSize above 100 instead of clamping it, returns a null NextToken on
the last page, and uses SES's own error messages.
* refactor(ses): inject the template service clock and drop the paging test sleeps
* test(ses): tick the clock between template create and update
* feat(ses): add v2 export jobs
CreateExportJob, GetExportJob, ListExportJobs and CancelExportJob render the
per-recipient timelines already stored at send time as CSV or JSON, through
the same aggregation BatchGetMetricData serves, so an export and a query of
one window cannot disagree.
Real SES writes the file into a bucket it owns and refuses a caller-chosen
S3Url, so Floci does the same and writes into its own S3 emulation, which is
what the presigned URL on a finished job resolves against.
The VDM gate answers BadRequestException here where message insights and
metric data answer NotFoundException, so SesAccountService takes the caller's
error shape and keeps one copy of the probed sentence.
* fix(ses): use the published concurrent-export quota and prove the reset test parks
* fix(ses): scope the export bucket per account and fix two row-count bugs
* fix(ses): make the reset drain test deterministic and document the presigner limit
* test(ses): assert the reset thread finished, since join returns on timeout too
Aggregates the per-recipient timelines already stored at send time, so the
batch metrics and GetMessageInsights cannot disagree about what a send
produced. Buckets are whole UTC days, the series is sparse rather than zero
filled, the end of the range is exclusive, and counting is per recipient.
SentEmail gains the configuration set the send resolved to, which the
CONFIGURATION_SET dimension filters on. The VDM gate moves into a shared
SesVdmGate so the two gated operations keep one copy of the probed message.
Metrics that need a real mailbox to act stay empty, as does TRANSIENT_BOUNCE,
since every bounce Floci derives is permanent.
* feat(ses): add v2 GetMessageInsights
Serves the per-recipient event timeline for a sent message. The timeline is
derived at send time from the events SesRecipientEvents classifies for the
send, the same classification that drives configuration-set event publishing
and identity notifications, then stored on the SentEmail record, so the read
path is a plain lookup and no new event store is needed. SentEmail also gains
the EmailTags the operation returns, and a raw send now stores its parsed MIME
subject, when present, as a simple send does.
Insights additionally report DELIVERY for an ordinary recipient so a plain
send does not look stuck at SEND; a suppressed recipient never gets DELIVERY,
since it is dropped before the relay, and a message the content scan rejected
ends every recipient's timeline at REJECT. What gets published is unchanged.
Probed against real SES in us-east-1: the operation is gated on Virtual
Deliverability Manager and reports that before it looks at the message id, a
missing message names the account alongside the id, Isp carries the literal
UNKNOWN_ISP when the provider cannot be identified, BounceType is the
upper-case enum member, and an account-suppressed recipient is reported with
BounceSubType ON_ACCOUNT_SUPPRESSION_LIST and SES's own suppression text as
the diagnostic, the upper snake spelling this operation uses where the
published events say OnAccountSuppressionList. Floci deliberately records the
mailbox-simulator sends and the multi-recipient mail that VDM drops, because
dropping both would leave insights permanently empty, and returns one entry
per envelope recipient where an AWS response carries at most one.
* test(ses): pin the message-insights VDM gate to one account
The gate reads the account VDM attributes, which are account-scoped like
every other SES store, but no test said so: the isolation test enables VDM
for both of its accounts. An account that never enabled it now has to meet
the gate while others in the same region are past it.
* feat(ses): report a content-rejected raw send in message insights
The raw send path classified its recipients with a hardcoded false, because
the content scan did not exist on this branch's base. It does now, so the
real scan result reaches the timeline: a rejected raw send reports SEND then
REJECT instead of a delivery it never had.
Its stored tags follow the same rule the published events already use, the
request's own tags only, so tags read off a refused message's headers cannot
resurface through GetMessageInsights.
* feat(ses): scan raw sends for the EICAR test file and keep it out of the mailbox store
The content scan now covers raw sends: the wire bytes are searched for the
plain and the base64-encoded signature before parsing, so a message the
lenient MIME parser cannot walk is still caught, and the parsed message is
walked part by part, decoding attachments, descending into forwarded
messages and decoding RFC 2047 header words. A candidate found on the wire
is confirmed by decoding the run around it, so a base64 near-miss of the
signature is not rejected.
A rejected record keeps only its source, its envelope and RejectReason;
subject, headers, reply-to addresses, bodies and raw data are dropped, and
the inspection endpoint lists it in neither the Simple nor the raw shape, so
the signature never reaches the mailbox store on disk. A MIME parse failure
logs the exception class only, since the message text could echo content.
* test(ses): pin that a rejected raw send publishes no parsed subject
The raw rejection test checked the header block and the recipient lists but
read commonHeaders only for the recipients, so a subject leaking back into
the event would have gone unnoticed.
* fix(ses): publish a Bounce for suppressionlist@simulator and split events by cause
suppressionlist@simulator.amazonses.com published a Reject event. Real SES
publishes a hard Bounce for it: bounceType Permanent, bounceSubType General,
and a diagnostic that names the suppression. Reject is the outcome of the
content scan, which the simulator has no address for. Verified against SES
in us-east-1 on 2026-09-21 through an SNS event destination.
The same probe confirmed that a recipient on the account-level suppression
list bounces with bounceSubType OnAccountSuppressionList, or is complained
about with complaintSubType OnAccountSuppressionList, and that SES publishes
one event per cause: a message reaching both bounce@simulator and a
suppressed address produces two Bounce events, each listing only its own
recipients. Floci merged them into one General bounce.
One classifier, SesRecipientEvents, now decides the events a send produces
per recipient, and the publisher and identity notifications consume its
output, so the simulator and suppression semantics have a single home.
complaint@simulator now publishes Delivery before Complaint, as the
simulator documents, a list-management opt-out bounces under its own cause,
every bounce and complaint block carries its own feedbackId, and complaints
carry arrivalDate.
Reject stays reachable the way AWS documents it: a Simple send carrying the
EICAR test file in its subject, a header or a text body is accepted and then
rejected with reason "Bad content" and not relayed. The signature is
assembled from fragments at runtime and never appears in source. Scanning
raw MIME and keeping the signature out of the mailbox store follow
separately.
* fix(ses): drop the content of a rejected record
A send the content scan rejected was still recorded in full, so its subject,
body and headers reached the sent-email store, the inspection endpoint and,
with persistence on, the disk. The record now keeps only its source, its
envelope and RejectReason, and the inspection endpoint shows the reason.
* fix(ses): keep the scanned content out of a rejected message's events
The Send and Reject events of a rejected message carried the subject and
the additional headers in their mail block, so with headers enabled a
subject carrying the test string reached every event destination and, with
persistence on, the disk. Both events now carry the envelope but no subject
and no headers, a small deviation from SES that keeps the string off disk
entirely; the docs say so.
* feat(ses): add v2 import jobs for the suppression list and contact lists
Implements CreateImportJob, GetImportJob and ListImportJobs. A job reads a
CSV or newline-delimited JSON object from the local S3 emulation and applies
each record through the existing suppression-list and contact services, so
the imported rows land in their stores and only the job record is new.
The job is returned as CREATED and runs on a virtual thread under the request
account, moving to PROCESSING and then COMPLETED or FAILED, as on AWS. Records
that fail validation are counted in FailedRecordsCount while the job still
completes; a missing bucket or object, a contact-list CSV without an
emailAddress header, or a contact list deleted before the worker runs fail
the job with FailureInfo.ErrorMessage. At most 20 jobs per region may be in
progress, and jobs interrupted by a restart are marked FAILED on startup.
* fix(ses): accept the guide's unquoted contact row and match AWS's import not-found message
A quote that does not open a CSV field is data rather than an error: the SES
list-management guide writes attributesData unquoted as {"Name": "John"}, so
rejecting it refused the documented format. Garbage after a closing quote is
still a failed record, since that row cannot be read back unambiguously.
An import job for an unknown contact list answers NotFoundException with its
own wording, "ContactList <name> doesn't exist", which differs from the
contact-list APIs. Probed against real SES: the check is synchronous and the
error is NotFoundException, even though the service model lists only
BadRequestException, LimitExceededException and TooManyRequestsException for
CreateImportJob. The contact service keeps its own message.
Also drops five unused imports and a dead stripBom that held the only literal
BOM character in the reader sources.
* feat(ses): preserve raw messages, envelope sender, and X-SES headers in SMTP relay
The raw relay reparsed each MIME message and rebuilt it from the text and
HTML parts alone, dropping every attachment and custom header. It now walks
the Mime4j tree and maps it onto the outgoing message: the first text/plain
and text/html parts become the body, every other leaf becomes an attachment
(inline when it carries a Content-ID, so cid: references still resolve), an
embedded message/rfc822 part is relayed whole, and display names on addresses
survive. Top-level headers are copied through apart from the MIME structural
ones, which the encoder regenerates for the re-built message.
Wire the envelope sender through to MAIL FROM, resolved in AWS's order: the
Return-Path MIME header, then the ReturnPath request field (v1) or
FeedbackForwardingEmailAddress (v2), then the source. The resolved value is
recorded on SentEmail so the inspection endpoint shows it.
Stamp relayed messages with <{MessageId}@{region}.amazonses.com>, matching the
MessageId returned to the caller, leaving a caller-supplied Message-ID alone.
Honour the X-SES-CONFIGURATION-SET and X-SES-MESSAGE-TAGS control headers on
raw sends, which previously parsed to nothing and left event publishing
silently inert for callers using the header form. Both are stripped from the
relayed message, as AWS consumes rather than forwards them. The tenant send
gate sees the same resolved configuration set, so one named only by header
cannot slip past the association check.
Fix tryBase64Decode, which decoded every raw message with the MIME decoder and
only fell back to plain text when it threw. That decoder skips characters
outside the base64 alphabet rather than rejecting them, so a plain-text RFC
5322 message decoded into garbage whenever the surviving alphabet characters
happened to form a valid length, wiping its headers. The alphabet is now
checked before decoding.
Replace the nine-argument SmtpRelay.relay with a RelayMessage record, and add
a ServerSocket-based SMTP test that drives a real MailClient end to end and
asserts on the negotiated envelope and the bytes on the wire, covering the
authentication and STARTTLS-OPTIONAL configuration branches.
* fix(ses): align SMTP relay with documented AWS header and tag semantics
Verified the relay against the SES documentation and corrected four
deviations.
AWS overrides a caller-supplied Message-ID with the id it assigned, and
rejects Message-ID outright as a custom header on Simple and Templated
content (SES header fields reference). The relay preserved a caller's value
instead; it now always stamps the id returned by the API.
AWS likewise overrides a caller-supplied Date with the time it accepted the
message. The relay copied the caller's Date through, so a stale timestamp
reached the recipient. Date is now regenerated with the rest of the headers
SES sets.
AWS uses only the request field's message tags when tags are supplied both
as a request field and as an X-SES-MESSAGE-TAGS header, and explicitly does
not join the two sets. The relay merged them, letting a header-only tag
survive a request that supplied its own. Header tags now apply only when the
request passes none.
The stamped Message-ID domain was region-scoped, which no AWS documentation
or observed output supports. Use the observed email.amazonses.com instead,
and record in the docs that only the local part, which is the returned
MessageId, is documented behaviour.
Also document that AWS delivers a Return-Path differing from the one
supplied, because it routes bounces through its own address, whereas Floci
has no bounce pipeline and puts the resolved address directly in MAIL FROM.
* fix(ses): align mime4j artifacts to unbreak the native build
The raw relay's new DefaultMessageWriter path failed GraalVM analysis with
an unresolved reference to Field.getSafeRaw(). apache-mime4j-dom was pinned
to 0.8.14 while the Quarkus BOM manages apache-mime4j-core at 0.8.12, so the
writer was compiled against a Field API the resolved core does not declare.
Nothing reached the writer before this branch, which is why the skew only
surfaced now, and only in native builds.
Drop the hardcoded -dom version so both artifacts track the BOM together,
and cover the embedded message/rfc822 branch that exercises the writer.
Add the remaining SES v2 dedicated-IP operations on top of pool management:
GetDedicatedIps, GetDedicatedIp, PutDedicatedIpInPool,
PutDedicatedIpWarmupAttributes, PutDedicatedIpPoolScalingAttributes, and
PutAccountDedicatedIpWarmupAttributes.
SES has no API to create a dedicated IP (they are leased out-of-band or
auto-provisioned), so Floci models an account with no dedicated IPs:
GetDedicatedIps is empty and any IP-targeted operation returns NotFoundException
'Could not find dedicated IP <ip> under this account.', matching real AWS for an
account with no leased IPs (verified 2026-06-21). PutDedicatedIpPoolScalingAttributes
updates the pool's scaling mode, and PutAccountDedicatedIpWarmupAttributes stores
the account-level flag now reflected by GetAccount.
Add integration and AWS SDK v2 compatibility tests.
* feat(ses): implement v1 ReorderReceiptRuleSet and CloneReceiptRuleSet
Completes the SES v1 receipt management surface with the two remaining
rule-set actions, both reproducing wire behavior probed against real AWS
(us-east-1, 2026-09).
ReorderReceiptRuleSet demands an exact permutation of the set's rules,
with the probed error precedence: rule-set existence first, then a
duplicate request name (InvalidParameterValue "Multiple positions found
for rule", even when the duplicated name is not in the set), then set
rules absent from the request (listed in set order), then request names
not in the set (RuleDoesNotExist, first in request order). RuleNames
members validate at the Smithy layer under the bare 'ruleNames' path
with a nested list-member constraint whose length cap is 100; there is
no service-level "Not a valid ruleName" stage, so a 65-char name lands
on RuleDoesNotExist. A failed reorder leaves the order unchanged.
CloneReceiptRuleSet deep-copies the source's rules under a new creation
timestamp; the active flag stays behind. Name validation is two-layer
for both members: the Smithy pattern combines violations with
originalRuleSetName listed first, and the service-level 64-char check
reports the target before the source. An existing target wins over a
missing source (AlreadyExists before RuleSetDoesNotExist).
Covered by unit tests, Query-protocol integration tests, and AWS SDK
compatibility tests run against a live local instance.
* fix(ses): parse ReorderReceiptRuleSet RuleNames with the probed AWS index grammar
Review flagged that a sparse Query list (RuleNames.member.1 plus member.3)
was silently truncated at the first missing index. Probing real SES with
raw signed Query requests showed the string-list grammar differs from the
receipt-action struct-list grammar: a gap is padded with empty members
(which then fail the ruleNames Smithy constraint, so nothing is ever
truncated) up to a skip of 10, counted from the previous index or from 1
for a leading gap; a larger gap is MalformedInput "Excessively sparse
input would skip N list elements" with a comma-grouped count; an index
above 214748369 (exact boundary, found by bisection) is MalformedInput
"Index N is illegal"; index 0, a leading-zero spelling, and a non-numeric
token are each their own probed MalformedInput; and a repeated index
keeps its first value.
The same probing showed the ruleNames Smithy violation carries no member
index and appears at most once however many members are malformed, so the
service now emits it once instead of per member.
Covered by wire-level integration tests for each grammar case and a unit
test for the single-violation behavior.
Adds the three v1 receipt-filter actions as a stored-but-inert IP filter
store alongside the receipt-rule-set domain: filters round-trip through the
management API but never filter an inbound connection, since Floci accepts
none.
Validation follows real AWS as probed: the filter name is a single
service-level layer (no Smithy pattern, unlike rule and rule-set names) with
"Not a valid filterName" for every malformed shape and its own message for
an empty name; IpFilter members are Smithy-enforced (not-null paths and the
[Allow, Block] policy enum); the Cidr member accepts a single IPv4 or IPv6
address or an in-range CIDR block and rejects everything else with
"Invalid CIDR block"; duplicates are AlreadyExists with the original kept;
deletes are idempotent with only an absent FilterName rejected; and the
101st filter in a region is rejected with LimitExceeded "Too many filters".
List responses are name-sorted for determinism since the probe could not
pin the wire ordering.
Covered by unit tests, Query-protocol integration tests, an AWS SDK
compatibility test, and Terraform/OpenTofu compat coverage for
aws_ses_receipt_filter.
* feat(ses): implement v1 receipt rules with locally validated action targets
Adds the five v1 receipt-rule actions (CreateReceiptRule, DescribeReceiptRule,
UpdateReceiptRule, DeleteReceiptRule, SetReceiptRulePosition) on top of the
stored-but-inert receipt-rule-set domain. Rules route no mail, but ordering
semantics follow real AWS as probed: a rule created without After is inserted
at the front, SetReceiptRulePosition without After moves a rule to the front,
update replaces the whole rule in place, and rule delete is idempotent while
rule-set delete cascades.
Action targets are validated against the local emulator the way real SES
validates them against the account: any TopicArn must be an existing SNS
topic, an S3 BucketName an existing bucket, a Lambda FunctionArn an existing
function, and a BounceAction Sender a verified identity, using the probed
error codes (InvalidSnsTopic, InvalidS3Configuration, InvalidLambdaFunction,
InvalidParameterValue). Smithy-layer validation reproduces the probed member
paths and combined violation messages; only the members real SES enforces are
required (S3 BucketName, SNS TopicArn, and Stop Scope may be absent).
Covered by unit tests with mocked resource services, Query-protocol
integration tests, an AWS SDK compatibility test, and Terraform/OpenTofu
compat coverage for aws_ses_receipt_rule.
* fix(ses): match probed AWS semantics for action-list gaps and present-struct required members
Probing triggered by the upstream review corrected two earlier conclusions.
A gap in the action list (an empty struct serializes to no Query keys) is
not compacted by AWS: the gap is padded into an empty action slot and
rejected with InvalidParameterValue "Exactly one action type must be
specified for each ReceiptAction", with Smithy paths keeping the wire
index. member.0 is rejected outright with MalformedInput
"0 is not a valid index".
The earlier "optional" verdict for S3Action.BucketName, SNSAction.TopicArn,
and StopAction.Scope was an artifact of empty structs never reaching the
wire: once an action carries any member, the type's required members are
enforced as Smithy violations. BounceAction violations are reported in the
probed smtpReplyCode, sender, message order, and SNSAction reports a bad
Encoding enum before the missing TopicArn.
* fix(ses): honor original receipt-action index spellings and require stop actions last
Probing the leading-zero report pinned AWS's index semantics exactly: index
tokens are grouped by numeric value, ordered by length then lexicographically,
and the i-th token must parse to i, or the padded empty slot is rejected with
the exactly-one-action-type error. member.01 alone is therefore a valid slot 1
whose action must be parsed under its original spelling instead of a rebuilt
canonical one, while mixed spellings such as member.01 plus member.2 are
rejected because the one-digit token sorts first.
The same probes surfaced an unrelated service-level rule now reproduced too:
a stop action anywhere but the last position is rejected with
"Stop action, if any, must be placed at the end of the actions list".
* chore(ses): log best-effort compat-test cleanup failures with resource context
The three cleanup catches in the receipt-rule compatibility suite swallowed
failures silently. They now report the failed step and resource on stderr,
the form the other suites in this module already use, so leaked test
resources stay diagnosable.
* chore(lambda): log functionExists resolution failures at debug level
The catch converts a resolution failure into the predicate's negative
answer; the debug line keeps a surprising false diagnosable (which
reference was rejected, and why) without turning ordinary existence
misses on a query path into log noise.
* fix(ses): restrict receipt-action index tokens to ASCII digits
Character.isDigit also accepts non-ASCII Unicode digits, so a key such as
Rule.Actions.member.<fullwidth 1> parsed as a real index. No AWS Query
index grammar recognizes those spellings; the key is now skipped like any
other unmodeled parameter, pinned by an integration test.
---------
Co-authored-by: Priamo <pgermosen@gmail.com>
* feat(ses): support tag operations on tenant ARNs
* fix(ses): shield the stored tenant record from tag-callback mutation
* test(ses): cover the cross-region guard for tenant TagResource/UntagResource
* docs(ses): drop em dashes from the tenant tag additions
PutConfigurationSetDeliveryOptions already persisted the TLS policy — v2
GetConfigurationSet returned it correctly — but the v1 projection never
read it back, omitting the DeliveryOptions member even when deliveryOptions
was named in ConfigurationSetAttributeNames.
The Terraform provider reads aws_ses_configuration_set through the v1
DescribeConfigurationSet, so the missing member made every plan re-add a
delivery_options block that apply never converged.
The two APIs spell the enum differently and the write path already
normalises v1 Require/Optional to the stored REQUIRE/OPTIONAL; the read
path converts back, so each API answers in its own casing.
* feat(ses): support v2 tenant-scoped sending with association gate
* fix(ses): guard tenantForSending against a null TenantName and pin the raw-test charset
* fix(ses): validate an inline bulk template before the tenant gate
* feat(ses): support v2 tenant suppression attributes and tenant-scoped suppression list
* fix(ses): guard runWithTenant against a null TenantName
* fix(ses): collapse an absent TenantName to the service-level message on tenant suppression ops
* fix(ses): collapse an absent TenantName to the service-level message on the remaining tenant ops
* fix(ses): collapse an empty TenantName to the service-level message on GetTenant/DeleteTenant
* feat(ses): support v2 tenant CRUD (CreateTenant/GetTenant/ListTenants/DeleteTenant)
Add the first phase of SES v2 multi-tenancy: tenant create/get/list/delete via the
RPC-style POST routes under /v2/email/tenants. A new SesTenantService owns the tenant
store, id/ARN generation (tn-<hex>, arn:aws:ses:<region>:<account>:tenant/<name>/<id>),
the ENABLED sending status, and the TenantName validation (1-64 chars [A-Za-z0-9_-],
duplicate -> AlreadyExistsException, unknown -> NotFoundException); the facade delegates
and the controller only parses/renders. Resource associations, tenant suppression, and
tenant-scoped sending are follow-ups.
* docs(ses): correct account-scoping description in SesTenantService Javadoc
* feat(ses): extend tag endpoints to contact lists, custom verification email templates, and dedicated IP pools
* feat(ses): accept inline Tags on v2 CreateCustomVerificationEmailTemplate
* fix(ses): match probed AWS behavior for empty Tags/TagKeys and avoid tag-list aliasing
* docs(ses): describe the actual ValidationException wire body
* fix(ses): reject non-string tag members with SerializationException
SesController.parseTagsArray coerced tag Key/Value via asText(null), so a
non-string member (number, boolean, object, array) was silently turned
into a string (123 -> "123") and accepted, across all five SES tag entry
points that share the method (CreateEmailIdentity, CreateConfigurationSet,
CreateEmailTemplate, CreateContactList, TagResource).
AWS's restJson1 deserializer rejects a non-string tag member with
SerializationException / 400 (probe-confirmed). parseTagsArray now rejects
a present-but-non-string Key/Value the same way, leaving missing/null
members to the downstream service validation.
* fix(ses): reject non-object tag list elements with SerializationException
parseTagsArray validated Key/Value types but not that each Tags element is
a JSON object, so a scalar/array/null element fell through to service-layer
validation. Reject a non-object element with SerializationException,
matching AWS's restJson1 deserializer (AWS returns 500 for a null element,
a server-side bug, normalized to the same 400).