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

fix: updated rbac for devtron apps/helm pipeline #3227

Merged
merged 2 commits into from
Apr 3, 2023

Conversation

kartik-579
Copy link
Member

@kartik-579 kartik-579 commented Apr 3, 2023

Description

Rbac for getting k8s resource, listing events and getting pod logs was checking rbac on helm apps which was making the request unauthorized even when the user have permissions.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Local Environment

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


@kartik-579 kartik-579 merged commit d05c075 into main Apr 3, 2023
@kartik-579 kartik-579 deleted the rbac-fix-devtron-helm-pipeline branch April 3, 2023 09:08
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

gireesh-naidu pushed a commit that referenced this pull request Jun 16, 2023
* handled nil pointer in imagePullSecret service when asserting k8s error type (#3208)

* fix: rbac optimisation for creation of policies for devtron app, helm app and cluster (#2948)

* change1

* "RBAC Refactoring and Policy Creation Optimisation"

* "Removing ClusterType"

* "ReFactoring the changes"

* removed redundant method

* "Changes After Reviews"

* "Changes After Reviews 2"

* "Changes After Reviews 3"

* "Changes After Reviews 4"

* "Changes After Reviews 5"

* "Changes After Reviews 6"

* "Changes After Reviews 6"

* "Changes based on entity"

* Code Cleaning

* Code change 8

* Code change 9

* Code change 9

* Code change 10

* Code change 11

* Code change 12

* Code change 13

* fixed transaction error for creating roles

* refactoring - 1

* refactoring

* Changes after Resolving conflicts

* Changes after Resolving conflicts 2

* Changes after Resolving conflicts 3

* Changes after Resolving access_type to accessType and queries

* Final changes

* Rbac-Optimimisation Change

* Rbac-Optimimisation Final Change

* refactoring

* Fixing Legacy Bug

* Fixing Visiblity issues all pods

* Merge with main

* Intialisation with capacity and adding logs

* Intialisation with capacity and adding logs

* Refactoring the changes

* Adding logs

* Adding logs 1

* Updating the audit logs for create Role

* Handling from code instead of script

* Merge Main

* Deleting Commented Code and adding role group view

* Fixing issues caught in Dev-Testing

* Removing script queries

* Fixing Issues of entity empty

* Dev-Testing Changes

* Final Changes

* Reducing duplication

* Reducing duplication

* Adding audit logs for superAdmin for user role mappings

* Visibility of permissions

* Visibility of permissions for devtron-apps

* Fixing Legacy issue for deleting roleGroup permissions

* deleting group and role mapping from casbin

* updated sql script no.

---------

Co-authored-by: kartik-579 <kartik@devtron.ai>

* fix: user/role group sql lock fix (#3206)

* change1

* "RBAC Refactoring and Policy Creation Optimisation"

* "Removing ClusterType"

* "ReFactoring the changes"

* removed redundant method

* "Changes After Reviews"

* "Changes After Reviews 2"

* "Changes After Reviews 3"

* "Changes After Reviews 4"

* "Changes After Reviews 5"

* "Changes After Reviews 6"

* "Changes After Reviews 6"

* "Changes based on entity"

* Code Cleaning

* Code change 8

* Code change 9

* Code change 9

* Code change 10

* Code change 11

* Code change 12

* Code change 13

* fixed transaction error for creating roles

* refactoring - 1

* refactoring

* Changes after Resolving conflicts

* Changes after Resolving conflicts 2

* Changes after Resolving conflicts 3

* Changes after Resolving access_type to accessType and queries

* Final changes

* Rbac-Optimimisation Change

* Rbac-Optimimisation Final Change

* refactoring

* Fixing Legacy Bug

* Fixing Visiblity issues all pods

* Merge with main

* Intialisation with capacity and adding logs

* Intialisation with capacity and adding logs

* Refactoring the changes

* Adding logs

* Adding logs 1

* Updating the audit logs for create Role

* Handling from code instead of script

* Merge Main

* Deleting Commented Code and adding role group view

* Fixing issues caught in Dev-Testing

* Removing script queries

* Fixing Issues of entity empty

* Dev-Testing Changes

* Final Changes

* Reducing duplication

* Reducing duplication

* Adding audit logs for superAdmin for user role mappings

* Visibility of permissions

* Visibility of permissions for devtron-apps

* Fixing Legacy issue for deleting roleGroup permissions

* deleting group and role mapping from casbin

* fix deadlock condition for user/role group update

* updated sql script no.

---------

Co-authored-by: shivam-nagar23 <shivam@devtron.ai>

* fix: label key can be saved without value if saved without propagation (#3190)

* fix: length of key increased in global tag

* fix: not validating label value required tag as tags can be supplied without value if saved without propagation

* sql file renamed

* Fix: App grouping optimisation on ci pipelines (#3219)

* optimize ci pipeline grouping

* fix

* fix

* optimized ci pipelines fetch for app grouping - removed scripts and parent app id

* added observability for ci pipeline in app grouping

* fixed query for getting workflow runner by appId and envId, re-added ci trigger metrics (#3222)

* fix: updated rbac for devtron apps/helm pipeline (#3227)

* commented wrong rbac for devtron apps - helm pipeline

* updated comments:

* remove redundant files

---------

Co-authored-by: Shivam-nagar23 <124123645+Shivam-nagar23@users.noreply.github.com>
Co-authored-by: shivam-nagar23 <shivam@devtron.ai>
Co-authored-by: Manish Agrawal <85211469+manish-agrawal-ai@users.noreply.github.com>
Co-authored-by: Vikram <73224103+vikramdevtron@users.noreply.github.com>
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.

2 participants