feature/261-update_put-bucket-policy_to_use_contract #279

Merged
Member

close #261

close #261
dkirillov self-assigned this 2023-12-11 09:58:16 +00:00
dkirillov added 1 commit 2023-12-11 09:58:19 +00:00
[#259] Support contract based policies
All checks were successful
/ DCO (pull_request) Successful in 1m21s
/ Vulncheck (pull_request) Successful in 1m41s
/ Builds (1.20) (pull_request) Successful in 2m19s
/ Builds (1.21) (pull_request) Successful in 2m1s
/ Lint (pull_request) Successful in 3m20s
/ Tests (1.20) (pull_request) Successful in 2m14s
/ Tests (1.21) (pull_request) Successful in 2m10s
9272f4e108
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
dkirillov force-pushed feature/261-update_put-bucket-policy_to_use_contract from 7e1c3ddbfb to d12a45f4e9 2023-12-13 15:00:00 +00:00 Compare
dkirillov changed title from WIP: feature/261-update_put-bucket-policy_to_use_contract to feature/261-update_put-bucket-policy_to_use_contract 2023-12-13 15:00:51 +00:00
dkirillov requested review from storage-services-committers 2023-12-13 15:00:59 +00:00
dkirillov requested review from storage-services-developers 2023-12-14 06:38:21 +00:00
dkirillov force-pushed feature/261-update_put-bucket-policy_to_use_contract from d12a45f4e9 to 4f5d95aa8e 2023-12-14 14:52:26 +00:00 Compare
alexvanin reviewed 2023-12-18 10:29:23 +00:00
@ -1134,73 +1186,6 @@ func resourceInfoFromName(name, bucketName string) resourceInfo {
return resInfo
}
func astToPolicy(ast *ast) *bucketPolicy {
Owner

I will miss this code 😃

I will miss this code 😃
@ -53,3 +52,3 @@
reqInfo := GetReqInfo(r.Context())
target := engine.NewRequestTargetWithNamespace(settings.ResolveNamespaceAlias(reqInfo.Namespace))
st, found, err := storage.IsAllowed(policy.S3ChainName, target, req)
st, found, err := storage.IsAllowed("s3", target, req)
Owner

chain.S3?

`chain.S3`?
Author
Member

Sure

Sure
@ -8,3 +13,4 @@
"go.uber.org/zap"
)
const S3ChainName chain.Name = "s3"
Owner

Isn't it completely replaced by chain.S3?

Isn't it completely replaced by `chain.S3`?
@ -23,0 +42,4 @@
var _ handler.APE = (*Storage)(nil)
func NewStorage(cfg StorageConfig) *Storage {
// todo use thread safe inmemory
Owner

Maybe link to the issue in policy engine repo?

Maybe link to the issue in policy engine repo?
Author
Member

I wanted to implement thread same in memory storage in s3-gw repo but forgot

I wanted to implement thread same in memory storage in s3-gw repo but forgot
Author
Member

But let's create issue for policy engine TrueCloudLab/policy-engine#35

But let's create issue for policy engine https://git.frostfs.info/TrueCloudLab/policy-engine/issues/35
dkirillov force-pushed feature/261-update_put-bucket-policy_to_use_contract from 4f5d95aa8e to 38c5503a02 2023-12-18 12:50:12 +00:00 Compare
alexvanin approved these changes 2023-12-20 07:41:12 +00:00
alexvanin merged commit 38c5503a02 into master 2023-12-20 07:41:24 +00:00
alexvanin deleted branch feature/261-update_put-bucket-policy_to_use_contract 2023-12-20 07:41:31 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-services-developers
No milestone
No project
No assignees
2 participants
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-s3-gw#279
No description provided.