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

feat(rbac)!: improve validation from source #1643

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

PatAKnight
Copy link
Collaborator

Description

Improves the validation of the different sources of permission policies and roles. Aims to make policy definition more consistent.

Now checks if a permission policy or role with new member matches the originating role's source and prevents any action if the sources do not match. Exception includes the event of adding new permission policies to the RBAC Admin role defined by the configuration file. Sources include 'REST, 'CSV', 'Configuration', and 'legacy'.

Fixes

Copy link

openshift-ci bot commented May 13, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from pataknight. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@PatAKnight PatAKnight changed the title feat(rbac): improve validation from source feat(rbac)!: improve validation from source May 14, 2024
@AndrienkoAleksandr
Copy link
Collaborator

We had an issue with main branch and it was fixed in the latest main:

error Couldn't find any versions for "@janus-idp/shared-react" that matches "2.6.3"

Can you make rebase one more time?

@PatAKnight PatAKnight force-pushed the rbac-source-validatation branch 3 times, most recently from 181cada to 6346c61 Compare May 29, 2024 17:34
Copy link
Collaborator

@AndrienkoAleksandr AndrienkoAleksandr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request looks good to me and even LGTM, but something wrong with build.

@PatAKnight PatAKnight force-pushed the rbac-source-validatation branch 2 times, most recently from 83f4653 to 01844e1 Compare May 30, 2024 13:08
BREAKING CHANGE: This will lead to more strict validation on the source of permission policies and roles based on the where the first role is defined.

Improves the validation of the different sources of permission policies and roles. Aims to make policy definition more consistent.

Now checks if a permission policy or role with new member matches the originating role's source and prevents any action if the sources do not match. Exception includes the event of adding
new permission policies to the RBAC Admin role defined by the configuration file. Sources include 'REST, 'CSV', 'Configuration', and 'legacy'.

Before updating, ensure that you have attempted to migrate all permission policies and roles to a single source. This can be done by checking source information through the REST API and
by querying the database. Make updates through one of the available avenues: REST API, CSV file, and the database.

To view the originating source for a particular role, query the role-metadata table or use the GET roles endpoint.
Copy link

sonarcloud bot commented May 30, 2024

Quality Gate Passed Quality Gate passed

Issues
3 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.3% Duplication on New Code

See analysis details on SonarCloud

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.

None yet

2 participants