Updated on 2026-11-06 GMT+08:00

Object Authorization/Deauthorization Management

Permission Types Supported by Objects

  • Permissions supported by objects

    Object Type

    READ

    WRITE

    DESCRIBE

    EXECUTE

    INSERT

    SELECT

    UPDATE

    DELETE

    ALTER

    DROP

    DATABASE

    ✓

    ✓

    ✓

    -

    -

    -

    -

    -

    ✓

    ✓

    SCHEMA

    ✓

    ✓

    ✓

    -

    -

    -

    -

    -

    ✓

    ✓

    TABLE

    -

    -

    ✓

    -

    ✓

    ✓

    ✓

    ✓

    ✓

    ✓

    FUNCTION

    -

    -

    ✓

    ✓

    -

    -

    -

    -

    ✓

    ✓

    PATH

    ✓

    ✓

    -

    -

    -

    -

    -

    -

    -

    -

  • Permissions that can be granted to objects

    Aura Object

    Aura Permissions

    LakeFormation Object

    LakeFormation Permissions

    Description

    DATABASE

    ALL

    CATALOG

    ALL

    All permissions on a database object

    READ

    LIST_DATABASE

    Queries schemas in a database.

    WRITE

    CREATE_DATABASE

    Creates a schema in a database.

    DESCRIBE

    DESCRIBE

    Queries database metadata.

    ALTER

    ALTER

    Modifies database permissions. It is not supported currently.

    DROP

    DROP

    Deletes database permissions. It is not supported currently.

    SCHEMA

    ALL

    DATABASE

    ALL

    All permissions on a schema object

    READ

    LIST_TABLE

    LIST_FUNC

    Queries tables in a schema.

    Queries functions in a schema.

    WRITE

    CREATE_TABLE

    CREATE_FUNC

    Creates a table in a schema.

    Creates a function in a schema.

    DESCRIBE

    DESCRIBE

    Queries schema metadata.

    ALTER

    ALTER

    Modifies schema permissions.

    DROP

    DROP

    Deletes schema permissions.

    TABLE

    ALL

    TABLE

    ALL

    All permissions on a table object.

    DESCRIBE

    DESCRIBE

    Queries table metadata.

    INSERT

    INSERT

    Imports table data.

    SELECT

    SELECT

    Queries table data.

    UPDATE

    UPDATE

    Updates table data.

    DELETE

    DELETE

    Deletes table data.

    ALTER

    ALTER

    Modifies a table.

    DROP

    DROP

    Deletes a table.

    FUNCTION

    ALL

    FUNCTION

    ALL

    All permissions on a function object

    DESCRIBE

    DESCRIBE

    Queries function metadata.

    EXECUTE

    EXEC

    Executes a function.

    ALTER

    ALTER

    Modifies a function.

    DROP

    DROP

    Deletes a function.

    PATH

    READ

    URI

    READ

    Reads an OBS path.

    WRITE

    WRITE

    Writes an OBS path.

Notes and Constraints

Constraints on object authorization
  • Agency authorization restrictions: Permissions cannot be directly granted to agencies.
  • Batch authorization restrictions: Excessive authorization may cause LakeFormation to perform associated authorization on OBS paths.
  • Column permission restrictions: Table column permissions cannot be managed. (It will be supported in later versions.)
  • Owner restrictions: Only table owners can be changed.

Object Authorization Management

  • Object authorization syntax
    GRANT privileges [ WITH GRANT ] ON privilege_target TO grantee_list;

    WITH GRANT indicates cascading authorization, which means that the authorized user can grant the same permissions to other users.

    Specifically:

    • privileges can be:
      | [ READ, WRITE, DESCRIBE, EXECUTE, ALTER, DROP, INSERT, SELECT, UPDATE, DELETE ] [, ...]
      | ALL
      | ALL PRIVILEGE
      | ALL PRIVILEGES
    • privilege_target can be:
      | DATABASE name_list
      | SCHEMA name_list
      | TABLE qualified_name_list
      | FUNCTION function_with_argtypes_list
      | PATH obs_path_list
      | ALL TABLES IN SCHEMA name_list
      | ALL FUNCTIONS IN SCHEMA name_list

      Specifically:

      • name_list is as follows:
        | name [, ...]
      • qualified_name_list is as follows:
        | qualified_name [, ...]
      • function_with_argtypes_list is as follows:
        | function_with_argtypes [, ...]
      • obs_path_list is as follows:
        | SCONST [, ...]
    • grantee_list can be:
      | USER RoleId [, ...]
      | USER GROUP RoleId [, ...]
      | ROLE RoleId [, ...]

      Supported types of authorized objects:

      • USER username
      • USER GROUP groupname
      • ROLE rolename
  • Database object authorization
    • Grant database permissions to a user.
      GRANT READ [ WITH GRANT ] ON DATABASE database1 TO USER user1;
      GRANT WRITE [ WITH GRANT ] ON DATABASE database1 TO USER user1;
      GRANT DESCRIBE [ WITH GRANT ] ON DATABASE database1 TO USER user1;
      GRANT ALTER [ WITH GRANT ] ON DATABASE database1 TO USER user1;
      GRANT DROP  [ WITH GRANT ] ON DATABASE database1 TO USER user1;
      GRANT ALL   [ WITH GRANT ] ON DATABASE database1 TO USER user1;
    • Grant database permissions to a user group.
      GRANT READ  [ WITH GRANT ] ON DATABASE database1 TO USER GROUP group1;
      GRANT WRITE [ WITH GRANT ] ON DATABASE database1 TO USER GROUP group1;
      GRANT DESCRIBE [ WITH GRANT ] ON DATABASE database1 TO USER GROUP group1;
      GRANT ALTER [ WITH GRANT ] ON DATABASE database1 TO USER GROUP group1;
      GRANT DROP  [ WITH GRANT ] ON DATABASE database1 TO USER GROUP group1;
      GRANT ALL   [ WITH GRANT ] ON DATABASE database1 TO USER GROUP group1;
    • Grant database permissions to a role.
      GRANT READ  [ WITH GRANT ] ON DATABASE database1 TO ROLE role1;
      GRANT WRITE [ WITH GRANT ] ON DATABASE database1 TO ROLE role1;
      GRANT DESCRIBE [ WITH GRANT ] ON DATABASE database1 TO ROLE role1;
      GRANT ALTER [ WITH GRANT ] ON DATABASE database1 TO ROLE role1;
      GRANT DROP  [ WITH GRANT ] ON DATABASE database1 TO ROLE role1;
      GRANT ALL   [ WITH GRANT ] ON DATABASE database1 TO ROLE role1;
  • Schema object authorization
    • Grant schema permissions to a user.
      GRANT READ  [ WITH GRANT ] ON SCHEMA schema1 TO USER user1;
      GRANT WRITE [ WITH GRANT ] ON SCHEMA schema1 TO USER user1;
      GRANT DESCRIBE [ WITH GRANT ] ON SCHEMA schema1 TO USER user1;
      GRANT ALTER [ WITH GRANT ] ON SCHEMA schema1 TO USER user1;
      GRANT DROP  [ WITH GRANT ] ON SCHEMA schema1 TO USER user1;
      GRANT ALL   [ WITH GRANT ] ON SCHEMA schema1 TO USER user1;
    • Grant schema permissions to a user group.
      GRANT READ  [ WITH GRANT ] ON SCHEMA schema1 TO USER GROUP group1;
      GRANT WRITE [ WITH GRANT ] ON SCHEMA schema1 TO USER GROUP group1;
      GRANT DESCRIBE [ WITH GRANT ] ON SCHEMA schema1 TO USER GROUP group1;
      GRANT ALTER [ WITH GRANT ] ON SCHEMA schema1 TO USER GROUP group1;
      GRANT DROP  [ WITH GRANT ] ON SCHEMA schema1 TO USER GROUP group1;
      GRANT ALL   [ WITH GRANT ] ON SCHEMA schema1 TO USER GROUP group1;
    • Grant schema permissions to a role.
      GRANT READ  [ WITH GRANT ] ON SCHEMA schema1 TO ROLE role1;
      GRANT WRITE [ WITH GRANT ] ON SCHEMA schema1 TO ROLE role1;
      GRANT DESCRIBE [ WITH GRANT ] ON SCHEMA schema1 TO ROLE role1;
      GRANT ALTER [ WITH GRANT ] ON SCHEMA schema1 TO ROLE role1;
      GRANT DROP  [ WITH GRANT ] ON SCHEMA schema1 TO ROLE role1;
      GRANT ALL   [ WITH GRANT ] ON SCHEMA schema1 TO ROLE role1;
  • Table object authorization
    • Grant table permissions to a user.
      GRANT DESCRIBE [ WITH GRANT ] ON TABLE s1.table1 TO USER user1;
      GRANT INSERT [ WITH GRANT ] ON TABLE s1.table1 TO USER user1;
      GRANT SELECT [ WITH GRANT ] ON TABLE s1.table1 TO USER user1;
      GRANT UPDATE [ WITH GRANT ] ON TABLE s1.table1 TO USER user1;
      GRANT DELETE [ WITH GRANT ] ON TABLE s1.table1 TO USER user1;
      GRANT ALTER [ WITH GRANT ] ON TABLE s1.table1 TO USER user1;
      GRANT DROP  [ WITH GRANT ] ON TABLE s1.table1 TO USER user1;
      GRANT ALL   [ WITH GRANT ] ON TABLE s1.table1 TO USER user1;

      The following special authorization operations are also supported:

      GRANT DESCRIBE,INSERT,SELECT,UPDATE,DELETE,ALTER,DROP,ALL  [ WITH GRANT ]  ON ALL TABLES IN SCHEMA schema1 TO USER user1;
    • Grant table permissions to a user group.
      GRANT DESCRIBE [ WITH GRANT ] ON TABLE s1.table1 TO USER GROUP group1;
      GRANT INSERT [ WITH GRANT ] ON TABLE s1.table1 TO USER GROUP group1;
      GRANT SELECT [ WITH GRANT ] ON TABLE s1.table1 TO USER GROUP group1;
      GRANT UPDATE [ WITH GRANT ] ON TABLE s1.table1 TO USER GROUP group1;
      GRANT DELETE [ WITH GRANT ] ON TABLE s1.table1 TO USER GROUP group1;
      GRANT ALTER [ WITH GRANT ] ON TABLE s1.table1 TO USER GROUP group1;
      GRANT DROP  [ WITH GRANT ] ON TABLE s1.table1 TO USER GROUP group1;
      GRANT ALL   [ WITH GRANT ] ON TABLE s1.table1 TO USER GROUP group1;

      The following special authorization operations are also supported:

      GRANT DESCRIBE,INSERT,SELECT,UPDATE,DELETE,ALTER,DROP,ALL   [ WITH GRANT ] ON ALL TABLES IN SCHEMA schema1 TO USER GROUP group1;
    • Grant table permissions to a role.
      GRANT DESCRIBE [ WITH GRANT ] ON TABLE s1.table1 TO ROLE role1;
      GRANT INSERT [ WITH GRANT ] ON TABLE s1.table1 TO ROLE role1;
      GRANT SELECT [ WITH GRANT ] ON TABLE s1.table1 TO ROLE role1;
      GRANT UPDATE [ WITH GRANT ] ON TABLE s1.table1 TO ROLE role1;
      GRANT DELETE [ WITH GRANT ] ON TABLE s1.table1 TO ROLE role1;
      GRANT ALTER [ WITH GRANT ] ON TABLE s1.table1 TO ROLE role1;
      GRANT DROP  [ WITH GRANT ] ON TABLE s1.table1 TO ROLE role1;
      GRANT ALL   [ WITH GRANT ] ON TABLE s1.table1 TO ROLE role1;

      The following special authorization operations are also supported:

      GRANT DESCRIBE,INSERT,SELECT,UPDATE,DELETE,ALTER,DROP,ALL  [ WITH GRANT ] ON ALL TABLES IN SCHEMA schema1 TO ROLE role1;
  • Function object authorization
    • Grant function permissions to a user.
      GRANT DESCRIBE [ WITH GRANT ] ON FUNCTION func1(s1 int[]) TO USER user1;
      GRANT EXECUTE [ WITH GRANT ] ON FUNCTION func1(s1 int[]) TO USER user1;
      GRANT ALTER [ WITH GRANT ] ON FUNCTION func1(s1 int[]) TO USER user1;
      GRANT DROP  [ WITH GRANT ] ON FUNCTION func1(s1 int[]) TO USER user1;
      GRANT ALL   [ WITH GRANT ] ON FUNCTION func1(s1 int[]) TO USER user1;

      The following special authorization operations are also supported:

      GRANT DESCRIBE,EXECUTE,ALTER,DROP,ALL   [ WITH GRANT ] ON ALL FUNCTIONS IN SCHEMA schema1 TO USER user1;
    • Grant function permissions to a user group.
      GRANT DESCRIBE [ WITH GRANT ] ON FUNCTION func1(s1 int[]) TO USER GROUP group1;
      GRANT EXECUTE [ WITH GRANT ] ON FUNCTION func1(s1 int[]) TO USER GROUP group1;
      GRANT ALTER [ WITH GRANT ] ON FUNCTION func1(s1 int[]) TO USER GROUP group1;
      GRANT DROP  [ WITH GRANT ] ON FUNCTION func1(s1 int[]) TO USER GROUP group1;
      GRANT ALL   [ WITH GRANT ] ON FUNCTION func1(s1 int[]) TO USER GROUP group1;

      The following special authorization operations are also supported:

      GRANT DESCRIBE,EXECUTE,ALTER,DROP,ALL   [ WITH GRANT ] ON ALL FUNCTIONS IN SCHEMA schema1 TO USER GROUP group1;
    • Grant function permissions to a role.
      GRANT DESCRIBE [ WITH GRANT ] ON FUNCTION func1(s1 int[]) TO ROLE role1;
      GRANT EXECUTE [ WITH GRANT ] ON FUNCTION func1(s1 int[]) TO ROLE role1;
      GRANT ALTER [ WITH GRANT ] ON FUNCTION func1(s1 int[]) TO ROLE role1;
      GRANT DROP  [ WITH GRANT ] ON FUNCTION func1(s1 int[]) TO ROLE role1;
      GRANT ALL   [ WITH GRANT ] ON FUNCTION func1(s1 int[]) TO ROLE role1;

      The following special authorization operations are also supported:

      GRANT DESCRIBE,EXECUTE,ALTER,DROP,ALL   [ WITH GRANT ] ON ALL FUNCTIONS IN SCHEMA schema1 TO ROLE role1;
  • Path object authorization
    • Grant path permissions to a user.
      GRANT READ [ WITH GRANT ] ON PATH 'obs://bucket/path1' TO USER user1;
      GRANT WRITE [ WITH GRANT ] ON PATH 'obs://bucket/path1' TO USER user1;
      GRANT ALL [ WITH GRANT ] ON PATH 'obs://bucket/path1' TO USER user1;
    • Grant path permissions to a user group.
      GRANT READ [ WITH GRANT ] ON PATH 'obs://bucket/path1' TO USER GROUP group1;
      GRANT WRITE [ WITH GRANT ] ON PATH 'obs://bucket/path1' TO USER GROUP group1;
      GRANT ALL [ WITH GRANT ] ON PATH 'obs://bucket/path1' TO USER GROUP group1;
    • Grant path permissions to a role.
      GRANT READ [ WITH GRANT ] ON PATH 'obs://bucket/path1' TO ROLE role1;
      GRANT WRITE [ WITH GRANT ] ON PATH 'obs://bucket/path1' TO ROLE role1;
      GRANT ALL [ WITH GRANT ] ON PATH 'obs://bucket/path1' TO ROLE role1;

Revoking Authorization

  • Syntax for revoking authorization
    REVOKE privileges [ WITH GRANT ] ON privilege_target FROM grantee_list;

    WITH GRANT indicates cascading authorization, which means that the authorized user can grant the same permissions to other users.

    Specifically:

    • privileges can be:
      | [ READ, WRITE, DESCRIBE, EXECUTE, ALTER, DROP, INSERT, SELECT, UPDATE, DELETE ] [, ...]
      | ALL
      | ALL PRIVILEGE
      | ALL PRIVILEGES
    • privilege_target can be:
      | DATABASE name_list
      | SCHEMA name_list
      | TABLE qualified_name_list
      | FUNCTION function_with_argtypes_list
      | PATH obs_path_list
      | ALL TABLES IN SCHEMA name_list
      | ALL FUNCTIONS IN SCHEMA name_list

      Specifically:

      • name_list is as follows:
        | name [, ...]
      • qualified_name_list is as follows:
        | qualified_name [, ...]
      • function_with_argtypes_list is as follows:
        | function_with_argtypes [, ...]
      • obs_path_list is as follows:
        | SCONST [, ...]
    • grantee_list can be:
      | USER RoleId [, ...]
      | USER GROUP RoleId [, ...]
      | ROLE RoleId [, ...]
  • Database object authorization revocation
    • Revoke database permissions from a user.
      REVOKE READ [ WITH GRANT ] ON DATABASE database1 FROM USER user1;
      REVOKE WRITE [ WITH GRANT ] ON DATABASE database1 FROM USER user1;
      REVOKE DESCRIBE [ WITH GRANT ] ON DATABASE database1 FROM USER user1;
      REVOKE ALTER [ WITH GRANT ] ON DATABASE database1 FROM USER user1;
      REVOKE DROP  [ WITH GRANT ] ON DATABASE database1 FROM USER user1;
      REVOKE ALL   [ WITH GRANT ] ON DATABASE database1 FROM USER user1;
    • Revoke database permissions from a user group.
      REVOKE READ  [ WITH GRANT ] ON DATABASE database1 FROM USER GROUP group1;
      REVOKE WRITE [ WITH GRANT ] ON DATABASE database1 FROM USER GROUP group1;
      REVOKE DESCRIBE [ WITH GRANT ] ON DATABASE database1 FROM USER GROUP group1;
      REVOKE ALTER [ WITH GRANT ] ON DATABASE database1 FROM USER GROUP group1;
      REVOKE DROP  [ WITH GRANT ] ON DATABASE database1 FROM USER GROUP group1;
      REVOKE ALL   [ WITH GRANT ] ON DATABASE database1 FROM USER GROUP group1;
    • Revoke database permissions from a role.
      REVOKE READ  [ WITH GRANT ] ON DATABASE database1 FROM ROLE role1;
      REVOKE WRITE [ WITH GRANT ] ON DATABASE database1 FROM ROLE role1;
      REVOKE DESCRIBE [ WITH GRANT ] ON DATABASE database1 FROM ROLE role1;
      REVOKE ALTER [ WITH GRANT ] ON DATABASE database1 FROM ROLE role1;
      REVOKE DROP  [ WITH GRANT ] ON DATABASE database1 FROM ROLE role1;
      REVOKE ALL   [ WITH GRANT ] ON DATABASE database1 FROM ROLE role1;
  • Schema object authorization revocation
    • Revoke schema permissions from a user.
      REVOKE READ  [ WITH GRANT ] ON SCHEMA schema1 FROM USER user1;
      REVOKE WRITE [ WITH GRANT ] ON SCHEMA schema1 FROM USER user1;
      REVOKE DESCRIBE [ WITH GRANT ] ON SCHEMA schema1 FROM USER user1;
      REVOKE ALTER [ WITH GRANT ] ON SCHEMA schema1 FROM USER user1;
      REVOKE DROP  [ WITH GRANT ] ON SCHEMA schema1 FROM USER user1;
      REVOKE ALL   [ WITH GRANT ] ON SCHEMA schema1 FROM USER user1;
    • Revoke schema permissions from a user group.
      REVOKE READ  [ WITH GRANT ] ON SCHEMA schema1 FROM USER GROUP group1;
      REVOKE WRITE [ WITH GRANT ] ON SCHEMA schema1 FROM USER GROUP group1;
      REVOKE DESCRIBE [ WITH GRANT ] ON SCHEMA schema1 FROM USER GROUP group1;
      REVOKE ALTER [ WITH GRANT ] ON SCHEMA schema1 FROM USER GROUP group1;
      REVOKE DROP  [ WITH GRANT ] ON SCHEMA schema1 FROM USER GROUP group1;
      REVOKE ALL   [ WITH GRANT ] ON SCHEMA schema1 FROM USER GROUP group1;
    • Revoke schema permissions from a role.
      REVOKE READ  [ WITH GRANT ] ON SCHEMA schema1 FROM ROLE role1;
      REVOKE WRITE [ WITH GRANT ] ON SCHEMA schema1 FROM ROLE role1;
      REVOKE DESCRIBE [ WITH GRANT ] ON SCHEMA schema1 FROM ROLE role1;
      REVOKE ALTER [ WITH GRANT ] ON SCHEMA schema1 FROM ROLE role1;
      REVOKE DROP  [ WITH GRANT ] ON SCHEMA schema1 FROM ROLE role1;
      REVOKE ALL   [ WITH GRANT ] ON SCHEMA schema1 FROM ROLE role1;
  • Table object authorization revocation
    • Revoke table permissions from a user.
      REVOKE DESCRIBE [ WITH GRANT ] ON TABLE s1.table1 FROM USER user1;
      REVOKE INSERT [ WITH GRANT ] ON TABLE s1.table1 FROM USER user1;
      REVOKE SELECT [ WITH GRANT ] ON TABLE s1.table1 FROM USER user1;
      REVOKE UPDATE [ WITH GRANT ] ON TABLE s1.table1 FROM USER user1;
      REVOKE DELETE [ WITH GRANT ] ON TABLE s1.table1 FROM USER user1;
      REVOKE ALTER [ WITH GRANT ] ON TABLE s1.table1 FROM USER user1;
      REVOKE DROP  [ WITH GRANT ] ON TABLE s1.table1 FROM USER user1;
      REVOKE ALL   [ WITH GRANT ] ON TABLE s1.table1 FROM USER user1;

      The following special operations are also supported:

      REVOKE DESCRIBE,INSERT,SELECT,UPDATE,DELETE,ALTER,DROP,ALL  [ WITH GRANT ]  ON ALL TABLES IN SCHEMA schema1 FROM USER user1;
    • Revoke table permissions from a user group.
      REVOKE DESCRIBE [ WITH GRANT ] ON TABLE s1.table1 FROM USER GROUP group1;
      REVOKE INSERT [ WITH GRANT ] ON TABLE s1.table1 FROM USER GROUP group1;
      REVOKE SELECT [ WITH GRANT ] ON TABLE s1.table1 FROM USER GROUP group1;
      REVOKE UPDATE [ WITH GRANT ] ON TABLE s1.table1 FROM USER GROUP group1;
      REVOKE DELETE [ WITH GRANT ] ON TABLE s1.table1 FROM USER GROUP group1;
      REVOKE ALTER [ WITH GRANT ] ON TABLE s1.table1 FROM USER GROUP group1;
      REVOKE DROP  [ WITH GRANT ] ON TABLE s1.table1 FROM USER GROUP group1;
      REVOKE ALL   [ WITH GRANT ] ON TABLE s1.table1 FROM USER GROUP group1;

      The following special operations are also supported:

      REVOKE DESCRIBE,INSERT,SELECT,UPDATE,DELETE,ALTER,DROP,ALL   [ WITH GRANT ] ON ALL TABLES IN SCHEMA schema1 FROM USER GROUP group1;
    • Revoke table permissions from a role.
      REVOKE DESCRIBE [ WITH GRANT ] ON TABLE s1.table1 FROM ROLE role1;
      REVOKE INSERT [ WITH GRANT ] ON TABLE s1.table1 FROM ROLE role1;
      REVOKE SELECT [ WITH GRANT ] ON TABLE s1.table1 FROM ROLE role1;
      REVOKE UPDATE [ WITH GRANT ] ON TABLE s1.table1 FROM ROLE role1;
      REVOKE DELETE [ WITH GRANT ] ON TABLE s1.table1 FROM ROLE role1;
      REVOKE ALTER [ WITH GRANT ] ON TABLE s1.table1 FROM ROLE role1;
      REVOKE DROP  [ WITH GRANT ] ON TABLE s1.table1 FROM ROLE role1;
      REVOKE ALL   [ WITH GRANT ] ON TABLE s1.table1 FROM ROLE role1;

      The following special operations are also supported:

      REVOKE DESCRIBE,INSERT,SELECT,UPDATE,DELETE,ALTER,DROP,ALL  [ WITH GRANT ] ON ALL TABLES IN SCHEMA schema1 FROM ROLE role1;
  • Function object authorization revocation
    • Revoke function permissions from a user.
      REVOKE DESCRIBE [ WITH GRANT ] ON FUNCTION func1(s1 int[]) FROM USER user1;
      REVOKE EXECUTE [ WITH GRANT ] ON FUNCTION func1(s1 int[]) FROM USER user1;
      REVOKE ALTER [ WITH GRANT ] ON FUNCTION func1(s1 int[]) FROM USER user1;
      REVOKE DROP  [ WITH GRANT ] ON FUNCTION func1(s1 int[]) FROM USER user1;
      REVOKE ALL   [ WITH GRANT ] ON FUNCTION func1(s1 int[]) FROM USER user1;

      The following special operations are also supported:

      REVOKE DESCRIBE,EXECUTE,ALTER,DROP,ALL   [ WITH GRANT ] ON ALL FUNCTIONS IN SCHEMA schema1 FROM USER user1;
    • Revoke function permissions from a user group.
      REVOKE DESCRIBE [ WITH GRANT ] ON FUNCTION func1(s1 int[]) FROM USER GROUP group1;
      REVOKE EXECUTE [ WITH GRANT ] ON FUNCTION func1(s1 int[]) FROM USER GROUP group1;
      REVOKE ALTER [ WITH GRANT ] ON FUNCTION func1(s1 int[]) FROM USER GROUP group1;
      REVOKE DROP  [ WITH GRANT ] ON FUNCTION func1(s1 int[]) FROM USER GROUP group1;
      REVOKE ALL   [ WITH GRANT ] ON FUNCTION func1(s1 int[]) FROM USER GROUP group1;

      The following special operations are also supported:

      REVOKE DESCRIBE,EXECUTE,ALTER,DROP,ALL   [ WITH GRANT ] ON ALL FUNCTIONS IN SCHEMA schema1 FROM USER GROUP group1;
    • Revoke function permissions from a role.
      REVOKE DESCRIBE [ WITH GRANT ] ON FUNCTION func1(s1 int[]) FROM ROLE role1;
      REVOKE EXECUTE [ WITH GRANT ] ON FUNCTION func1(s1 int[]) FROM ROLE role1;
      REVOKE ALTER [ WITH GRANT ] ON FUNCTION func1(s1 int[]) FROM ROLE role1;
      REVOKE DROP  [ WITH GRANT ] ON FUNCTION func1(s1 int[]) FROM ROLE role1;
      REVOKE ALL   [ WITH GRANT ] ON FUNCTION func1(s1 int[]) FROM ROLE role1;

      The following special operations are also supported:

      REVOKE DESCRIBE,EXECUTE,ALTER,DROP,ALL   [ WITH GRANT ] ON ALL FUNCTIONS IN SCHEMA schema1 FROM ROLE role1;
  • Path object authorization revocation
    • Revoke path permissions from a user.
      REVOKE READ  [ WITH GRANT ] ON PATH 'obs://bucket/path1' FROM USER user1;
      REVOKE WRITE [ WITH GRANT ] ON PATH 'obs://bucket/path1' FROM USER user1;
      REVOKE ALL   [ WITH GRANT ] ON PATH 'obs://bucket/path1' FROM USER user1;
    • Revoke path permissions from a user group.
      REVOKE READ  [ WITH GRANT ] ON PATH 'obs://bucket/path1' FROM USER GROUP group1;
      REVOKE WRITE [ WITH GRANT ] ON PATH 'obs://bucket/path1' FROM USER GROUP group1;
      REVOKE ALL   [ WITH GRANT ] ON PATH 'obs://bucket/path1' FROM USER GROUP group1;
    • Revoke path permissions from a role.
      REVOKE READ  [ WITH GRANT ] ON PATH 'obs://bucket/path1' FROM ROLE role1;
      REVOKE WRITE [ WITH GRANT ] ON PATH 'obs://bucket/path1' FROM ROLE role1;
      REVOKE ALL   [ WITH GRANT ] ON PATH 'obs://bucket/path1' FROM ROLE role1;

Object Owner Management

  • Change the table owner.
    ALTER TABLE table_name OWNER TO USER username; 
    ALTER TABLE table_name OWNER TO USER GROUP groupname;
  • Query the permissions granted to an object.
    • Query the permissions granted to a user.
      SELECT * FROM pg_show_grants('USER', 'username');  
    • Query the permissions granted to a user group.
      SELECT * FROM pg_show_grants('GROUP', 'groupname');  
    • Query the permissions granted to a role.
      SELECT * FROM pg_show_grants('ROLE', 'rolename');
    • Query the permissions granted to a database.
      SELECT * FROM pg_show_grants('DATABASE', 'databasename');  
    • Query the permissions granted to a table.
      SELECT * FROM pg_show_grants('TABLE', 'schemaname.tablename');  
    • Query the permissions granted to a function.
      SELECT * FROM pg_show_grants('FUNCTION', 'functionname');

Authorization/Authorization Revocation Examples

  • Table authorization
    GRANT SELECT, INSERT ON TABLE schema1.table1 TO USER user1;
    GRANT ALL ON TABLE schema1.table1 TO ROLE role1;
  • Schema authorization
    GRANT READ ON SCHEMA schema1 TO USER GROUP group1;
  • Database authorization
    GRANT DESCRIBE ON DATABASE database1 TO USER user1;
  • Function authorization
    GRANT EXECUTE ON FUNCTION func1(int[]) TO USER user1;
  • OBS path authorization
    GRANT READ ON PATH 'obs://bucket/path1' TO ROLE role1;
  • Batch authorization
    GRANT ALL ON ALL TABLES IN SCHEMA schema1 TO USER user1;
    GRANT ALL ON ALL FUNCTIONS IN SCHEMA schema1 TO ROLE role1;
  • Cascading authorization (Authorized users can grant permissions to other users.)
    GRANT SELECT ON TABLE t1 TO USER user1 WITH GRANT;
  • Authorization revocation
    REVOKE SELECT ON TABLE schema1.table1 FROM USER user1; 
    REVOKE ALL ON ALL TABLES IN SCHEMA schema1 FROM ROLE role1;