Skip to content

[security] Introduce USAGE privilege for database discovery #3668

Description

@loserwang1024

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

LIST_DATABASES currently filters databases using the DESCRIBE permission.

This creates a least-privilege problem:

  1. A user who only has permission on a specific table cannot see its parent database in
    listDatabases or Flink SHOW DATABASES.
  2. Granting DESCRIBE on the database is too permissive because database-level permissions
    are inherited by all tables in that database. The user can consequently discover and
    describe tables that they were not explicitly granted access to.

There is currently no permission that allows a user to discover or reference a database
without also granting access to its contents.

Solution

Image

Referring snowflake, introduce a new ACL operation named USAGE.

USAGE represents the minimum permission required to discover and reference a container
resource. It acts as a "door key" and does not grant permission to inspect, read, write,
create, alter, or drop objects inside the resource.

Anything else?

No response

Willingness to contribute

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions