Skip to content

[Bug report] Service admins cannot bootstrap RBAC system with no users #9903

@bharos

Description

@bharos

Version

main branch

Describe what's wrong

Service admins configured via gravitino.authorization.serviceAdmins cannot bootstrap the RBAC system in a fresh Gravitino installation. While they can create metalakes, they are blocked from creating users, roles, and granting permissions, rendering fresh installations with authorization enabled completely unusable.

I'm not sure if there's a way to add user ?

Error message and/or stacktrace

Error says user, ie. service admin is not authorized to do operations like add_user etc..

How to reproduce

Configure a fresh Gravitino instance with authorization enabled:

gravitino.authorization.enable=true
gravitino.authorization.serviceAdmins=admin

Start with empty database (no metalakes, no users, no roles)
As service admin "admin", attempt to:

# Step 1: Create metalake -  WORKS
POST /api/metalakes {"name": "production"}

# Step 2: Create user - FAILS
POST /api/metalakes/production/users {"name": "alice"}
# Error: "Not authorized - need METALAKE::OWNER || METALAKE::MANAGE_USERS"

# Step 3: Create role -  FAILS  
POST /api/metalakes/production/roles {"name": "admin_role", ...}
# Error: "Not authorized - need METALAKE::OWNER || METALAKE::CREATE_ROLE"

# Step 4: Grant role -  FAILS
PUT /api/metalakes/production/permissions/users/alice/grant
# Error: "Not authorized - need METALAKE::OWNER || METALAKE::MANAGE_GRANTS"

How can we proceed from initial state to add users etc.. to the system?

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions