Skip to content

PermissionService

PermissionService is a Unity Catalog API service that UnityCatalogServer uses to handle HTTP requests at /api/2.1/unity-catalog/permissions URL.

Method URL Handler SecurableType
GET /catalog/{name} getCatalogAuthorization catalog
GET /function/{name} getFunctionAuthorization function
GET /metastore/{name} getMetastoreAuthorization metastore
GET /registered_model/{name} getRegisteredModelAuthorization registered_model
GET /schema/{name} getSchemaAuthorization schema
GET /table/{name} getTableAuthorization table
GET /volume/{name} getVolumeAuthorization volume
Method URL Handler AuthorizeKey
PATCH /metastore/{name} updateMetastoreAuthorization metastore
...
$ http http://localhost:8081/api/2.1/unity-catalog/permissions/catalog/unity
HTTP/1.1 200 OK
content-length: 28
content-type: application/json
date: Thu, 3 Oct 2024 15:30:28 GMT
server: Armeria/1.28.4

{
    "privilege_assignments": []
}
Unity Catalog CLI

The above http command is equivalent to the following:

❯ ./bin/uc permission get --securable_type catalog --name unity
[]

Creating Instance

PermissionService takes the following to be created:

PermissionService is created when:

Get Authorization

HttpResponse getAuthorization(
  SecurableType securableType,
  String name)

getAuthorization...FIXME

Update Authorization

HttpResponse updateAuthorization(
  SecurableType securableType,
  String name,
  UpdatePermissions request)

updateAuthorization...FIXME