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

[Bug report] Grant privileges to a role, duplicated privilege name with different condition shouldn’t be allowed to grant #6116

Closed
danhuawang opened this issue Jan 6, 2025 · 2 comments · Fixed by #6117
Assignees
Labels
0.8.0 Release v0.8.0 bug Something isn't working

Comments

@danhuawang
Copy link
Contributor

Version

main branch

Describe what's wrong

image

Error message and/or stacktrace

N/A

How to reproduce

  1. Create a role with securableObjects like
{
                "type": "catalog",
                "privileges": [
                    {
                        "name": "use_catalog",
                        "condition": "allow"
                    }
                ],
                "fullName": "file_catalog2"
            }
  1. Grant use_catalog deny privilege to the role
{
                "privileges": [
                    {
                        "name": "use_catalog",
                        "condition": "deny"
                    }
  ]
}

Additional context

No response

@danhuawang danhuawang added the bug Something isn't working label Jan 6, 2025
@danhuawang
Copy link
Contributor Author

@jerqi Can you help check this issue?

@jerqi
Copy link
Contributor

jerqi commented Jan 6, 2025

I will fix this issue.

@jerqi jerqi added the 0.8.0 Release v0.8.0 label Jan 6, 2025
jerqi added a commit to qqqttt123/gravitino that referenced this issue Jan 6, 2025
@xunliu xunliu closed this as completed in 688c1c9 Jan 7, 2025
Abyss-lord pushed a commit to Abyss-lord/gravitino that referenced this issue Jan 9, 2025
…che#6117)

### What changes were proposed in this pull request?

 Fix the check of duplicated privileges

### Why are the changes needed?

Fix: apache#6116 

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Added new UT.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.8.0 Release v0.8.0 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants