apache / apache/gravitino

[Improvement] Support option to auto add new users to Gravitino

Open
#9,902 6 comments 1 reaction 1 assignee Claimed by @bharos View on GitHub
improvement
Dominant language
Java
Stars
3.2k
Forks
935
Avg merge
1d 16h
Merged PRs (30d)
298

Description

### What would you like to be improved?

Currently, If a user is not present in a metalake, Gravitino throws an error
```
2026-02-06 00:51:11 WARN [MetadataFilterHelper-ThreadPool-149] JcasbinAuthorizer:262 - Can not get user user in metalake metalake
org.apache.gravitino.exceptions.NoSuchUserException: User user does not exist in the metalake metalake
at org.apache.gravitino.authorization.UserGroupManager.getUser(UserGroupManager.java:122) ~[gravitino-core-1.1.1-SNAPSHOT.jar:?
at org.apache.gravitino.authorization.AccessControlManager.lambda$getUser$2(AccessControlManager.java:84) ~[gravitino-core-1.1.1-SNAPSHOT.jar:?]
```

This can be an overhead, to add users when an employee joins a company etc.. ? Also while onboarding to Gravitino, we need to create 1000s of users.
Why not auto-add ? It doesn't give them any permissions still, until they have privileges granted

Not suggesting to change the behavior by default, but is it reasonable to add a config, like
```
# Configuration proposal
gravitino.authorization.auto-create-user: false # default for backward compatibility
gravitino.authorization.auto-create-user.metalakes: "*" # or comma-separated list

# Alternative: per-metalake configuration
gravitino.authorization.metalakes.roku.auto-create-user: true
```

### How should we improve?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.