Skip to content

fix(rbac): add additional validation for permission policies #1908

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

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

dzemanov
Copy link
Member

Adds validation to the policy section of permission policies. The only allowed terms that can be used are create, read, update, delete, and our RBAC specific keyword use.

Closes #996.

Copy link

openshift-ci bot commented Jul 18, 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 assign zaperex for approval. 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

@dzemanov dzemanov force-pushed the rbac-policy-validation branch from 94556de to e731798 Compare July 23, 2024 10:46
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.

I tested this pr - works like expected. And I'm fine with current pr code. There is only one small minus - we have duplication permission policy action values. @dzemanov I can propose small improvements to fix that: https://github.com/janus-idp/backstage-plugins/compare/rbac-policy-validation...cloud-eda:backstage-plugins:rbac-policy-valivation-alternative?expand=1 . But it is optional and up to you and these changes require one more release of the common package. @PatAKnight what do you think?

@dzemanov
Copy link
Member Author

@AndrienkoAleksandr yes, was thinking about this as well. If it is ok to release new version, I would go with your proposed changes.

@dzemanov dzemanov force-pushed the rbac-policy-validation branch 3 times, most recently from d1b8fcc to d5db112 Compare August 1, 2024 09:50
@dzemanov dzemanov force-pushed the rbac-policy-validation branch from d5db112 to 2383384 Compare August 2, 2024 07:22
Copy link

sonarqubecloud bot commented Aug 2, 2024

@openshift-ci openshift-ci bot added the lgtm label Aug 5, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 592498f into main Aug 5, 2024
9 checks passed
@openshift-merge-bot openshift-merge-bot bot deleted the rbac-policy-validation branch August 5, 2024 09:03
janus-idp bot pushed a commit that referenced this pull request Aug 5, 2024
## @janus-idp/backstage-plugin-rbac-common [1.8.1](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/[email protected]...@janus-idp/[email protected]) (2024-08-05)

### Bug Fixes

* **rbac:** add additional validation for permission policies ([#1908](#1908)) ([592498f](592498f)), closes [#1939](#1939)
janus-idp bot pushed a commit that referenced this pull request Aug 5, 2024
## [1.17.2](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/[email protected]...@janus-idp/[email protected]) (2024-08-05)

### Bug Fixes

* **rbac:** add additional validation for permission policies ([#1908](#1908)) ([592498f](592498f)), closes [#1939](#1939)
* **topology:** bump shared-react dependency ([#2006](#2006)) ([5c939fb](5c939fb))
janus-idp bot pushed a commit that referenced this pull request Aug 5, 2024
## [1.26.1](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/[email protected]...@janus-idp/[email protected]) (2024-08-05)

### Bug Fixes

* **rbac:** add additional validation for permission policies ([#1908](#1908)) ([592498f](592498f)), closes [#1939](#1939)
* **topology:** bump shared-react dependency ([#2006](#2006)) ([5c939fb](5c939fb))
janus-idp bot pushed a commit that referenced this pull request Aug 5, 2024
## [4.7.2](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/[email protected]...@janus-idp/[email protected]) (2024-08-05)

### Bug Fixes

* **rbac:** add additional validation for permission policies ([#1908](#1908)) ([592498f](592498f)), closes [#1939](#1939)
* **topology:** bump shared-react dependency ([#2006](#2006)) ([5c939fb](5c939fb))
janus-idp bot pushed a commit that referenced this pull request Aug 5, 2024
## [1.25.0](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/[email protected]...@janus-idp/[email protected]) (2024-08-05)

### Features

* **argocd:** add permission support for argocd ([#1855](#1855)) ([3b78237](3b78237))
* **kiali:** traffic graph ([#1606](#1606)) ([657fef9](657fef9))
* **lightspeed:** add a new lightspeed plugin with basic implementation of chat ([#1889](#1889)) ([cb80e38](cb80e38))
* **rbac:** show list of accessible plugins in roles list page ([#1894](#1894)) ([62d9d6c](62d9d6c))
* **tekton:** add permissions support for tekton plugin ([#1854](#1854)) ([f744896](f744896))
* **topology:** remove usage of k8s plugin from topology & tekton plugins ([#1869](#1869)) ([ae7d8ee](ae7d8ee))

### Bug Fixes

* argocd dependency package version ([#1992](#1992)) ([e3c4419](e3c4419))
* **argocd:** fix argocd naming ([#1990](#1990)) ([6b764a8](6b764a8))
* **argocd:** fix argocd-common plugin version ([#1987](#1987)) ([fb441fe](fb441fe))
* **deps:** downgrade shared-react in acr ([#1996](#1996)) ([3d669d2](3d669d2))
* **orchestrator:** remove default pagination on v2 endpoints ([#1983](#1983)) ([5e30274](5e30274))
* **rbac:** add additional validation for permission policies ([#1908](#1908)) ([592498f](592498f)), closes [#1939](#1939)
* **rbac:** fix uncommited knex transaction in the addGroupingPolicies ([#1968](#1968)) ([24d5eef](24d5eef))
* **rbac:** log when plugin has no permissions ([#1917](#1917)) ([cc8752b](cc8752b))
* **topology:** bump shared-react dependency ([#2006](#2006)) ([5c939fb](5c939fb))

### Documentation

* **argocd:** update argocd configuration documentation ([#1875](#1875)) ([054ceec](054ceec))
* **quay:** add documentation for the new credential settings in proxy backend ([#1902](#1902)) ([e04d231](e04d231))
debsmita1 pushed a commit to debsmita1/backstage-plugins that referenced this pull request Aug 9, 2024
…dp#1908)

* fix(rbac): add additional validation for permission policies

* fix(rbac): remove duplication permission action values (janus-idp#1939)

Signed-off-by: Oleksandr Andriienko <[email protected]>

---------

Signed-off-by: Oleksandr Andriienko <[email protected]>
Co-authored-by: Oleksandr Andriienko <[email protected]>
debsmita1 pushed a commit to debsmita1/backstage-plugins that referenced this pull request Aug 9, 2024
## @janus-idp/backstage-plugin-rbac-common [1.8.1](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/[email protected]...@janus-idp/[email protected]) (2024-08-05)

### Bug Fixes

* **rbac:** add additional validation for permission policies ([janus-idp#1908](janus-idp#1908)) ([592498f](janus-idp@592498f)), closes [janus-idp#1939](janus-idp#1939)
debsmita1 pushed a commit to debsmita1/backstage-plugins that referenced this pull request Aug 9, 2024
debsmita1 pushed a commit to debsmita1/backstage-plugins that referenced this pull request Aug 9, 2024
debsmita1 pushed a commit to debsmita1/backstage-plugins that referenced this pull request Aug 9, 2024
debsmita1 pushed a commit to debsmita1/backstage-plugins that referenced this pull request Aug 9, 2024
## [1.25.0](https://github.com/janus-idp/backstage-plugins/compare/@janus-idp/[email protected]...@janus-idp/[email protected]) (2024-08-05)

### Features

* **argocd:** add permission support for argocd ([janus-idp#1855](janus-idp#1855)) ([3b78237](janus-idp@3b78237))
* **kiali:** traffic graph ([janus-idp#1606](janus-idp#1606)) ([657fef9](janus-idp@657fef9))
* **lightspeed:** add a new lightspeed plugin with basic implementation of chat ([janus-idp#1889](janus-idp#1889)) ([cb80e38](janus-idp@cb80e38))
* **rbac:** show list of accessible plugins in roles list page ([janus-idp#1894](janus-idp#1894)) ([62d9d6c](janus-idp@62d9d6c))
* **tekton:** add permissions support for tekton plugin ([janus-idp#1854](janus-idp#1854)) ([f744896](janus-idp@f744896))
* **topology:** remove usage of k8s plugin from topology & tekton plugins ([janus-idp#1869](janus-idp#1869)) ([ae7d8ee](janus-idp@ae7d8ee))

### Bug Fixes

* argocd dependency package version ([janus-idp#1992](janus-idp#1992)) ([e3c4419](janus-idp@e3c4419))
* **argocd:** fix argocd naming ([janus-idp#1990](janus-idp#1990)) ([6b764a8](janus-idp@6b764a8))
* **argocd:** fix argocd-common plugin version ([janus-idp#1987](janus-idp#1987)) ([fb441fe](janus-idp@fb441fe))
* **deps:** downgrade shared-react in acr ([janus-idp#1996](janus-idp#1996)) ([3d669d2](janus-idp@3d669d2))
* **orchestrator:** remove default pagination on v2 endpoints ([janus-idp#1983](janus-idp#1983)) ([5e30274](janus-idp@5e30274))
* **rbac:** add additional validation for permission policies ([janus-idp#1908](janus-idp#1908)) ([592498f](janus-idp@592498f)), closes [janus-idp#1939](janus-idp#1939)
* **rbac:** fix uncommited knex transaction in the addGroupingPolicies ([janus-idp#1968](janus-idp#1968)) ([24d5eef](janus-idp@24d5eef))
* **rbac:** log when plugin has no permissions ([janus-idp#1917](janus-idp#1917)) ([cc8752b](janus-idp@cc8752b))
* **topology:** bump shared-react dependency ([janus-idp#2006](janus-idp#2006)) ([5c939fb](janus-idp@5c939fb))

### Documentation

* **argocd:** update argocd configuration documentation ([janus-idp#1875](janus-idp#1875)) ([054ceec](janus-idp@054ceec))
* **quay:** add documentation for the new credential settings in proxy backend ([janus-idp#1902](janus-idp#1902)) ([e04d231](janus-idp@e04d231))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RBAC plugin] Add additional validation for the permission policies
2 participants