Skip to content

Commit d147b1f

Browse files
Basic Server Access Control, Securables and Client API
1 parent 95ccd2b commit d147b1f

File tree

5 files changed

+38
-30
lines changed

5 files changed

+38
-30
lines changed

docs/basic-server-access-control/index.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,24 @@
1212
* The root of the hierarchy is a catalog.
1313
* There is a new concept of a metastore, which is primarily a resource to assign server-level privileges with.
1414

15-
??? note
15+
!!! note "Permissions and Privilege Assignments"
16+
**Permissions** and **Privilege Assignments** are synonyms.
17+
18+
??? note "Commit"
1619
Basic Server Access Control is available since [this commit]({{ uc.commit }}/f9a9bf1f84cb4c7fa03ecb569ae19f306a7cd85b).
1720

21+
## Securables
22+
23+
Unity Catalog supports the following types of securables to apply (_create_) permissions to:
24+
25+
1. `catalog`
26+
1. `function`
27+
1. `metastore`
28+
1. `registered_model`
29+
1. `schema`
30+
1. `table`
31+
1. `volume`
32+
1833
## Privileges
1934

2035
The initial set of privileges are as follows:
@@ -35,14 +50,14 @@ Privilege | Description
3550

3651
## Unity Catalog CLI
3752

38-
The CLI interface provides a new `permission` command.
53+
The CLI interface provides a new [permission](../cli/PermissionCli.md) command.
3954

4055
``` bash
4156
./bin/uc permission create \
4257
--securable_type catalog \
4358
--name mycatalog \
4459
--principal [email protected] \
45-
--privilege "CREATE CATALOG`
60+
--privilege "CREATE CATALOG"
4661
```
4762

4863
``` bash

docs/cli/PermissionCli.md

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,6 @@ Valid sub-commands for permission are: get, create, delete
99
For detailed help on permission sub-commands, use bin/uc permission <sub-command> --help
1010
```
1111

12-
!!! note
13-
**Permissions** and **Privilege Assignments** are synonyms.
14-
15-
## Securable Types
16-
17-
There are the following types of the securables in Unity Catalog:
18-
19-
1. `catalog`
20-
1. `function`
21-
1. `metastore`
22-
1. `registered_model`
23-
1. `schema`
24-
1. `table`
25-
1. `volume`
26-
2712
## Handle Command Line { #handle }
2813

2914
```java
@@ -34,13 +19,13 @@ void handle(
3419

3520
`handle` handles the given `cmd`.
3621

37-
`handle` creates a `GrantsApi` (with the given [ApiClient](../client/ApiClient.md)).
22+
`handle` creates a [GrantsApi](../client/GrantsApi.md) (with the given [ApiClient](../client/ApiClient.md)).
3823

3924
Subcommand | Handler | API Handlers
4025
-|-|-
41-
`create` | [updatePermission](#updatePermission) | `GrantsApi`
42-
`delete` | [updatePermission](#updatePermission) | `GrantsApi`
43-
`get` | [getPermission](#getPermission) | `GrantsApi`
26+
`create` | [updatePermission](#updatePermission) | [GrantsApi](../client/GrantsApi.md)
27+
`delete` | [updatePermission](#updatePermission) | [GrantsApi](../client/GrantsApi.md)
28+
`get` | [getPermission](#getPermission) | [GrantsApi](../client/GrantsApi.md)
4429

4530
---
4631

@@ -84,4 +69,4 @@ Optional Params:
8469
* `name`
8570
* `principal`
8671

87-
`getPermission` requests the `GrantsApi` for the privilege assignments of the given `name` (of `securable_type` type).
72+
`getPermission` requests the [GrantsApi](../client/GrantsApi.md) for the privilege assignments of the given `name` (of `securable_type` type).

docs/client/ApiClient.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# ApiClient
22

3-
`ApiClient` is an API client of [Unity Catalog Localhost Reference Server](../server/index.md).
4-
5-
??? note "OpenAPI Generator"
6-
`ApiClient` was auto-generated using [OpenAPI Generator]({{ openapi.home }}) based on Unity Catalog's [OpenAPI specification]({{ uc.github }}/api/all.yaml).
7-
8-
[sbt-openapi-generator]({{ openapi.github }}/sbt-openapi-generator) 7.5.0 is used in the `client` sbt module of the `unitycatalog` project.
3+
`ApiClient` is an API client of the [Unity Catalog Server](../server/index.md).
94

105
`ApiClient` uses `http://localhost:8080/api/2.1/unity-catalog` as the [default base URI](#getDefaultBaseUri) (unless [overriden](#updateBaseUri)).
116

docs/client/GrantsApi.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# GrantsApi
2+
3+
`GrantsApi` is...FIXME

docs/client/index.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
# Unity Catalog's Client API
1+
# Client API
2+
3+
Client API uses Unity Catalog's [OpenAPI specification]({{ uc.github }}/api/all.yaml) to generate the required classes (using [OpenAPI Generator](#openapi-generator)) to communicate with [Unity Catalog Server](../server/index.md).
4+
5+
The main communication client is [ApiClient](ApiClient.md).
6+
7+
## OpenAPI Generator
8+
9+
All the classes in `io.unitycatalog.client.api` Java package (e.g., [ApiClient](ApiClient.md), [GrantsApi](GrantsApi.md)) are auto-generated using [OpenAPI Generator]({{ openapi.home }}) based on Unity Catalog's [OpenAPI specification]({{ uc.github }}/api/all.yaml).
10+
11+
[sbt-openapi-generator]({{ openapi.github }}/sbt-openapi-generator) 7.5.0 is used in the `client` sbt module of the `unitycatalog` project.

0 commit comments

Comments
 (0)