mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
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:
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 ────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Every SES v2 operation: a sample of its path from the SES v2 model (botocore 1.43.62,
|
||||
# sesv2/2019-09-27) and the IAM action AWS's service reference lists for it
|
||||
# (https://servicereference.us-east-1.amazonaws.com/v1/ses/ses.json, read 2026-09-30).
|
||||
# Every SES v2 operation: a sample of its path from the SES v2 model (botocore develop at
|
||||
# 9931e9741, 2026-09-29, sesv2/2019-09-27) and the IAM action AWS's service reference lists for it
|
||||
# (https://servicereference.us-east-1.amazonaws.com/v1/ses/ses.json, read 2026-10-01).
|
||||
# ListConfigurationSets and ListEmailIdentities also keep the GET routes earlier models gave them.
|
||||
# SendEmail has no entry there; the Service Authorization Reference's SES v2 page defines
|
||||
# ses:SendEmail as v2's only send action (ses:SendRawEmail belongs to v1).
|
||||
GetAccount,GET,/v2/email/account,ses:GetAccount
|
||||
@@ -75,11 +76,16 @@ GetEmailIdentityPolicies,GET,/v2/email/identities/sample-emailidentity/policies,
|
||||
DeleteEmailIdentityPolicy,DELETE,/v2/email/identities/sample-emailidentity/policies/sample-policyname,ses:DeleteEmailIdentityPolicy
|
||||
CreateEmailIdentityPolicy,POST,/v2/email/identities/sample-emailidentity/policies/sample-policyname,ses:CreateEmailIdentityPolicy
|
||||
UpdateEmailIdentityPolicy,PUT,/v2/email/identities/sample-emailidentity/policies/sample-policyname,ses:UpdateEmailIdentityPolicy
|
||||
AssociateEmailIdentityCertificate,POST,/v2/email/identity/certificates,ses:AssociateEmailIdentityCertificate
|
||||
DisassociateEmailIdentityCertificate,POST,/v2/email/identity/certificates/delete,ses:DisassociateEmailIdentityCertificate
|
||||
ListEmailIdentityCertificates,POST,/v2/email/identity/certificates/list,ses:ListEmailIdentityCertificates
|
||||
CreateImportJob,POST,/v2/email/import-jobs,ses:CreateImportJob
|
||||
ListImportJobs,POST,/v2/email/import-jobs/list,ses:ListImportJobs
|
||||
GetImportJob,GET,/v2/email/import-jobs/sample-jobid,ses:GetImportJob
|
||||
GetMessageInsights,GET,/v2/email/insights/sample-messageid/,ses:GetMessageInsights
|
||||
ListConfigurationSets,POST,/v2/email/list-configuration-sets,ses:ListConfigurationSets
|
||||
ListExportJobs,POST,/v2/email/list-export-jobs,ses:ListExportJobs
|
||||
ListEmailIdentities,POST,/v2/email/list-identities,ses:ListEmailIdentities
|
||||
BatchGetMetricData,POST,/v2/email/metrics/batch,ses:BatchGetMetricData
|
||||
ListMultiRegionEndpoints,GET,/v2/email/multi-region-endpoints,ses:ListMultiRegionEndpoints
|
||||
CreateMultiRegionEndpoint,POST,/v2/email/multi-region-endpoints,ses:CreateMultiRegionEndpoint
|
||||
@@ -114,4 +120,5 @@ ListTenants,POST,/v2/email/tenants/list,ses:ListTenants
|
||||
CreateTenantResourceAssociation,POST,/v2/email/tenants/resources,ses:CreateTenantResourceAssociation
|
||||
DeleteTenantResourceAssociation,POST,/v2/email/tenants/resources/delete,ses:DeleteTenantResourceAssociation
|
||||
ListTenantResources,POST,/v2/email/tenants/resources/list,ses:ListTenantResources
|
||||
UpdateConfigurationSet,POST,/v2/email/update-configuration-sets,ses:UpdateConfigurationSet
|
||||
ListRecommendations,POST,/v2/email/vdm/recommendations,ses:ListRecommendations
|
||||
|
Reference in new issue
Block a user