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

[#3132] improvement(core): Use a more elegant validation of User, Group and Role NameIdentifier #3143

Merged
merged 6 commits into from
Apr 24, 2024

Conversation

lw-yang
Copy link
Contributor

@lw-yang lw-yang commented Apr 23, 2024

What changes were proposed in this pull request?

add checkUser, checkGroup, checkRole in NameIdentifier

Why are the changes needed?

Fix: #3132

Does this PR introduce any user-facing change?

N/A

How was this patch tested?

ut

@lw-yang
Copy link
Contributor Author

lw-yang commented Apr 23, 2024

@yuqi1129 @qqqttt123 could you please help to review it

@lw-yang
Copy link
Contributor Author

lw-yang commented Apr 23, 2024

@qqqttt123 I was wondering if we should move ofUser... in AuthorizationUtils to NameIdentifier, which is be aligned with other nameIdentifier creation

@qqqttt123
Copy link
Contributor

Could you avoid the concept of NameIdentifier to users? User/Role/Group use some virtual catalog, schema. It's not visible to users. The api module will be exposed to users.

@lw-yang
Copy link
Contributor Author

lw-yang commented Apr 23, 2024

Could you avoid the concept of NameIdentifier to users? User/Role/Group use some virtual catalog, schema. It's not visible to users. The api module will be exposed to users.

got it, i will move it into AuthorizationUtils

@jerryshao
Copy link
Contributor

Yeah, it is not good to expose the name identifier for user, group to the API. Even if we expose this, user may not know how to use it.

@jerryshao jerryshao requested a review from qqqttt123 April 24, 2024 02:02
@qqqttt123 qqqttt123 changed the title [#3132] feat(api,core): Perform a more elegant validation of User, Group and Role NameIdentifier [#3132] feat(api,core): Add a more elegant validation of User, Group and Role NameIdentifier Apr 24, 2024
@lw-yang lw-yang changed the title [#3132] feat(api,core): Add a more elegant validation of User, Group and Role NameIdentifier [#3132] feat(core): Add a more elegant validation of User, Group and Role NameIdentifier Apr 24, 2024
Copy link
Contributor

@qqqttt123 qqqttt123 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 @lw-yang @jerryshao

@qqqttt123 qqqttt123 added branch-0.5 need backport Issues that need to backport to another branch labels Apr 24, 2024
@qqqttt123 qqqttt123 changed the title [#3132] feat(core): Add a more elegant validation of User, Group and Role NameIdentifier [#3132] improvement(core): Add a more elegant validation of User, Group and Role NameIdentifier Apr 24, 2024
@qqqttt123 qqqttt123 changed the title [#3132] improvement(core): Add a more elegant validation of User, Group and Role NameIdentifier [#3132] improvement(core): Use a more elegant validation of User, Group and Role NameIdentifier Apr 24, 2024
Copy link
Contributor

@jerryshao jerryshao left a comment

Choose a reason for hiding this comment

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

LGTM.

@jerryshao jerryshao merged commit 1200886 into apache:main Apr 24, 2024
22 checks passed
github-actions bot pushed a commit that referenced this pull request Apr 24, 2024
…up and Role NameIdentifier (#3143)

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

add `checkUser`, `checkGroup`, `checkRole` in `NameIdentifier`

### Why are the changes needed?

Fix: #3132 

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

N/A

### How was this patch tested?

ut

---------

Co-authored-by: yangliwei <[email protected]>
diqiu50 pushed a commit to diqiu50/gravitino that referenced this pull request Jun 13, 2024
…r, Group and Role NameIdentifier (apache#3143)

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

add `checkUser`, `checkGroup`, `checkRole` in `NameIdentifier`

### Why are the changes needed?

Fix: apache#3132 

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

N/A

### How was this patch tested?

ut

---------

Co-authored-by: yangliwei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need backport Issues that need to backport to another branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement] Perform a more elegant validation of User, Group and Role NameIdentifier
3 participants