Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/cldsrv 541 #5580

Merged
merged 4 commits into from
Jun 21, 2024
Merged

Bugfix/cldsrv 541 #5580

merged 4 commits into from
Jun 21, 2024

Conversation

williamlardier
Copy link
Contributor

@williamlardier williamlardier commented Jun 13, 2024

Currently:

  • DeleteObjects API do not send any request context when authorizing the request, as we authorize per-object during the API evaluation.
  • When authorizing objects, we use an internal API that only returns the authorization result (not any other information like the user profile or the quota).
  • Eventually we end up with no quota returned at the beginning of the API, so the utilization metrics is not decreased as we detect no account quota.

What we want is to know the account quota, two solutions:

  • We get the quota for each object we authorize in the API, but CheckPolicies only return an array, so any change will be breaking.
  • We send the request contexts at the beginning of the API, get an implicit deny as we pass no resource, and get the quota information. This is the solution implemented here. Note that the authorization result in this case is ignored by the API, on purpose, so any decision will not impact the API, only the objects authz will.

Note: cannot be tested here, will be tested at the integration level.

@bert-e
Copy link
Contributor

bert-e commented Jun 13, 2024

Hello williamlardier,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Jun 13, 2024

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

@scality scality deleted a comment from bert-e Jun 13, 2024
@williamlardier
Copy link
Contributor Author

/approve

@bert-e
Copy link
Contributor

bert-e commented Jun 21, 2024

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/8.8

The following branches have NOT changed:

  • development/7.10
  • development/7.4
  • development/7.70
  • development/8.6
  • development/8.7

Please check the status of the associated issue CLDSRV-541.

Goodbye williamlardier.

The following options are set: approve

@bert-e bert-e merged commit 4f7aa54 into development/8.8 Jun 21, 2024
16 checks passed
@bert-e bert-e deleted the bugfix/CLDSRV-541 branch June 21, 2024 14:14
benzekrimaha added a commit that referenced this pull request Jul 15, 2024
Introduced by #5580
we now do send a requestContext with no specific resource instead
of "null", which results in a policy evaluation error.
As we get an implicit deny for the requestType "objectDelete",
cause the processed result to be false , thus sending an empty
array of objects to vault , resulting in a deny even when the policy
allows the action on specific objects.

Linked Issue : https://scality.atlassian.net/browse/CLDSRV-555
benzekrimaha added a commit that referenced this pull request Jul 15, 2024
Introduced by #5580
we now do send a requestContext with no specific resource instead
of "null", which results in a policy evaluation error.
As we get an implicit deny for the requestType "objectDelete",
cause the processed result to be false , thus sending an empty
array of objects to vault , resulting in a deny even when the policy
allows the action on specific objects.

Linked Issue : https://scality.atlassian.net/browse/CLDSRV-555
benzekrimaha added a commit that referenced this pull request Jul 15, 2024
Introduced by #5580
we now do send a requestContext with no specific resource instead
of "null", which results in a policy evaluation error.
As we get an implicit deny for the requestType "objectDelete",
cause the processed result to be false , thus sending an empty
array of objects to vault , resulting in a deny even when the policy
allows the action on specific objects.

Linked Issue : https://scality.atlassian.net/browse/CLDSRV-555
benzekrimaha added a commit that referenced this pull request Jul 15, 2024
Introduced by #5580
we now do send a requestContext with no specific resource instead
of "null", which results in a policy evaluation error.
As we get an implicit deny for the requestType "objectDelete",
cause the processed result to be false , thus sending an empty
array of objects to vault , resulting in a deny even when the policy
allows the action on specific objects.

Linked Issue : https://scality.atlassian.net/browse/CLDSRV-555
benzekrimaha added a commit that referenced this pull request Jul 15, 2024
Introduced by #5580
we now do send a requestContext with no specific resource instead
of "null", which results in a policy evaluation error.
As we get an implicit deny for the requestType "objectDelete",
cause the processed result to be false , thus sending an empty
array of objects to vault , resulting in a deny even when the policy
allows the action on specific objects.

Linked Issue : https://scality.atlassian.net/browse/CLDSRV-555
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants