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

Remove unused RBACs in GraphQL server #4120

Closed
Saranya-jena opened this issue Aug 9, 2023 · 5 comments
Closed

Remove unused RBACs in GraphQL server #4120

Saranya-jena opened this issue Aug 9, 2023 · 5 comments

Comments

@Saranya-jena
Copy link
Contributor

Saranya-jena commented Aug 9, 2023

There are a lot of deprecated/unused RBACs present in graphql/server/pkg/authorization/roles.go, check the usages and remove them.

@punithnayak
Copy link
Contributor

hey @Saranya-jena I am able to find the deprecated/unused RBACs will raise pr soon

@samyakjain10
Copy link

Hey @Saranya-jena, I am interested to work on this issue. Can you assign it to me?

@RipulHandoo
Copy link
Contributor

Hi @Saranya-jena @namkyu1999, is this issue still open? I'd like to raise a PR , if it is.
Can you also guide me which variable are to be removed from this

@SohamRatnaparkhi
Copy link
Contributor

SohamRatnaparkhi commented Nov 6, 2023

Hi @RipulHandoo
I think the issue still persists.

In the roles.go (link), you might need to check if that particular role query and its corresponding RBAC-rule are being used somewhere.

If you are using VS Code, you can ctrl+click on that particular role-query. If VS-Code doesn't show any occurrence/use of that rule in some other file, then you can remove it. Alternatively, you can use the global search too.

For example:

  1. If you ctrl+click on UserInfrastructureReg, you will find its occurrence in the resolver of chaos-infra. Hence, you will not remove it.
  2. If you ctrl+click on TerminateChaosWorkflow or SendInvitation, then you won't find its occurrence anywhere else. Hence, you can remove it. Similarly, you will find many rules which are not being used anywhere.

@RipulHandoo
Copy link
Contributor

Hi @RipulHandoo I think the issue still persists.

In the roles.go (link), you might need to check if that particular role query and its corresponding RBAC-rule are being used somewhere.

If you are using VS Code, you can ctrl+click on that particular role-query. If VS-Code doesn't show any occurrence/use of that rule in some other file, then you can remove it. Alternatively, you can use the global search too.

For example:

  1. If you ctrl+click on UserInfrastructureReg, you will find its occurrence in the resolver of chaos-infra. Hence, you will not remove it.
  2. If you ctrl+click on TerminateChaosWorkflow or SendInvitation, then you won't find its occurrence anywhere else. Hence, you can remove it. Similarly, you will find many rules which are not being used anywhere.

@SohamRatnaparkhi
Thanks for guidance. I'll start working on it ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants