Add example of APE rules to cli commands help #1575

Open
opened 2024-12-20 10:07:01 +00:00 by dkirillov · 0 comments
Member

It would be very nice to see syntax for --rules flag in help for

  • frostfs-adm morph ape add-rule-chain
  • frostfs-cli ape-manager add

Currently there is only comment in code

// ParseAPERule parses access-policy-engine statement from the following form:
// <status>[:status_detail] <action>... [<condition>...] <resource>...
//
// Examples:
// deny Object.Put *
// deny:QuotaLimitReached Object.Put *
// allow Object.Put *
// allow Object.Get ResourceCondition:Department=HR RequestCondition:Actor=ownerA *
// allow Object.Get any ResourceCondition:Department=HR RequestCondition:Actor=ownerA *
// allow Object.Get all ResourceCondition:Department=HR RequestCondition:Actor=ownerA *
// allow Object.* *
// allow Container.* *
//
//nolint:godot
func ParseAPERule(r *apechain.Rule, rule string) error {

Describe the solution you'd like

Add examples to help

Describe alternatives you've considered

No

Additional context

No

## Is your feature request related to a problem? Please describe. It would be very nice to see syntax for `--rules` flag in help for * `frostfs-adm morph ape add-rule-chain` * `frostfs-cli ape-manager add` Currently there is only comment in code https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/148d68933bb1f3fda17db2c7f4fe073336554f67/pkg/util/ape/parser.go#L62-L76 ## Describe the solution you'd like Add examples to help ## Describe alternatives you've considered No ## Additional context No
dkirillov added the
triage
label 2024-12-20 10:07:01 +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-node#1575
No description provided.