cli: Add support for container
in local rules #921
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#921
Loading…
Reference in a new issue
No description provided.
Delete branch "acid-ant/frostfs-node:feature/876-cli-policy"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #876, #846
Blocked by TrueCloudLab/policy-engine#44
Extend existing implementation to support for namespaces in rule for
object
andcontainer
.Print
chain
in human-readable format.Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com
4af0866a65
to016ddd148b
016ddd148b
tobb64aaa38d
@ -31,0 +27,4 @@
--rule "deny Object.Get EbxzAdz5LB4uqxuz6crWKAumBNtZyK2rKsqQP7TdZvwr/*"
--rule "deny:QuotaLimitReached Object.Put Object.Resource:Department=HR *"
More details can be found here https://git.frostfs.info/TrueCloudLab/frostfs-node/src/branch/master/cmd/frostfs-cli/docs/policy.md
I think it is better to drop link from example: in case of docs autogenerating, it will be strange to have external link
Agree, removed.
bb64aaa38d
tobd7a7bb5e0
bd7a7bb5e0
toec1395fbec
@ -105,0 +111,4 @@
if err != nil {
condition, errCond := parseCondition(lexeme)
if errCond != nil {
err = fmt.Errorf("%w:%w", err, errCond)
Looks like
err
can be not nil but not returned. Is it ok?In the
rule
, it is possible to mixactions
andconditions
, butresources
should be always at the end of therule
. The same is forstatus
-rule
should always start with it. So whenlexeme
neitheraction
, neithercondition
- it isresource
. If it is not aresource
- error will contain all parsing errors.ec1395fbec
tof01c7fc902
@ -105,0 +115,4 @@
lexemes = lexemes[i+1:]
break
}
if condition.Object == apechain.ObjectResource || condition.Object == apechain.ObjectRequest {
Just :)
OMG! Shame on me! Fixed.
f01c7fc902
to8f65c503de
8f65c503de
to417f8fc2c2
@ -0,0 +36,4 @@
## Add rule
Local rule can be added with the command `frostfs-cli control add-rule`:
```shell
@:~$ frostfs-cli control add-rule --endpoint s04.frostfs.devenv:8081 -c cnt_create_cfg.yml \
What is the meaning of
@:~$
, is it some macro?Means cosole input like
user@USER-123:~$