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

[#2236] feat(core): Add the support of Group entity #2735

Merged
merged 8 commits into from
Mar 30, 2024

Conversation

qqqttt123
Copy link
Contributor

What changes were proposed in this pull request?

Add the support of Group entity

Why are the changes needed?

Fix: #2236

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Add a new UT.

@qqqttt123 qqqttt123 marked this pull request as draft March 29, 2024 09:35
@qqqttt123 qqqttt123 self-assigned this Mar 29, 2024
@qqqttt123 qqqttt123 marked this pull request as ready for review March 29, 2024 10:03
@qqqttt123 qqqttt123 requested a review from jerryshao March 29, 2024 10:09

/** The interface of a Group. The Group is the entity which contains users. */
@Evolving
public interface Group extends Auditable {
Copy link
Contributor

Choose a reason for hiding this comment

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

How does Gravitino know which user belongs to which group?

Copy link
Contributor Author

@qqqttt123 qqqttt123 Mar 29, 2024

Choose a reason for hiding this comment

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

We can get the groups by using user name in the AuthorizationFilter. We can use user name to retrieve the groups from the external user system like LDAP, RANGER, IAM.

I will add GroupMappingServiceProvider for accomplish this feature.

interface GroupMappingServiceProvider {
   List<String> getGroups(String user);
}

* manage group, just sets up the relationship between the metalake and the group. Metalake is like
* a concept of the organization. `AddGroup` means that a group enter an organization.
*/
public class GroupManager {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can merge the User and GroupManager together as "UserGroupManager", WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@jerryshao jerryshao merged commit 5b4eb40 into apache:main Mar 30, 2024
19 checks passed
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.

[Subtask] Add a new entity for group
2 participants