policy: Add iterator for listing #66

Closed
opened 2024-01-10 08:03:45 +00:00 by dkirillov · 0 comments
Member

Currently the policy contract has only listings without iterator which is restricted by 2048 items. Sometimes it isn't enough.
For example IAM service stores some one-to-many relations (1,2) rather than chain data. Also we use listing to get managed policies (there are up to 5000 such policies). So we quite easily can reach stack limit.
It would be nice to have iterator in listing method,

Describe the solution you'd like

Use iterator in ListChainsByPrefix

Describe alternatives you've considered

Accept current limits

## Is your feature request related to a problem? Please describe. Currently the `policy` contract has only [listings](https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/commit/86e6d4d334ad8162cf944626a009790d12ced679/policy/policy_contract.go#L135) without iterator which is restricted by 2048 items. Sometimes it isn't enough. For example IAM service stores some one-to-many relations ([1](https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListEntitiesForPolicy.html),[2](https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachUserPolicy.html)) rather than [chain data](https://git.frostfs.info/TrueCloudLab/policy-engine/src/commit/ed93bb5cc57465c1b9b5caa4c8e3b62cdf5357e1/pkg/chain/chain.go#L26). Also we use listing to get managed policies (there are up to [5000](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entities) such policies). So we quite easily can reach stack limit. It would be nice to have iterator in listing method, ## Describe the solution you'd like Use iterator in `ListChainsByPrefix` ## Describe alternatives you've considered Accept current limits
achuprov was assigned by fyrchik 2024-01-11 09:15:18 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-contract#66
No description provided.