feat: add AIStor Memory API policy actions#244
Conversation
Add the memory:* policy action class (MemoryAction) used by MinIO AIStor's Memory API — cortex CRUD, secrets, and search on a Memory Bucket (Cortex). Mirrors the s3tables/s3vectors service-action classes: action constants + SupportedMemoryActions + IsValid + a condition-key map, wired into statement validation (action-type exclusivity, isMemory, ValidateMemory) and resource validation (a cortex is an S3 bucket, so resources use S3 ARN format).
|
Warning Review limit reached
Next review available in: 47 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Adds a
memory:*policy action class (MemoryAction) for MinIO AIStor'sMemory API — the third API family alongside the Object Store and Tables.
It serves agent memory on a Cortex (Memory Bucket): cortex CRUD, secrets,
and search.
Today AIStor defines these actions as bare string literals, so only the
owner/root credential satisfies them; fine-grained IAM policies referencing
memory:*become effective once the actions live in the shared policy set.Actions
memory:CreateCortex,memory:DeleteCortex,memory:GetCortex,memory:ListCortexes,memory:PutSecret,memory:GetSecret,memory:DeleteSecret,memory:ListSecrets,memory:Search, andmemory:*.Changes
Mirrors the existing
s3tables/s3vectorsservice-action classes:policy/memory-action.go—MemoryActiontype, constants,SupportedMemoryActions,IsValid, and the condition-key map.statement.go— action-type exclusivity,isMemory(), and theValidateMemoryvalidation block.actionset.go—ToMemorySlice/ValidateMemory.resourceset.go—ValidateMemory(a cortex is an S3 bucket, so resourcesuse S3 ARN format, e.g.
arn:aws:s3:::my-cortex).memory-action_test.go—IsValidand condition-key coverage.Tests
go test ./policy/...passes (new memory-action tests + full regression).