Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/helm-chart-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -483,13 +483,12 @@ jobs:
done
values=()
[ "$DB" = file ] || values=(--values "helm/ci/$DB-values.yaml")
# The PostgreSQL case also turns on s3_compatible credentials, with an encryption key from a
# The PostgreSQL case also passes the key for s3_compatible_access_key credentials from a
# Secret; the other cases keep the default install.
if [ "$DB" = postgresql ]; then
kubectl create secret generic credential-encryption --namespace uc \
--from-literal=encryptionKey="$(openssl rand -base64 32)"
values+=(--set server.credentialEncryptionKeySecret.name=credential-encryption \
--set-string 'server.config.extraProperties.server\.s3-compatible-storage\.enabled=true')
values+=(--set server.credentialEncryptionKeySecret.name=credential-encryption)
fi
helm install uc "$RUNNER_TEMP/unitycatalog-chart-0.0.0-ci.tgz" --namespace uc --create-namespace --wait --timeout 600s \
"${values[@]}" \
Expand All @@ -500,7 +499,7 @@ jobs:
--set ui.deployment.image.repository=unitycatalog-ui \
--set ui.deployment.image.pullPolicy=Never
if [ "$DB" = postgresql ]; then
# The server read the key, which it checks at startup with the feature on.
# The server read the key, which it checks at startup.
kubectl logs --namespace uc deployment/uc-unitycatalog-server --container server \
| grep -F 'Using the UC_SERVER_CREDENTIAL_ENCRYPTION_KEY environment variable' > /dev/null \
|| { echo "::error::The server did not read the credential encryption key"; exit 1; }
Expand Down
4 changes: 2 additions & 2 deletions api/Apis/CredentialsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ All URIs are relative to *http://localhost:8080/api/2.1/unity-catalog*
Create a credential

Creates a new credential. The credential type is determined by which credential field is set. Set exactly one of `aws_iam_role` and `s3_compatible`; otherwise the request fails with `INVALID_ARGUMENT`. EXPERIMENTAL: `s3_compatible` is available only when the server property `server.s3-compatible-storage.enabled` is `true`. Otherwise a create or update request that sets `s3_compatible`, and vending for a path under one, fail with `INVALID_ARGUMENT`; other updates, reads, lists and deletes of existing ones still work. An `s3_compatible` credential holds an access key pair of S3-compatible storage and the storage's S3 endpoint. `s3_endpoint` and `assume_role.sts_endpoint` are http or https URLs with a host, and without user info, a query or a fragment; other values fail with `INVALID_ARGUMENT`. With `assume_role`, the key pair signs AssumeRole on the storage's STS, and Unity Catalog vends short-lived credentials scoped to the requested path and privilege. Without it, the server property `server.s3-compatible-storage.static-key-vending` decides what clients receive: * `endpoint-only` (default): the S3 endpoint and region, but no keys; engines bring their own. * `static-key`: the key pair itself. It is not scoped to the requested path or privilege, and changing Unity Catalog permissions does not revoke a key pair already vended. Vends with keys (`assume_role` sessions and `static-key` key pairs) suit only servers whose clients all read `s3_endpoint`: a client that does not would send the keys to AWS S3. Without `assume_role`, in both modes the vended `expiration_time` is a refetch time an hour ahead, not when the keys expire, and the Iceberg REST table config of a `static-key` vend carries no expiration. A running client need not fetch again then; the UC Hadoop connector picks up a changed endpoint on its first table load after `expiration_time`. The external locations of an `s3_compatible` credential must be `s3://` paths. Paths stay `s3://<bucket>/<path>` everywhere: a path reaches the storage of the credential of the external location covering it, so one bucket name can be on several storage systems under different, non-overlapping locations.
Creates a new credential. The credential type is determined by which credential field is set. Set exactly one of `aws_iam_role` and `s3_compatible_access_key`; otherwise the request fails with `INVALID_ARGUMENT`. An `s3_compatible_access_key` credential holds an access key pair of S3-compatible storage. The server stores its secret access key encrypted with the server property `server.credential-encryption-key`; without that key, a create or update request that sets `s3_compatible_access_key` fails with `FAILED_PRECONDITION`. The credential holds no S3 endpoint: the S3 endpoint of the storage is the `endpoint` of each external location that uses the credential, so one credential can serve locations on several storage hosts, and vended credentials carry that location `endpoint`. The credential's optional `sts_endpoint` is where the server itself calls STS; it is never vended. `sts_endpoint` is `http[s]://host[:port]`, without a path (not even a trailing `/`), user info, a query or a fragment; other values fail with `INVALID_ARGUMENT`. It is stored with the scheme and host in lowercase. With `role_arn`, the key pair signs AssumeRole on the storage's STS, and Unity Catalog vends short-lived credentials scoped to the requested path and privilege. Without it, the server property `server.s3-compatible-storage.static-key-vending` decides what clients receive: * `endpoint-only` (default): the location's `external_location_settings`, but no keys; engines bring their own. * `static-key`: the key pair itself. It is not scoped to the requested path or privilege, and changing Unity Catalog permissions does not revoke a key pair already vended. Vends with keys (`role_arn` sessions and `static-key` key pairs) suit only servers whose clients all read the vended `external_location_settings`: a client that does not would send the keys to AWS S3. Without `role_arn`, in both modes the vended `expiration_time` is a refetch time an hour ahead, not when the keys expire, and the Iceberg REST table config of a `static-key` vend carries no expiration. A running client need not fetch again then; the UC Hadoop connector picks up a changed endpoint on its first table load after `expiration_time`. The external locations of an `s3_compatible_access_key` credential must be `s3://` paths. Paths stay `s3://<bucket>/<path>` everywhere: a path reaches the storage at the `endpoint` of the external location covering it, so one bucket name can be on several storage systems under different, non-overlapping locations.

### Parameters

Expand Down Expand Up @@ -128,7 +128,7 @@ No authorization required
Update a credential

Updates a credential. The caller must be a metastore admin, the credential owner, or have MANAGE on the credential. Set at most one of `aws_iam_role` and `s3_compatible`; setting both fails with `INVALID_ARGUMENT`. Either one replaces the stored credential as a whole, with no field-level merge, and can change its type: an `s3_compatible` update carries `secret_access_key` again, and leaving out `assume_role` removes it. Updates without either, such as of the name or comment, keep the stored credential. EXPERIMENTAL: whoever may update a credential is trusted with where the data under it lives. Changing `s3_endpoint` of an `s3_compatible` credential moves data access for every path under its external locations, including tables and volumes other principals own, to the new host; changing `sts_endpoint` moves where their credentials are issued. The server itself connects to both endpoints. An `s3_compatible` credential has only `s3://` external locations: setting `s3_compatible` while a location outside `s3://` uses the credential, or creating or updating such a location to use it, fails with `INVALID_ARGUMENT`.
Updates a credential. The caller must be a metastore admin, the credential owner, or have MANAGE on the credential. Set at most one of `aws_iam_role` and `s3_compatible_access_key`; setting both fails with `INVALID_ARGUMENT`. Either one replaces the stored credential as a whole, with no field-level merge: an `s3_compatible_access_key` update carries `secret_access_key` again, and leaving out `role_arn` removes it. Either one can change the credential's type only while no external location uses it; otherwise the request fails with `INVALID_ARGUMENT`. Updates without either, such as of the name or comment, keep the stored credential. Whoever may update a credential is trusted with how the data under it is reached. Changing `sts_endpoint` of an `s3_compatible_access_key` credential moves where the credentials for every path under its external locations are issued, including for tables and volumes other principals own. The server itself connects to that endpoint.

### Parameters

Expand Down
4 changes: 2 additions & 2 deletions api/Apis/ExternalLocationsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ All URIs are relative to *http://localhost:8080/api/2.1/unity-catalog*
Create an external location

Creates a new external location entry in the metastore. The caller must be a metastore admin to be able to create external locations. EXPERIMENTAL: a location whose credential is `s3_compatible` must have an `s3://` URL; otherwise the request fails with `INVALID_ARGUMENT`.
Creates a new external location entry in the metastore. The caller must be a metastore admin to be able to create external locations. A location whose credential is `s3_compatible_access_key` must have an `s3://` URL and an `endpoint`; a location with another credential must not have an `endpoint`. Otherwise the request fails with `INVALID_ARGUMENT`.

### Parameters

Expand Down Expand Up @@ -129,7 +129,7 @@ No authorization required
Update an external location

Updates an external location in the metastore. The caller must be a metastore admin, the external location owner, or have MANAGE on the external location. Unless force is true, changing the url fails if the location is in use (as described for deleting it), unless the new url is the same as, or a parent of, the old one. EXPERIMENTAL: a location whose credential is `s3_compatible` must have an `s3://` URL; otherwise the request fails with `INVALID_ARGUMENT`.
Updates an external location in the metastore. The caller must be a metastore admin, the external location owner, or have MANAGE on the external location. Unless force is true, changing the url fails if the location is in use (as described for deleting it), unless the new url is the same as, or a parent of, the old one. Changing `endpoint` or `path_style_access` fails the same way while the location is in use, unless force is true; an `endpoint` that differs from the stored one only in the case of its scheme or host is no change. Such a refusal fails with `INVALID_ARGUMENT`, or with `FAILED_PRECONDITION` when a storage cleanup is pending at, above or under the url. A location whose credential is `s3_compatible_access_key` must have an `s3://` URL and an `endpoint`; a location with another credential must not have an `endpoint`. An update without `endpoint` keeps the stored one. A location keeps its storage kind, even after its credential was force-deleted: one with an `endpoint` can only get an `s3_compatible_access_key` credential, and one without can get neither an `endpoint` nor such a credential. To move a location to other storage, delete it and create a new one. An update that breaks any of these storage rules fails with `INVALID_ARGUMENT`. Whoever may update a location is trusted with where the data under it lives: changing `endpoint` moves data access for every path under the location, including tables and volumes other principals own, to the new host, which the server itself connects to.

### Parameters

Expand Down
2 changes: 0 additions & 2 deletions api/Models/AwsCredentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
| **access\_key\_id** | **String** | The access key ID that identifies the temporary credentials. | [optional] [default to null] |
| **secret\_access\_key** | **String** | The secret access key that can be used to sign AWS API requests. | [optional] [default to null] |
| **session\_token** | **String** | The token that users must pass to AWS API to use the temporary credentials. | [optional] [default to null] |
| **s3\_endpoint** | **String** | EXPERIMENTAL. The S3 API endpoint to send requests for the path to, set when the path is on S3-compatible storage. It is the `s3_endpoint` of the storage credential of the external location covering the path. Requests to it always use path-style addressing. Absent for AWS S3. When that credential does not vend keys, this and `s3_region` are the only fields set. A client that does not support this field must not use the credentials, and must not send their requests to AWS S3. | [optional] [default to null] |
| **s3\_region** | **String** | EXPERIMENTAL. The region to sign S3 requests with, set together with `s3_endpoint`. Unity Catalog asks the storage for the bucket's region, and uses `us-east-1` if it does not say. | [optional] [default to null] |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

2 changes: 1 addition & 1 deletion api/Models/CreateCredentialRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| **name** | **String** | The credential name. The name must be unique within the metastore. | [default to null] |
| **comment** | **String** | Comment associated with the credential. | [optional] [default to null] |
| **aws\_iam\_role** | [**AwsIamRoleRequest**](AwsIamRoleRequest.md) | | [optional] [default to null] |
| **s3\_compatible** | [**S3CompatibleRequest**](S3CompatibleRequest.md) | | [optional] [default to null] |
| **s3\_compatible\_access\_key** | [**S3CompatibleAccessKeyRequest**](S3CompatibleAccessKeyRequest.md) | | [optional] [default to null] |
| **purpose** | [**CredentialPurpose**](CredentialPurpose.md) | | [default to null] |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
2 changes: 2 additions & 0 deletions api/Models/CreateExternalLocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
| **name** | **String** | Name of the external location. | [default to null] |
| **url** | **String** | Path URL of the external location. | [default to null] |
| **credential\_name** | **String** | Name of the storage credential used with this location. | [default to null] |
| **endpoint** | **String** | S3 API endpoint of the S3-compatible storage the external location is on, for example `https://minio.example.com:9000`: `http[s]://host[:port]`, of at most 2048 characters, and without a path (not even a trailing `/`), user info, a query or a fragment; other values fail with `INVALID_ARGUMENT`. Stored, returned and vended with the scheme and host in lowercase. Set exactly when the location is on S3-compatible storage: required with an `s3_compatible_access_key` credential and refused with another, and kept when the credential is force-deleted (see `updateExternalLocation`). Credential vending returns it in `external_location_settings`, with the region and addressing style engines need to reach the storage. | [optional] [default to null] |
| **path\_style\_access** | **Boolean** | Whether requests to the `endpoint` of an external location name the bucket in the path (`<endpoint>/<bucket>/<key>`) rather than in the host name (`<bucket>.<endpoint host>/<key>`, virtual-hosted). Self-hosted storage usually serves only path-style requests, while some hosted services accept only virtual-hosted ones. Allowed only with an `endpoint`; otherwise the request fails with `INVALID_ARGUMENT`. Left out, the location is virtual-hosted. A location with an `endpoint` always returns it, except in a `browse_only` response, which leaves out both. Virtual-hosted requests put the bucket in the host name, so the bucket name must then be a host name label: 3 to 63 lowercase letters, digits and hyphens, starting and ending with a letter or digit. A dot is not allowed, since it breaks wildcard TLS certificates. Creating or updating a virtual-hosted location whose bucket does not qualify fails with `INVALID_ARGUMENT`. | [optional] [default to null] |
| **comment** | **String** | User-provided free-form text description. | [optional] [default to null] |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
2 changes: 1 addition & 1 deletion api/Models/CredentialInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
|------------ | ------------- | ------------- | -------------|
| **name** | **String** | The credential name. The name must be unique within the metastore. | [optional] [default to null] |
| **aws\_iam\_role** | [**AwsIamRoleResponse**](AwsIamRoleResponse.md) | | [optional] [default to null] |
| **s3\_compatible** | [**S3CompatibleResponse**](S3CompatibleResponse.md) | | [optional] [default to null] |
| **s3\_compatible\_access\_key** | [**S3CompatibleAccessKeyResponse**](S3CompatibleAccessKeyResponse.md) | | [optional] [default to null] |
| **comment** | **String** | Comment associated with the credential. | [optional] [default to null] |
| **owner** | **String** | Username of current owner of credential. | [optional] [default to null] |
| **full\_name** | **String** | The full name of the credential. | [optional] [default to null] |
Expand Down
Loading
Loading