Files
floci/src/main/java
mrfelek c769ce055a fix(elasticache): scope Describe listings to the request Region (#7946)
Replication groups, cache clusters, users and user groups are stored per
account, and DescribeReplicationGroups, DescribeCacheClusters,
DescribeUsers and DescribeUserGroups returned the account's resources from
every Region. On AWS these resources are Regional, so a listing only shows
the requesting Region's.

The listings, and their single-ID filters, now keep only resources whose ARN
names the request's Region. The getters stay unscoped: credential lookups,
restore and validation call them outside a request.

DescribeCacheClusters also lists standalone Redis/Valkey and Memcached cache clusters, which the Region filter on replication-group members did not cover: they were listed, and found by CacheClusterId, from every Region of the account. The handler now keeps only the request Region's, and answers CacheClusterNotFound for an id that names one in another Region.

ElastiCacheRegionScopingIntegrationTest now covers users, user groups, replication groups and their member clusters, and standalone Redis and Memcached clusters: each is listed and found by its id only from its own Region and account, not from another Region of the account or the same Region of another account.

Floci seeds the built-in default user once per account, with the ARN of the Region of the first request, so Region scoping left it out of DescribeUsers everywhere else and UserId=default answered UserNotFound. AWS has a default user in every Region: it is now listed and found in each, with that Region's ARN. RequestRegionArnIntegrationTest expects a user to be found only in its own Region. The handler reuses the service's Region check, and the Region test sends its requests through a Region overload of QueryRequests.request and checks Docker with DockerAvailability.

A user's UserGroupIds came from every Region's user groups, so once a
user group holding the built-in default user was created in one Region,
DescribeUsers in another listed default as a member of a group that
DescribeUserGroups there does not know. Its groups are now the request
Region's, as DescribeUserGroups lists them.
2026-11-11 13:43:08 -04:00
..