ape: fill request properties with user claim tags #1096

Merged
fyrchik merged 1 commit from aarifullin/frostfs-node:feat/ape_user_claim_tag into master 2024-09-04 19:51:08 +00:00
Member
  • tree: Make verifyClient fill ape request with user claim tags
  • object: Make ape middleware fill request with user claim tags
  • container: Make ape middleware fill request with user claim tags
  • go.mod: Update policy-engine package version
* `tree`: Make `verifyClient` fill ape request with user claim tags * `object`: Make ape middleware fill request with user claim tags * `container`: Make ape middleware fill request with user claim tags * `go.mod`: Update policy-engine package version
aarifullin force-pushed feat/ape_user_claim_tag from fcc4ba057f to a4604e1141 2024-04-16 08:16:04 +00:00 Compare
aarifullin requested review from dkirillov 2024-04-16 08:16:39 +00:00
aarifullin requested review from storage-core-committers 2024-04-16 08:16:41 +00:00
aarifullin requested review from storage-core-developers 2024-04-16 08:28:09 +00:00
dkirillov reviewed 2024-04-16 08:50:05 +00:00
@ -600,0 +626,4 @@
}
return reqProps, nil
}
const tagSuffix = "tag-"
Member

Let's make this function more general. I mean don't use just tags (but all claims). We should write something like

for k, v := range subj.KV {
    key := fmt.Sprintf(commonschema.PropertyKeyFormatFrostFSIDUserClaim, k)
    reqProps[key] = v
}
Let's make this function more general. I mean don't use just tags (but all claims). We should write something like ``` for k, v := range subj.KV { key := fmt.Sprintf(commonschema.PropertyKeyFormatFrostFSIDUserClaim, k) reqProps[key] = v } ```
Author
Member

Alright

Alright
Author
Member

I've fixed. Thanks for the commment

I've fixed. Thanks for the commment
Owner

It seems there will be a conflict with #1095 -- could you review it, so I can merge and you can rebase this PR?

It seems there will be a conflict with https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/1095 -- could you review it, so I can merge and you can rebase this PR?
aarifullin force-pushed feat/ape_user_claim_tag from a4604e1141 to 8a35c4de3d 2024-04-16 09:21:09 +00:00 Compare
fyrchik reviewed 2024-04-16 09:23:54 +00:00
@ -600,0 +621,4 @@
}
subj, err := ac.frostFSIDClient.GetSubject(pk.GetScriptHash())
if err != nil {
if !strings.Contains(err.Error(), errSubjectNotFound.Error()) {
Owner

You define errSubjectNotFound as an error, but only use it inside strings.Contains
Why not declare a string so that we can avoid the conversion?

You define `errSubjectNotFound` as an error, but only use it inside `strings.Contains` Why not declare a string so that we can avoid the conversion?
Author
Member

Fixed: subjectNotFoundErrorMessage has been introduced

Fixed: `subjectNotFoundErrorMessage` has been introduced
Author
Member

PR has been rebased, the conflicts - resolved

PR has been rebased, the conflicts - resolved
aarifullin force-pushed feat/ape_user_claim_tag from 8a35c4de3d to bb0dbfb3a4 2024-04-16 09:27:24 +00:00 Compare
aarifullin force-pushed feat/ape_user_claim_tag from bb0dbfb3a4 to 1387dd1f72 2024-04-16 09:37:24 +00:00 Compare
Author
Member

It seems there will be a conflict with #1095 -- could you review it, so I can merge and you can rebase this PR?

Sure. I'll rebase and resolve conflicts as soon as you merge your PR

> It seems there will be a conflict with https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/1095 -- could you review it, so I can merge and you can rebase this PR? Sure. I'll rebase and resolve conflicts as soon as you merge your PR
aarifullin force-pushed feat/ape_user_claim_tag from 1387dd1f72 to 10ee865e98 2024-04-16 12:13:03 +00:00 Compare
dstepanov-yadro approved these changes 2024-04-16 14:30:28 +00:00
fyrchik approved these changes 2024-04-16 15:54:17 +00:00
fyrchik merged commit 10ee865e98 into master 2024-04-16 15:54:24 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
4 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-node#1096
No description provided.