APE generated wildcard has no PATCH and RANGE methods #1500

Closed
opened 2024-11-15 10:52:39 +00:00 by abereziny · 1 comment
Member

When using wildcard in APE genearion the ouput rule has no all methods from
https://git.frostfs.info/TrueCloudLab/policy-engine/src/branch/master/schema/native/consts.go#L3-L11

Expected Behavior

All verbs from consts.go are in the Actions list

Output: 
Parsed chain:
Chain ID: chain-id-0x626f1516aeb8d1
     HEX: 636861696e2d69642d30783632366631353136616562386431
Rules:

        Status: Allowed
        Any: false
        Conditions:
        Actions:        Inverted:false
                PutObject
                GetObject
                HeadObject
                DeleteObject
                RangeObject 
                SearchObject
                HashObject
                PatchObject 
        Resources:      Inverted:false
                native:object/*

Current Behavior

Missing RangeObject and PatchObject Actions

Output: 
Parsed chain:
Chain ID: chain-id-0x626f1516aeb8d1
     HEX: 636861696e2d69642d30783632366631353136616562386431
Rules:

        Status: Allowed
        Any: false
        Conditions:
        Actions:        Inverted:false
                PutObject
                GetObject
                HeadObject
                DeleteObject
                SearchObject
                HashObject
        Resources:      Inverted:false
                native:object/*

Possible Solution

Add missing verbs to wildcard APE generation

Steps to Reproduce (for bugs)

  1. Generate APE rule for bearer token or using ape-manager
frostfs-cli bearer generate-ape-override --chain-id 'chain-id-0x626f1516aeb8d1' --cid 'DabH7Zi8Lx36zS8QjVsqw2ycHpC8LDi6BJNwmRcWA2vW' --output 'chain-0x626f1516aeba82.json' --rule 'allow object.*  *'

Regression

Not really, probably missing from long ago

Your Environment

Not relevant

When using wildcard in APE genearion the ouput rule has no all methods from https://git.frostfs.info/TrueCloudLab/policy-engine/src/branch/master/schema/native/consts.go#L3-L11 ## Expected Behavior All verbs from consts.go are in the Actions list ``` Output: Parsed chain: Chain ID: chain-id-0x626f1516aeb8d1 HEX: 636861696e2d69642d30783632366631353136616562386431 Rules: Status: Allowed Any: false Conditions: Actions: Inverted:false PutObject GetObject HeadObject DeleteObject RangeObject SearchObject HashObject PatchObject Resources: Inverted:false native:object/* ``` ## Current Behavior Missing RangeObject and PatchObject Actions ``` Output: Parsed chain: Chain ID: chain-id-0x626f1516aeb8d1 HEX: 636861696e2d69642d30783632366631353136616562386431 Rules: Status: Allowed Any: false Conditions: Actions: Inverted:false PutObject GetObject HeadObject DeleteObject SearchObject HashObject Resources: Inverted:false native:object/* ``` ## Possible Solution Add missing verbs to wildcard APE generation ## Steps to Reproduce (for bugs) 1. Generate APE rule for bearer token or using ape-manager ``` frostfs-cli bearer generate-ape-override --chain-id 'chain-id-0x626f1516aeb8d1' --cid 'DabH7Zi8Lx36zS8QjVsqw2ycHpC8LDi6BJNwmRcWA2vW' --output 'chain-0x626f1516aeba82.json' --rule 'allow object.* *' ``` ## Regression Not really, probably missing from long ago ## Your Environment Not relevant
abereziny added the
bug
triage
labels 2024-11-15 10:52:39 +00:00
Author
Member

The issue was not reproduced with relevant frostfs-cli.

The issue was not reproduced with relevant frostfs-cli.
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#1500
No description provided.