Skip to content

Commit 32c44db

Browse files
TemporaryModelVersionCredentialsService
1 parent f216ae2 commit 32c44db

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

docs/credential-vending/index.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,19 @@ The path operations are used for [TemporaryPathCredentialsService](../server/Tem
3737
??? note "OpenAPI Generator"
3838
Path operations are defined in `PathOperation` enum in Unity Catalog's [OpenAPI specification]({{ uc.github }}/api/all.yaml).
3939

40+
## Model Version Operations
41+
42+
There are the following model version operations supported in Unity Catalog:
43+
44+
* `READ_MODEL_VERSION`
45+
* `READ_WRITE_MODEL_VERSION`
46+
* `UNKNOWN_MODEL_VERSION_OPERATION`
47+
48+
The path operations are used for [TemporaryModelVersionCredentialsService](../server/TemporaryModelVersionCredentialsService.md) to determine the [privileges for a model version operation](../server/TemporaryModelVersionCredentialsService.md#modelVersionOperationToPrivileges) (while [generating temporary model version credentials](../server/TemporaryModelVersionCredentialsService.md#generateTemporaryModelVersionCredentials)).
49+
50+
??? note "OpenAPI Generator"
51+
Path operations are defined in `ModelVersionOperation` enum in Unity Catalog's [OpenAPI specification]({{ uc.github }}/api/all.yaml).
52+
4053
## Amazon S3
4154

4255
[Alex Reid once wrote]({{ uc.slack }}/C076YREKX8W/p1728333073156489?thread_ts=1728308961.254459&cid=C076YREKX8W):

docs/server/TemporaryModelVersionCredentialsService.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# TemporaryModelVersionCredentialsService
22

3+
`TemporaryModelVersionCredentialsService` is an API service of [UnityCatalogServer](UnityCatalogServer.md) to handle HTTP requests at `/api/2.1/unity-catalog/temporary-model-version-credentials` URL.
4+
5+
Method | URL | Handler | Params
6+
-|-|-|-
7+
POST | `/` | [generateTemporaryModelVersionCredentials](#generateTemporaryModelVersionCredentials) | JSON-ified `GenerateTemporaryModelVersionCredential`
8+
9+
`TemporaryModelVersionCredentialsService` supports [credential vending](#generateTemporaryModelVersionCredentials) for model versions in non-file-based storage locations.
10+
311
## Creating Instance
412

513
`TemporaryModelVersionCredentialsService` takes the following to be created:
@@ -17,11 +25,32 @@ While being created, `TemporaryModelVersionCredentialsService` creates an [Unity
1725

1826
`TemporaryModelVersionCredentialsService` creates an [UnityAccessEvaluator](../server-authorization/UnityAccessEvaluator.md) (with the given [UnityCatalogAuthorizer](#authorizer)) when [created](#creating-instance).
1927

20-
## generateTemporaryModelVersionCredentials { #generateTemporaryModelVersionCredentials }
28+
## ModelRepository { #MODEL_REPOSITORY }
29+
30+
`TemporaryModelVersionCredentialsService` gets the system-wide [ModelRepository](../persistent-storage/ModelRepository.md#getInstance) instance when [created](#creating-instance).
31+
32+
`TemporaryModelVersionCredentialsService` uses the `ModelRepository` to [look up the model version](../persistent-storage/ModelRepository.md#getModelVersion) while [generating temporary model version credentials](#generateTemporaryModelVersionCredentials).
33+
34+
## Generate Temporary Model Version Credentials { #generateTemporaryModelVersionCredentials }
2135

2236
``` java
2337
HttpResponse generateTemporaryModelVersionCredentials(
2438
GenerateTemporaryModelVersionCredential generateTemporaryModelVersionCredentials)
2539
```
2640

2741
`generateTemporaryModelVersionCredentials`...FIXME
42+
43+
### Privileges by Model Version Operation { #modelVersionOperationToPrivileges }
44+
45+
```java
46+
Set<CredentialContext.Privilege> modelVersionOperationToPrivileges(
47+
ModelVersionOperation modelVersionOperation)
48+
```
49+
50+
`modelVersionOperationToPrivileges` converts the given [ModelVersionOperation](../credential-vending/index.md#model-version-operations) to [Privileges](../basic-server-access-control/index.md#privileges):
51+
52+
ModelVersionOperation | Privileges
53+
-|-
54+
`READ_MODEL_VERSION` | `SELECT`
55+
`READ_WRITE_MODEL_VERSION` | `SELECT`, `UPDATE`
56+
`UNKNOWN_MODEL_VERSION_OPERATION` | A `BaseException` is thrown

docs/server/TemporaryPathCredentialsService.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,6 @@ Set<CredentialContext.Privilege> pathOperationToPrivileges(
7373
PathOperation | Privileges
7474
-|-
7575
`PATH_READ` | `SELECT`
76-
`PATH_READ_WRITE` | `SELECT` and `UPDATE`
77-
`PATH_CREATE_TABLE` | `SELECT` and `UPDATE`
76+
`PATH_READ_WRITE` | `SELECT`, `UPDATE`
77+
`PATH_CREATE_TABLE` | `SELECT`, `UPDATE`
7878
`UNKNOWN_PATH_OPERATION` | (empty)

0 commit comments

Comments
 (0)