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

Improvement/cldsrv 427 permissions checks #5432

Merged
merged 4 commits into from
Nov 17, 2023

Conversation

benzekrimaha
Copy link
Contributor

PR opened after closing : #5323 and #5421
Bucket policies are not correctly interpreted, this is part of the following epic to fix that: scality/Arsenal#2181

This PR is aiming enable authorization logics from IAM policies, bucket policies and ACLs to be interpreted in aggregate in CloudServer's 'isBucketAuthorized' and 'isObjectAuthorized' functions. , ticket linked to this issue here : https://scality.atlassian.net/browse/CLDSRV-427

PRs providing implicit Deny logic to CS for processing in this PR
scality/Arsenal#2181
https://github.com/scality/Vault/pull/2135
#5322
#5420

I'm not bumping a new CLDSRV version since a new version has been created in this merged PR : #5322 , Please let me know if it needs to be done anyways.

@nicolas2bert
Copy link
Contributor

I did not mean to approve this draft PR.

Base automatically changed from improvement/CLDSRV-426-acl-impl-deny to development/7.10 November 13, 2023 16:27
@bert-e
Copy link
Contributor

bert-e commented Nov 13, 2023

Hello benzekrimaha,

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.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Nov 13, 2023

Incorrect fix version

The Fix Version/s in issue CLDSRV-427 contains:

  • 7.70.30

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 7.10.33

  • 7.70.30

  • 8.6.12

  • 8.7.31

  • 8.8.5

Please check the Fix Version/s of CLDSRV-427, or the target
branch of this pull request.

@bert-e
Copy link
Contributor

bert-e commented Nov 13, 2023

Incorrect fix version

The Fix Version/s in issue CLDSRV-427 contains:

  • 7.70.30

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 7.10.33

  • 7.70.31

  • 8.6.13

  • 8.7.31

  • 8.8.5

Please check the Fix Version/s of CLDSRV-427, or the target
branch of this pull request.

@benzekrimaha
Copy link
Contributor Author

ping

@bert-e
Copy link
Contributor

bert-e commented Nov 14, 2023

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

@benzekrimaha
Copy link
Contributor Author

/create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Nov 14, 2023

Conflict

A conflict has been raised during the creation of
integration branch w/7.70/improvement/CLDSRV-427-permissions-checks with contents from improvement/CLDSRV-427-permissions-checks
and development/7.70.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/7.70/improvement/CLDSRV-427-permissions-checks origin/development/7.70
 $ git merge origin/improvement/CLDSRV-427-permissions-checks
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/7.70/improvement/CLDSRV-427-permissions-checks

The following options are set: create_integration_branches

@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-427-permissions-checks branch from 4d63d3d to 653e213 Compare November 15, 2023 10:23
@bert-e
Copy link
Contributor

bert-e commented Nov 15, 2023

Conflict

A conflict has been raised during the creation of
integration branch w/8.6/improvement/CLDSRV-427-permissions-checks with contents from w/7.70/improvement/CLDSRV-427-permissions-checks
and development/8.6.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/8.6/improvement/CLDSRV-427-permissions-checks origin/development/8.6
 $ git merge origin/w/7.70/improvement/CLDSRV-427-permissions-checks
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/8.6/improvement/CLDSRV-427-permissions-checks

The following options are set: create_integration_branches

Will Toozs and others added 2 commits November 15, 2023 11:26
@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-427-permissions-checks branch from 653e213 to 6e240c3 Compare November 15, 2023 10:29
@bert-e
Copy link
Contributor

bert-e commented Nov 15, 2023

History mismatch

Merge commit #48b09afb4ba6309c9064afc7fbe9396f802a39c2 on the integration branch
w/7.70/improvement/CLDSRV-427-permissions-checks is merging a branch which is neither the current
branch improvement/CLDSRV-427-permissions-checks nor the development branch
development/7.70.

It is likely due to a rebase of the branch improvement/CLDSRV-427-permissions-checks and the
merge is not possible until all related w/* branches are deleted or updated.

Please use the reset command to have me reinitialize these branches.

The following options are set: create_integration_branches

@benzekrimaha
Copy link
Contributor Author

/reset

@bert-e
Copy link
Contributor

bert-e commented Nov 15, 2023

Reset complete

I have successfully deleted this pull request's integration branches.

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Nov 15, 2023

Conflict

A conflict has been raised during the creation of
integration branch w/8.6/improvement/CLDSRV-427-permissions-checks with contents from w/7.70/improvement/CLDSRV-427-permissions-checks
and development/8.6.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/8.6/improvement/CLDSRV-427-permissions-checks origin/development/8.6
 $ git merge origin/w/7.70/improvement/CLDSRV-427-permissions-checks
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/8.6/improvement/CLDSRV-427-permissions-checks

The following options are set: create_integration_branches

@benzekrimaha
Copy link
Contributor Author

ping

@bert-e
Copy link
Contributor

bert-e commented Nov 15, 2023

Integration data created

I have created the integration data for the additional destination branches.

The following branches will NOT be impacted:

  • development/7.4

You can set option create_pull_requests if you need me to create
integration pull requests in addition to integration branches, with:

@bert-e create_pull_requests

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Nov 15, 2023

Waiting for approval

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

  • the author

  • 2 peers

The following options are set: create_integration_branches

@benzekrimaha benzekrimaha marked this pull request as ready for review November 15, 2023 10:48
lib/api/apiUtils/authorization/permissionChecks.js Outdated Show resolved Hide resolved
lib/api/apiUtils/authorization/permissionChecks.js Outdated Show resolved Hide resolved
lib/api/apiUtils/authorization/permissionChecks.js Outdated Show resolved Hide resolved
lib/api/apiUtils/authorization/permissionChecks.js Outdated Show resolved Hide resolved
lib/api/apiUtils/authorization/permissionChecks.js Outdated Show resolved Hide resolved
lib/api/apiUtils/authorization/permissionChecks.js Outdated Show resolved Hide resolved
@bert-e
Copy link
Contributor

bert-e commented Nov 15, 2023

Waiting for approval

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

  • the author

  • 2 peers

The following reviewers are expecting changes from the author, or must review again:

The following options are set: create_integration_branches

- In this commit , I added a helper (processBucketPolicy) function
for the bycket policies checks that are shared between the
isbucketAuthorized, isObjAuthorized and evaluateBucketPolicyWithIAM
for a better code readability and to avoid long functions.

(cherry picked from commit 33d7c99)
@benzekrimaha benzekrimaha force-pushed the improvement/CLDSRV-427-permissions-checks branch from 1fb1b84 to 6caa5cc Compare November 17, 2023 10:36
@bert-e
Copy link
Contributor

bert-e commented Nov 17, 2023

History mismatch

Merge commit #6e240c31b9231fb52bfbcc3bdaadc8d86dda135b on the integration branch
w/7.70/improvement/CLDSRV-427-permissions-checks is merging a branch which is neither the current
branch improvement/CLDSRV-427-permissions-checks nor the development branch
development/7.70.

It is likely due to a rebase of the branch improvement/CLDSRV-427-permissions-checks and the
merge is not possible until all related w/* branches are deleted or updated.

Please use the reset command to have me reinitialize these branches.

The following options are set: create_integration_branches

@benzekrimaha
Copy link
Contributor Author

/reset

@bert-e
Copy link
Contributor

bert-e commented Nov 17, 2023

Reset complete

I have successfully deleted this pull request's integration branches.

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Nov 17, 2023

Conflict

A conflict has been raised during the creation of
integration branch w/8.6/improvement/CLDSRV-427-permissions-checks with contents from w/7.70/improvement/CLDSRV-427-permissions-checks
and development/8.6.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/8.6/improvement/CLDSRV-427-permissions-checks origin/development/8.6
 $ git merge origin/w/7.70/improvement/CLDSRV-427-permissions-checks
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/8.6/improvement/CLDSRV-427-permissions-checks

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Nov 17, 2023

Integration data created

I have created the integration data for the additional destination branches.

The following branches will NOT be impacted:

  • development/7.4

You can set option create_pull_requests if you need me to create
integration pull requests in addition to integration branches, with:

@bert-e create_pull_requests

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Nov 17, 2023

Waiting for approval

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

  • the author

  • 2 peers

The following options are set: create_integration_branches

@benzekrimaha
Copy link
Contributor Author

@bert-e create_pull_requests

@bert-e
Copy link
Contributor

bert-e commented Nov 17, 2023

Integration data created

I have created the integration data for the additional destination branches.

The following branches will NOT be impacted:

  • development/7.4

Follow integration pull requests if you would like to be notified of
build statuses by email.

The following options are set: create_pull_requests, create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Nov 17, 2023

Waiting for approval

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

  • the author

  • 2 peers

The following options are set: create_pull_requests, create_integration_branches

@benzekrimaha
Copy link
Contributor Author

/approve

@bert-e
Copy link
Contributor

bert-e commented Nov 17, 2023

In the queue

The changeset has received all authorizations and has been added to the
relevant queue(s). The queue(s) will be merged in the target development
branch(es) as soon as builds have passed.

The changeset will be merged in:

  • ✔️ development/7.10

  • ✔️ development/7.70

  • ✔️ development/8.6

  • ✔️ development/8.7

  • ✔️ development/8.8

The following branches will NOT be impacted:

  • development/7.4

There is no action required on your side. You will be notified here once
the changeset has been merged. In the unlikely event that the changeset
fails permanently on the queue, a member of the admin team will
contact you to help resolve the matter.

IMPORTANT

Please do not attempt to modify this pull request.

  • Any commit you add on the source branch will trigger a new cycle after the
    current queue is merged.
  • Any commit you add on one of the integration branches will be lost.

If you need this pull request to be removed from the queue, please contact a
member of the admin team now.

The following options are set: approve, create_pull_requests, create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Nov 17, 2023

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

  • ✔️ development/7.10

  • ✔️ development/7.70

  • ✔️ development/8.6

  • ✔️ development/8.7

  • ✔️ development/8.8

The following branches have NOT changed:

  • development/7.4

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

Goodbye benzekrimaha.

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.

5 participants