fix(ses): authorize the SES v2 operations and routes botocore added since the rule table (#4811)

Follow-up from the review of #4775.

The SES v2 rules in IamActionRegistry came from botocore 1.43.62's model. The
current model (botocore develop at 9931e9741, 2026-09-29) adds four operations,
AssociateEmailIdentityCertificate, DisassociateEmailIdentityCertificate,
ListEmailIdentityCertificates and UpdateConfigurationSet, and moves two:
ListConfigurationSets is now POST /v2/email/list-configuration-sets and
ListEmailIdentities POST /v2/email/list-identities, each taking a Filter in
the body, where they were GET /v2/email/configuration-sets and
GET /v2/email/identities. Each new route gets its rule, mapped to the action
AWS's service reference lists for it (ses:<Operation> in every case). The two
GET routes keep theirs, since older SDKs, and Floci's own routes, still use
them. 118 routes in all; no two can match the same path.

Floci serves none of the new routes yet, so nothing was exposed; the rules make
sure they are authorized from the day a route lands. The test table is
regenerated from the current model and the service reference; its six new rows
fail without the new rules.
This commit is contained in:
Priamo Germosen authored and GitHub committed 2026-10-01 07:50:31 -05:00
1 parent cf04f433b6
commit 8fdf23d303
2 files changed
+18 -3

No files matched your search

@@ -92,6 +92,8 @@ public class IamActionRegistry {
// ses:<Operation>, in the ses namespace SES v2 shares with v1. 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 belongs to v1), so it takes its name too.
// ListConfigurationSets and ListEmailIdentities keep their GET routes next to the POST ones
// the model moved them to, since older SDKs, and Floci's own routes, still use them.
rule("ses", "GET", "^/v2/email/account/?$", "ses:GetAccount"),
rule("ses", "PUT", "^/v2/email/account/dedicated-ips/warmup/?$", "ses:PutAccountDedicatedIpWarmupAttributes"),
rule("ses", "POST", "^/v2/email/account/details/?$", "ses:PutAccountDetails"),
@@ -164,11 +166,16 @@ public class IamActionRegistry {
rule("ses", "DELETE","^/v2/email/identities/[^/]+/policies/[^/]+/?$", "ses:DeleteEmailIdentityPolicy"),
rule("ses", "POST", "^/v2/email/identities/[^/]+/policies/[^/]+/?$", "ses:CreateEmailIdentityPolicy"),
rule("ses", "PUT", "^/v2/email/identities/[^/]+/policies/[^/]+/?$", "ses:UpdateEmailIdentityPolicy"),
rule("ses", "POST", "^/v2/email/identity/certificates/?$", "ses:AssociateEmailIdentityCertificate"),
rule("ses", "POST", "^/v2/email/identity/certificates/delete/?$", "ses:DisassociateEmailIdentityCertificate"),
rule("ses", "POST", "^/v2/email/identity/certificates/list/?$", "ses:ListEmailIdentityCertificates"),
rule("ses", "POST", "^/v2/email/import-jobs/?$", "ses:CreateImportJob"),
rule("ses", "POST", "^/v2/email/import-jobs/list/?$", "ses:ListImportJobs"),
rule("ses", "GET", "^/v2/email/import-jobs/[^/]+/?$", "ses:GetImportJob"),
rule("ses", "GET", "^/v2/email/insights/[^/]+/?$", "ses:GetMessageInsights"),
rule("ses", "POST", "^/v2/email/list-configuration-sets/?$", "ses:ListConfigurationSets"),
rule("ses", "POST", "^/v2/email/list-export-jobs/?$", "ses:ListExportJobs"),
rule("ses", "POST", "^/v2/email/list-identities/?$", "ses:ListEmailIdentities"),
rule("ses", "POST", "^/v2/email/metrics/batch/?$", "ses:BatchGetMetricData"),
rule("ses", "GET", "^/v2/email/multi-region-endpoints/?$", "ses:ListMultiRegionEndpoints"),
rule("ses", "POST", "^/v2/email/multi-region-endpoints/?$", "ses:CreateMultiRegionEndpoint"),
@@ -203,6 +210,7 @@ public class IamActionRegistry {
rule("ses", "POST", "^/v2/email/tenants/resources/?$", "ses:CreateTenantResourceAssociation"),
rule("ses", "POST", "^/v2/email/tenants/resources/delete/?$", "ses:DeleteTenantResourceAssociation"),
rule("ses", "POST", "^/v2/email/tenants/resources/list/?$", "ses:ListTenantResources"),
rule("ses", "POST", "^/v2/email/update-configuration-sets/?$", "ses:UpdateConfigurationSet"),
rule("ses", "POST", "^/v2/email/vdm/recommendations/?$", "ses:ListRecommendations"),
// ── Kinesis ────────────────────────────────────────────────────────────