Repository navigation
Description
Service
IAM enforcement, for the calls of no resource type of OpenSearch, S3 Tables, Amazon Managed Service for Prometheus, EMR Serverless and others (see the table)
AWS API Action
ListDomainNames, ListTableBuckets, ListWorkspaces, CreateWorkspace, ListApplications, ... (the operations the Service Authorization Reference gives no resource type)
Expected behavior
AWS doesn't check every call of no resource type on *. Many services check one on a resource of their own, named in the denial, and match a policy's Resource against it as against any other. Measured on AWS (us-east-1, 2026-11-19), as a role without permissions, then with one statement allowing only the action on one resource:
| Call | Checked on (the denial's "on resource") | A policy on... |
|---|---|---|
es:ListDomainNames |
arn:aws:es:<region>:<account>:domain/* |
domain/*: allowed |
s3tables:ListTableBuckets |
arn:aws:s3tables:<region>:<account>:bucket/* |
bucket/*: allowed |
eks:ListClusters |
arn:aws:eks:<region>:<account>:cluster/* |
cluster/*: allowed |
aps:ListWorkspaces (also CreateWorkspace, and the aps:TagResource of a CreateWorkspace with tags) |
arn:aws:aps:<region>:<account>:/workspaces |
that ARN: allowed; workspace/*: refused |
emr-serverless:ListApplications |
arn:aws:emr-serverless:<region>:<account>:/* |
/*: allowed; /applications/*: refused |
appsync:ListGraphqlApis |
arn:aws:appsync:<region>:<account>:* |
apis/*: refused |
s3vectors:ListVectorBuckets |
arn:aws:s3vectors:<region>:<account>:* |
|
kafka:ListClustersV2 |
arn:aws:kafka:<region>:<account>:/api/v2/clusters |
|
apigateway:GET (GetApis) |
arn:aws:apigateway:<region>::/apis |
|
servicediscovery:ListNamespaces |
arn:aws:servicediscovery:<region>:<account>:*/* |
|
sqs:ListQueues |
arn:aws:sqs:<region>:<account>: |
|
lambda:ListFunctions, batch:DescribeComputeEnvironments, iot:ListThings, ecs:ListClusters |
* |
Lambda, function:*: refused |
So a policy scoped to a service's resources, such as es:* on arn:aws:es:us-east-1:123456789012:domain/*, lets its list calls through on AWS.
Actual behavior
Floci checks every operation the generated request-resources table gives no resource on * ("types": [], "resources": [], for example es:ListDomainNames and s3tables:ListTableBuckets; 43 of OpenSearch's 121 operations), and IamPolicyEvaluator.matchesResource globs a statement's Resource against that *. A pattern such as arn:aws:es:...:domain/* doesn't match *, so the scoped policy above is refused in Floci where AWS allows it, and the denial names on resource: * where AWS names the resource it checked.
Of the calls measured above, main's table has es:ListDomainNames, s3tables:ListTableBuckets, eks:ListClusters (since #9070), emr-serverless:ListApplications, s3vectors:ListVectorBuckets, servicediscovery:ListNamespaces and sqs:ListQueues, each with no resource, and lambda:ListFunctions and ecs:ListClusters, which AWS does check on *. The others (AMP, AppSync, MSK, API Gateway, Batch, IoT) aren't in it yet; the measured resources apply to them once they are.
The other way round, a policy on * allows these calls on AWS and in Floci alike, so only scoped policies are affected.
Reproduction
From the code on main: the table entries (src/main/resources/aws/iam-request-resources.json, es:ListDomainNames, s3tables:ListTableBuckets) and IamPolicyEvaluator.matchesResource. With IAM enforcement on, a user whose only policy allows es:ListDomainNames on arn:aws:es:us-east-1:<account>:domain/* is refused aws opensearch list-domain-names.
Proposed fix
What each such call is checked on isn't in botocore or the Service Reference, which give these operations no resource type, so it is per-service AWS behaviour. The request-resources generator's MEASURED table is where such a measurement goes, as dsql:ListClusters (cluster/*) and dynamodb:ListTables (table/*) already are. Three of the calls above fit an entry as it stands, a resource type with its name left open: es:ListDomainNames on domain, s3tables:ListTableBuckets on TableBucket and eks:ListClusters on cluster, each with the denial measured above as its evidence.
The others are checked on an ARN that no resource type's format gives (aps /workspaces, emr-serverless /*, appsync and s3vectors <account>:*, servicediscovery */*, sqs <account>:, kafka /api/v2/clusters, apigateway ::/apis), which measured_resources refuses ("no ARN format in the Service Reference"), so they would need an entry that states the ARN itself. The calls AWS checks on * (Lambda, Batch, IoT, ECS) need nothing.
Environment
- Floci version / image tag: main
- How you're running Floci: from source,
IamEnforcementProfile
Activity