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

[#6278] improve(CLI): Revoke all privileges from a role via the Gravitino CLI. #6293

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

Abyss-lord
Copy link
Contributor

What changes were proposed in this pull request?

Revoke all privileges from a role via the Gravitino CLI. syntax: gcli role revoke --name <name> --role <role> --all

The step as follows:

  1. Retrieve the SecurableObject instance using role and fullname;
  2. Obtain the privileges associated with the SecurableObject;
  3. Revoke all identified privileges;

Why are the changes needed?

Fix: #6278

Does this PR introduce any user-facing change?

No

How was this patch tested?

local tests + ut

gcli role grant -m demo_metalake --name Hive.default --role roleA --privilege create_table modify_table -i
# roleA granted create_table,modify_table on Hive.default

gcli role revoke -m demo_metalake --name Hive.default --all --role roleA -i
# Hive.default: ALLOW create table, ALLOW modify table

… Gravitino CLI.

Revoke all privileges from a role via the Gravitino CLI.
@Abyss-lord
Copy link
Contributor Author

@justinmclean @tengqm could you please review this PR when you have time? I’d really appreciate your feedback.

Copy link
Member

@justinmclean justinmclean left a comment

Choose a reason for hiding this comment

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

LGTM thanks for the contribution.

@justinmclean justinmclean merged commit 6fb45d6 into apache:main Jan 17, 2025
27 checks passed
@Abyss-lord Abyss-lord deleted the improvement-revoke-privileges branch January 17, 2025 02:08
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.

[Improvement] Revoke all privileges from a role via the Gravitino CLI
2 participants