You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "mj006648 (via GitHub)" <gi...@apache.org> on 2026/05/15 06:07:29 UTC
[PR] docs: add production configuration pages for AWS S3 and Azure Blob storage (#1325) [polaris]
mj006648 opened a new pull request, #4451:
URL: https://github.com/apache/polaris/pull/4451
## Summary
Adds production configuration pages for AWS S3 and Azure Blob storage backends, mirroring the existing GCS page. Implements Option 1 of #1325 as agreed with @flyrain. GCS page enhancement and skill.md are intentionally left for follow-up PRs.
Two new pages under `site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/`:
- `configuring-aws-s3-cloud-storage-specific.md`
- `configuring-azure-blob-cloud-storage-specific.md`
Each covers server-side `storageConfigInfo` fields, client wiring for Spark / Trino / PyIceberg, and a verification SQL snippet.
## Verified end-to-end while writing this
- MinIO + Polaris + Spark / Trino / PyIceberg 0.11.1: CREATE / INSERT / SELECT round-trips. Findings folded into the page (the required `vended-credentials-enabled` and native-S3 properties for Trino, and the `header.X-Iceberg-Access-Delegation` REST header for PyIceberg).
- Ceph RGW with STS disabled: produced `Failed to get subscoped credentials` STS 400 — informed the new "Backends without STS support" subsection.
- ADLS Gen2 (HNS) with a service principal: happy-path round-trip.
- ADLS Gen2 with the SP's `Storage Blob Data Contributor` removed: reproduced `AuthorizationPermissionMismatch` 403 — informed the Azure troubleshooting bullet.
AWS IAM trust-policy / KMS specifics and HNS directory-ACL behavior are described conservatively based on docs and the corresponding Polaris classes rather than from a live test against those exact features.
## Test plan
- [x] Hugo site build succeeds locally (186 pages, no errors)
- [x] Both new pages appear in the production-config sidebar
- [ ] CI Hugo build passes
- [ ] Reviewers confirm the conservative bullets (AWS IAM/KMS, Azure HNS ACL) match operational reality
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: add production configuration pages for AWS S3 and Azure Blob storage (#1325) [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on PR #4451:
URL: https://github.com/apache/polaris/pull/4451#issuecomment-4509834248
@mj006648 : line references to review-based changes are nice and helpful, but replying to GH comments in-thread is even nicer for humans :wink:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: add production configuration pages for AWS S3 and Azure Blob storage (#1325) [polaris]
Posted by "mj006648 (via GitHub)" <gi...@apache.org>.
mj006648 commented on PR #4451:
URL: https://github.com/apache/polaris/pull/4451#issuecomment-4504344198
Thanks for the second pass, @dimas-b. Pushed a follow-up.
For the Trino block (L220): I traced what Polaris actually vends in the LoadTable response. From `polaris-core/src/main/java/org/apache/polaris/core/storage/StorageAccessProperty.java` (lines 41-44) the keys exposed to the client are `s3.endpoint`, `s3.path-style-access`, and `client.region`, populated by `AwsCredentialsStorageIntegration` (lines 172-193) from `endpoint` / `pathStyleAccess` / `region` on the storage config.
So I dropped `s3.region` and the separate `s3.endpoint` / `s3.path-style-access` block — those really are redundant on the client. I kept `fs.native-s3.enabled=true` since that flag turns on Trino's native S3 filesystem and isn't something Polaris can vend. Rewrote the surrounding paragraph to reflect that split.
L261: replaced `userArn` with `roleArn` (leftover from the first pass — `AwsStorageConfigurationInfo.getRoleARN()` is what gets threaded into the `AssumeRoleRequest`).
Diff is +5/-13, docs-only.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: add production configuration pages for AWS S3 and Azure Blob storage (#1325) [polaris]
Posted by "mj006648 (via GitHub)" <gi...@apache.org>.
mj006648 commented on code in PR #4451:
URL: https://github.com/apache/polaris/pull/4451#discussion_r3302814694
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,258 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring S3 Storage
+linkTitle: Configuring S3 Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3, and S3-compatible object stores (MinIO, Apache Ozone S3
+gateway, Ceph RGW, and similar), as the storage backend for a Polaris catalog. On AWS S3, all read
+and write operations are performed using credential vending: Polaris assumes a customer IAM role
+via STS and returns scoped, short-lived credentials to the client. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+This page is limited to native Polaris authentication. External identity providers are also
+supported but are not yet covered here; the configuration patterns below remain otherwise the same.
+
+## IAM role and trust policy
Review Comment:
Thanks @flyrain. Took a shot at this in 0837f0a4a — added an
overview section naming the three identities and a "Polaris service
identity" section covering IRSA / EC2 / static creds plus the
sts:AssumeRole policy. Also renamed the old section to "Catalog
access role and trust policy" so the labels line up.
Quick check: I read "creating a new catalog" as the IAM role that
gets bound to the catalog at creation time. If you meant the admin
permissions to call the catalogs API, let me know and I'll handle
it separately.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: add production configuration pages for AWS S3 and Azure Blob storage (#1325) [polaris]
Posted by "mj006648 (via GitHub)" <gi...@apache.org>.
mj006648 commented on code in PR #4451:
URL: https://github.com/apache/polaris/pull/4451#discussion_r3302768372
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,258 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring S3 Storage
+linkTitle: Configuring S3 Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3, and S3-compatible object stores (MinIO, Apache Ozone S3
+gateway, Ceph RGW, and similar), as the storage backend for a Polaris catalog. On AWS S3, all read
+and write operations are performed using credential vending: Polaris assumes a customer IAM role
+via STS and returns scoped, short-lived credentials to the client. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+This page is limited to native Polaris authentication. External identity providers are also
+supported but are not yet covered here; the configuration patterns below remain otherwise the same.
+
+## IAM role and trust policy
Review Comment:
Thanks @flyrain. Took a shot at this in <COMMIT_SHA> — added an
overview section naming the three identities and a "Polaris service
identity" section covering IRSA / EC2 / static creds plus the
sts:AssumeRole policy. Also renamed the old section to "Catalog
access role and trust policy" so the labels line up.
Quick check: I read "creating a new catalog" as the IAM role that
gets bound to the catalog at creation time. If you meant the admin
permissions to call the catalogs API, let me know and I'll handle
it separately.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: add production configuration pages for AWS S3 and Azure Blob storage (#1325) [polaris]
Posted by "mj006648 (via GitHub)" <gi...@apache.org>.
mj006648 commented on PR #4451:
URL: https://github.com/apache/polaris/pull/4451#issuecomment-4542977598
@dimas-b apologies for the new churn — pushed 0837f0a4a to address @flyrain's review. Could you take another look when convenient?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: add production configuration pages for AWS S3 and Azure Blob storage (#1325) [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #4451:
URL: https://github.com/apache/polaris/pull/4451#discussion_r3250202917
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,263 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring AWS S3 Cloud Storage
+linkTitle: Configuring AWS S3 Cloud Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3 as the storage backend for a Polaris catalog. All read and write
+operations against S3 are performed using credential vending, in which Polaris assumes an IAM role
+on behalf of the client and returns scoped, short-lived credentials. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+## IAM role and trust policy
+
+Polaris assumes a customer-managed IAM role via STS when a client requests credentials. The role
+must:
+
+1. Grant the actions required for object access on the bucket and prefix that backs the catalog
+ (`s3:GetObject`, `s3:PutObject`, `s3:DeleteObject`, `s3:ListBucket` and, if encryption is in use,
+ the relevant `kms:*` actions).
+2. Trust the Polaris service principal — typically the IAM role that the Polaris server runs as.
+ Polaris fills the `sts:AssumeRole` request with the configured `userArn` and, when supplied, an
+ `externalId`. The trust policy must accept both.
+
+A minimal trust policy looks like:
+
+```json
+{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Principal": { "AWS": "arn:aws:iam::123456789012:role/polaris-server" },
+ "Action": "sts:AssumeRole",
+ "Condition": {
+ "StringEquals": { "sts:ExternalId": "polaris-prod" }
+ }
+ }
+ ]
+}
+```
+
+If you do not require an external ID, omit the `Condition` block and the matching `externalId`
+field in the storage config.
Review Comment:
I'm a bit hesitant about this sentence, even though it is correct. Using external IDs is the best practice. Users who know what they are doing and still do not want the external ID probably already know how to construct the policy text.
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,263 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring AWS S3 Cloud Storage
+linkTitle: Configuring AWS S3 Cloud Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3 as the storage backend for a Polaris catalog. All read and write
+operations against S3 are performed using credential vending, in which Polaris assumes an IAM role
+on behalf of the client and returns scoped, short-lived credentials. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+## IAM role and trust policy
+
+Polaris assumes a customer-managed IAM role via STS when a client requests credentials. The role
+must:
+
+1. Grant the actions required for object access on the bucket and prefix that backs the catalog
+ (`s3:GetObject`, `s3:PutObject`, `s3:DeleteObject`, `s3:ListBucket` and, if encryption is in use,
+ the relevant `kms:*` actions).
+2. Trust the Polaris service principal — typically the IAM role that the Polaris server runs as.
+ Polaris fills the `sts:AssumeRole` request with the configured `userArn` and, when supplied, an
+ `externalId`. The trust policy must accept both.
+
+A minimal trust policy looks like:
+
+```json
+{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Principal": { "AWS": "arn:aws:iam::123456789012:role/polaris-server" },
+ "Action": "sts:AssumeRole",
+ "Condition": {
+ "StringEquals": { "sts:ExternalId": "polaris-prod" }
+ }
+ }
+ ]
+}
+```
+
+If you do not require an external ID, omit the `Condition` block and the matching `externalId`
+field in the storage config.
+
+## Catalog storage configuration
+
+Provide the role ARN and region when creating the catalog. `userArn` is the identity Polaris
+itself uses (typically the role ARN of the server); `externalId` matches the trust policy above.
+
+```bash
+curl -X POST https://<polaris-host>/management/v1/catalogs \
+ -H "Authorization: Bearer $TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "type": "INTERNAL",
+ "name": "warehouse_s3",
+ "storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "arn:aws:iam::123456789012:role/polaris-warehouse-access",
+ "userArn": "arn:aws:iam::123456789012:role/polaris-server",
Review Comment:
I believe this line is irrelevant to deployments using current Apache Polaris distributions (can be omitted).
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,263 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring AWS S3 Cloud Storage
+linkTitle: Configuring AWS S3 Cloud Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3 as the storage backend for a Polaris catalog. All read and write
+operations against S3 are performed using credential vending, in which Polaris assumes an IAM role
+on behalf of the client and returns scoped, short-lived credentials. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+## IAM role and trust policy
+
+Polaris assumes a customer-managed IAM role via STS when a client requests credentials. The role
+must:
+
+1. Grant the actions required for object access on the bucket and prefix that backs the catalog
+ (`s3:GetObject`, `s3:PutObject`, `s3:DeleteObject`, `s3:ListBucket` and, if encryption is in use,
+ the relevant `kms:*` actions).
+2. Trust the Polaris service principal — typically the IAM role that the Polaris server runs as.
+ Polaris fills the `sts:AssumeRole` request with the configured `userArn` and, when supplied, an
+ `externalId`. The trust policy must accept both.
+
+A minimal trust policy looks like:
+
+```json
+{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Principal": { "AWS": "arn:aws:iam::123456789012:role/polaris-server" },
+ "Action": "sts:AssumeRole",
+ "Condition": {
+ "StringEquals": { "sts:ExternalId": "polaris-prod" }
+ }
+ }
+ ]
+}
+```
+
+If you do not require an external ID, omit the `Condition` block and the matching `externalId`
+field in the storage config.
+
+## Catalog storage configuration
+
+Provide the role ARN and region when creating the catalog. `userArn` is the identity Polaris
+itself uses (typically the role ARN of the server); `externalId` matches the trust policy above.
+
+```bash
+curl -X POST https://<polaris-host>/management/v1/catalogs \
+ -H "Authorization: Bearer $TOKEN" \
Review Comment:
The bearer token is non-trivial to obtain for users. It might be worth adding a doc page (with a link) to how it can be obtained... of course, that will need to cover external IdP too... so it's not a trivial change.
Maybe just add a quick note about this to the doc to avoid making readers think they are missing something obvious 😅
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,263 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring AWS S3 Cloud Storage
+linkTitle: Configuring AWS S3 Cloud Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3 as the storage backend for a Polaris catalog. All read and write
+operations against S3 are performed using credential vending, in which Polaris assumes an IAM role
+on behalf of the client and returns scoped, short-lived credentials. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+## IAM role and trust policy
+
+Polaris assumes a customer-managed IAM role via STS when a client requests credentials. The role
+must:
+
+1. Grant the actions required for object access on the bucket and prefix that backs the catalog
+ (`s3:GetObject`, `s3:PutObject`, `s3:DeleteObject`, `s3:ListBucket` and, if encryption is in use,
+ the relevant `kms:*` actions).
+2. Trust the Polaris service principal — typically the IAM role that the Polaris server runs as.
+ Polaris fills the `sts:AssumeRole` request with the configured `userArn` and, when supplied, an
+ `externalId`. The trust policy must accept both.
+
+A minimal trust policy looks like:
+
+```json
+{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Principal": { "AWS": "arn:aws:iam::123456789012:role/polaris-server" },
+ "Action": "sts:AssumeRole",
+ "Condition": {
+ "StringEquals": { "sts:ExternalId": "polaris-prod" }
+ }
+ }
+ ]
+}
+```
+
+If you do not require an external ID, omit the `Condition` block and the matching `externalId`
+field in the storage config.
+
+## Catalog storage configuration
+
+Provide the role ARN and region when creating the catalog. `userArn` is the identity Polaris
+itself uses (typically the role ARN of the server); `externalId` matches the trust policy above.
+
+```bash
+curl -X POST https://<polaris-host>/management/v1/catalogs \
+ -H "Authorization: Bearer $TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "type": "INTERNAL",
+ "name": "warehouse_s3",
+ "storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "arn:aws:iam::123456789012:role/polaris-warehouse-access",
+ "userArn": "arn:aws:iam::123456789012:role/polaris-server",
+ "externalId": "polaris-prod",
+ "region": "us-east-1"
+ },
+ "properties": { "default-base-location": "s3://warehouse-bucket/prod/" }
+ }'
+```
+
+The role ARN is validated against the pattern enforced by `AwsStorageConfigurationInfo`; an
+ill-formed ARN is rejected at catalog creation time.
+
+## Server-side encryption with KMS
+
+When the bucket uses SSE-KMS, supply the key Polaris should use for writes and the full set of
+keys it is allowed to read from:
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "...",
+ "region": "us-east-1",
+ "currentKmsKey": "arn:aws:kms:us-east-1:123456789012:key/aaaa-bbbb",
+ "allowedKmsKeys": [
+ "arn:aws:kms:us-east-1:123456789012:key/aaaa-bbbb",
+ "arn:aws:kms:us-east-1:123456789012:key/cccc-dddd"
+ ]
+}
+```
+
+The IAM role's policy must include `kms:GenerateDataKey` and `kms:Decrypt` on every key listed in
+`allowedKmsKeys`, and the key policy must grant the same to the role principal.
+
+If the deployment does not use KMS, set `kmsUnavailable` to `true` so Polaris will not request
+KMS-related session permissions:
+
+```json
+"kmsUnavailable": true
+```
+
+## S3-compatible endpoints
+
+Polaris can be pointed at S3-compatible object stores (MinIO, Ceph RGW, Apache Ozone S3 gateway).
Review Comment:
Since the page covers non-AWS systems, I suggest re-titling to `Configuring S3 Storage`.
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-azure-blob-cloud-storage-specific.md:
##########
@@ -0,0 +1,214 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring Azure Blob Cloud Storage
+linkTitle: Configuring Azure Blob Cloud Storage
+type: docs
+weight: 620
+---
+
+This page covers configuring Azure Blob Storage and Azure Data Lake Storage Gen2 (ADLS Gen2) as
+the storage backend for a Polaris catalog. Polaris authenticates against Azure with the credentials
+of a service principal that has data-plane access to the target storage account, and then vends
+short-lived SAS tokens to clients on each table-load request.
+
+## Service principal and Polaris credentials
+
+Polaris uses the Azure SDK's `DefaultAzureCredential` chain, which by default reads the
+service-principal credentials from environment variables. Create a service principal with data
+access to the storage account and pass its credentials to the Polaris process:
+
+```bash
+# Replace <subscription>, <resource-group>, <storage-account> with your values.
+az ad sp create-for-rbac \
+ --name polaris-storage \
+ --role "Storage Blob Data Contributor" \
+ --scopes "/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account>"
+```
+
+The command prints `appId`, `password`, and `tenant`. Set these on the Polaris server:
+
+```bash
+export AZURE_TENANT_ID=<tenant>
+export AZURE_CLIENT_ID=<appId>
+export AZURE_CLIENT_SECRET=<password>
+```
+
+In a container deployment, set the same three variables on the Polaris container/pod. The
Review Comment:
Please mention using k8s secret references rather that clear text env. settings for `AZURE_CLIENT_SECRET`.
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,263 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring AWS S3 Cloud Storage
+linkTitle: Configuring AWS S3 Cloud Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3 as the storage backend for a Polaris catalog. All read and write
+operations against S3 are performed using credential vending, in which Polaris assumes an IAM role
+on behalf of the client and returns scoped, short-lived credentials. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+## IAM role and trust policy
+
+Polaris assumes a customer-managed IAM role via STS when a client requests credentials. The role
+must:
+
+1. Grant the actions required for object access on the bucket and prefix that backs the catalog
+ (`s3:GetObject`, `s3:PutObject`, `s3:DeleteObject`, `s3:ListBucket` and, if encryption is in use,
+ the relevant `kms:*` actions).
+2. Trust the Polaris service principal — typically the IAM role that the Polaris server runs as.
+ Polaris fills the `sts:AssumeRole` request with the configured `userArn` and, when supplied, an
+ `externalId`. The trust policy must accept both.
+
+A minimal trust policy looks like:
+
+```json
+{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Principal": { "AWS": "arn:aws:iam::123456789012:role/polaris-server" },
+ "Action": "sts:AssumeRole",
+ "Condition": {
+ "StringEquals": { "sts:ExternalId": "polaris-prod" }
+ }
+ }
+ ]
+}
+```
+
+If you do not require an external ID, omit the `Condition` block and the matching `externalId`
+field in the storage config.
+
+## Catalog storage configuration
+
+Provide the role ARN and region when creating the catalog. `userArn` is the identity Polaris
+itself uses (typically the role ARN of the server); `externalId` matches the trust policy above.
+
+```bash
+curl -X POST https://<polaris-host>/management/v1/catalogs \
+ -H "Authorization: Bearer $TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "type": "INTERNAL",
+ "name": "warehouse_s3",
+ "storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "arn:aws:iam::123456789012:role/polaris-warehouse-access",
+ "userArn": "arn:aws:iam::123456789012:role/polaris-server",
+ "externalId": "polaris-prod",
+ "region": "us-east-1"
+ },
+ "properties": { "default-base-location": "s3://warehouse-bucket/prod/" }
+ }'
+```
+
+The role ARN is validated against the pattern enforced by `AwsStorageConfigurationInfo`; an
+ill-formed ARN is rejected at catalog creation time.
+
+## Server-side encryption with KMS
+
+When the bucket uses SSE-KMS, supply the key Polaris should use for writes and the full set of
+keys it is allowed to read from:
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "...",
+ "region": "us-east-1",
+ "currentKmsKey": "arn:aws:kms:us-east-1:123456789012:key/aaaa-bbbb",
+ "allowedKmsKeys": [
+ "arn:aws:kms:us-east-1:123456789012:key/aaaa-bbbb",
+ "arn:aws:kms:us-east-1:123456789012:key/cccc-dddd"
+ ]
+}
+```
+
+The IAM role's policy must include `kms:GenerateDataKey` and `kms:Decrypt` on every key listed in
+`allowedKmsKeys`, and the key policy must grant the same to the role principal.
+
+If the deployment does not use KMS, set `kmsUnavailable` to `true` so Polaris will not request
+KMS-related session permissions:
+
+```json
+"kmsUnavailable": true
+```
+
+## S3-compatible endpoints
+
+Polaris can be pointed at S3-compatible object stores (MinIO, Ceph RGW, Apache Ozone S3 gateway).
+The available fields are:
+
+- `endpoint` — the S3 API endpoint Polaris and its clients should call.
+- `endpointInternal` — optional, used by the Polaris server when the in-cluster endpoint differs
+ from the one returned to clients.
+- `pathStyleAccess` — set to `true` for backends that do not support virtual-host-style addressing.
+- `stsEndpoint` — STS endpoint; defaults to `endpointInternal` then `endpoint` when not set.
+- `stsUnavailable` — set to `true` when the backend does not implement STS.
+
+How clients receive credentials depends on whether the backend implements STS.
+
+### Backends with STS support (e.g. AWS S3, MinIO)
+
+Leave `stsUnavailable` unset (or `false`). Polaris will assume the role and vend short-lived,
+subscoped credentials to the client at table-load time when the client sends
+`X-Iceberg-Access-Delegation: vended-credentials`. This is the recommended deployment for AWS S3
+and any compatible backend that exposes the STS API.
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "endpoint": "https://s3.internal.example.com",
+ "pathStyleAccess": true,
+ "region": "us-east-1"
+}
+```
+
+### Backends without STS support (e.g. Apache Ozone S3 gateway, Ceph RGW without STS enabled)
+
+Set `stsUnavailable: true`. Polaris will then skip subscoped credential vending, and clients must
+authenticate to the object store directly with long-lived credentials. Because the vended-credential
+path is disabled, the client must omit the `X-Iceberg-Access-Delegation` header and supply its own
+access key / secret to the underlying FileIO. The Polaris guides for [Apache Ozone][ozone-guide]
+and [Ceph][ceph-guide] show this pattern.
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "endpoint": "https://s3.internal.example.com",
+ "pathStyleAccess": true,
+ "stsUnavailable": true,
+ "region": "us-east-1"
+}
+```
+
+[ozone-guide]: ../../../../guides/ozone/
+[ceph-guide]: ../../../../guides/ceph/
+
+## Client configuration
+
+Engines connect through the Iceberg REST API and let Polaris vend credentials at table-load time;
+they do not need static AWS credentials when STS is available.
+
+Spark example, matching the property names used by the existing MinIO / RustFS guides:
+
+```shell
+bin/spark-sql \
+ --packages org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.10.1,org.apache.iceberg:iceberg-aws-bundle:1.10.1 \
+ --conf spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions \
+ --conf spark.sql.catalog.polaris=org.apache.iceberg.spark.SparkCatalog \
+ --conf spark.sql.catalog.polaris.type=rest \
+ --conf spark.sql.catalog.polaris.uri=https://<polaris-host>/api/catalog \
+ --conf spark.sql.catalog.polaris.oauth2-server-uri=https://<polaris-host>/api/catalog/v1/oauth/tokens \
+ --conf spark.sql.catalog.polaris.token-refresh-enabled=false \
+ --conf spark.sql.catalog.polaris.warehouse=warehouse_s3 \
+ --conf spark.sql.catalog.polaris.scope=PRINCIPAL_ROLE:ALL \
+ --conf spark.sql.catalog.polaris.credential=<client-id>:<client-secret> \
+ --conf spark.sql.catalog.polaris.header.X-Iceberg-Access-Delegation=vended-credentials
+```
+
+The `oauth2-server-uri` is recommended: without it the Iceberg REST client falls back to a
+hard-coded `/v1/oauth/tokens` path and logs a deprecation warning, since the automatic fallback
+is slated for removal in a future Iceberg release.
+
+For Trino, use the Iceberg connector with the REST catalog. Two groups of properties are
+required: the REST/OAuth2 settings for talking to Polaris, and the native S3 filesystem settings
+that Trino uses to read the vended credentials.
+
+```properties
+connector.name=iceberg
+iceberg.catalog.type=rest
+iceberg.rest-catalog.uri=https://<polaris-host>/api/catalog
+iceberg.rest-catalog.warehouse=warehouse_s3
+iceberg.rest-catalog.security=OAUTH2
+iceberg.rest-catalog.oauth2.credential=<client-id>:<client-secret>
+iceberg.rest-catalog.oauth2.scope=PRINCIPAL_ROLE:ALL
+iceberg.rest-catalog.oauth2.server-uri=https://<polaris-host>/api/catalog/v1/oauth/tokens
+iceberg.rest-catalog.vended-credentials-enabled=true
+fs.native-s3.enabled=true
+s3.region=us-east-1
+```
+
+When pointing at an S3-compatible endpoint, also set:
+
+```properties
+s3.endpoint=https://s3.internal.example.com
+s3.path-style-access=true
Review Comment:
Is this truly necessary? Polaris should send the endpoint URI (and ` s3.path-style-access`) as part of the Catalog Config response to clients 🤔
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-azure-blob-cloud-storage-specific.md:
##########
@@ -0,0 +1,214 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring Azure Blob Cloud Storage
+linkTitle: Configuring Azure Blob Cloud Storage
+type: docs
+weight: 620
+---
+
+This page covers configuring Azure Blob Storage and Azure Data Lake Storage Gen2 (ADLS Gen2) as
+the storage backend for a Polaris catalog. Polaris authenticates against Azure with the credentials
+of a service principal that has data-plane access to the target storage account, and then vends
+short-lived SAS tokens to clients on each table-load request.
+
+## Service principal and Polaris credentials
+
+Polaris uses the Azure SDK's `DefaultAzureCredential` chain, which by default reads the
+service-principal credentials from environment variables. Create a service principal with data
+access to the storage account and pass its credentials to the Polaris process:
+
+```bash
+# Replace <subscription>, <resource-group>, <storage-account> with your values.
+az ad sp create-for-rbac \
+ --name polaris-storage \
+ --role "Storage Blob Data Contributor" \
+ --scopes "/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account>"
+```
+
+The command prints `appId`, `password`, and `tenant`. Set these on the Polaris server:
+
+```bash
+export AZURE_TENANT_ID=<tenant>
+export AZURE_CLIENT_ID=<appId>
+export AZURE_CLIENT_SECRET=<password>
+```
+
+In a container deployment, set the same three variables on the Polaris container/pod. The
+`Storage Blob Data Contributor` role at storage-account scope is what allows Polaris to issue SAS
+tokens for any container under that account; you can scope the role narrower (single container)
+when you need to confine a single Polaris catalog to one container.
+
+## Storage account requirements
+
+The storage account that backs the catalog should be configured with:
+
+- **Hierarchical namespace (HNS)** enabled — this turns the account into ADLS Gen2 and is required
+ for directory-aware operations (rename, recursive list) that Iceberg relies on for atomic
+ metadata commits. If HNS is disabled, set `hierarchical: false` so Polaris will request flat-blob
+ permissions only and avoid scoping SAS tokens to non-existent directory ACLs.
+- A **container** that will hold the catalog's namespaces and tables (for example `warehouse`).
+ Polaris does not create the container itself.
+- **Firewall** rules that permit traffic from the Polaris control plane and from the engines that
+ will read the data. SAS tokens do not bypass storage-account firewalls.
+
+## Catalog storage configuration
+
+With the service principal in place on the server, create the catalog with the storage account's
+tenant ID and the `abfss://` location:
+
+```bash
+curl -X POST https://<polaris-host>/management/v1/catalogs \
+ -H "Authorization: Bearer $TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "catalog": {
+ "type": "INTERNAL",
+ "name": "warehouse_azure",
+ "properties": {
+ "default-base-location": "abfss://warehouse@example.dfs.core.windows.net/prod/"
+ },
+ "storageConfigInfo": {
+ "storageType": "AZURE",
+ "tenantId": "00000000-0000-0000-0000-000000000000",
+ "hierarchical": true,
+ "allowedLocations": [
+ "abfss://warehouse@example.dfs.core.windows.net/"
+ ]
+ }
+ }
+ }'
+```
+
+`default-base-location` must use the `abfss://` scheme together with the ADLS Gen2 endpoint
+(`<account>.dfs.core.windows.net`). The `wasbs://` scheme is not supported.
+
+`AzureStorageConfigurationInfo` also accepts `multiTenantAppName` and `consentUrl`. These are
+used by managed Polaris deployments that present a single multi-tenant Azure AD application to
+many customer tenants; in a self-hosted deployment that authenticates with its own service
+principal they can be omitted.
+
+## SAS token scoping and HNS ACLs
+
+When HNS is enabled (`hierarchical: true`), Polaris narrows each vended SAS token to the directory
+that backs the requested namespace or table. The ADLS Gen2 ACL on that directory must include the
+service principal as well as any extra principals that should read the data outside of vended
+credentials.
+
+A common failure mode is a token that grants object-level permissions but is denied by a
+directory-level ACL. The 403 returned by ADLS includes the path that was denied; align the ACL on
+that exact prefix to recover.
+
+When HNS is disabled, set `hierarchical: false`. Polaris will then issue SAS tokens scoped at the
Review Comment:
It might be worth mentioning that if the `hierarchical` config is misaligned with the HNS flag in storage, access control errors will likely occur in runtime.
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,263 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring AWS S3 Cloud Storage
+linkTitle: Configuring AWS S3 Cloud Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3 as the storage backend for a Polaris catalog. All read and write
+operations against S3 are performed using credential vending, in which Polaris assumes an IAM role
+on behalf of the client and returns scoped, short-lived credentials. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+## IAM role and trust policy
+
+Polaris assumes a customer-managed IAM role via STS when a client requests credentials. The role
+must:
+
+1. Grant the actions required for object access on the bucket and prefix that backs the catalog
+ (`s3:GetObject`, `s3:PutObject`, `s3:DeleteObject`, `s3:ListBucket` and, if encryption is in use,
+ the relevant `kms:*` actions).
+2. Trust the Polaris service principal — typically the IAM role that the Polaris server runs as.
+ Polaris fills the `sts:AssumeRole` request with the configured `userArn` and, when supplied, an
+ `externalId`. The trust policy must accept both.
+
+A minimal trust policy looks like:
+
+```json
+{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Principal": { "AWS": "arn:aws:iam::123456789012:role/polaris-server" },
+ "Action": "sts:AssumeRole",
+ "Condition": {
+ "StringEquals": { "sts:ExternalId": "polaris-prod" }
+ }
+ }
+ ]
+}
+```
+
+If you do not require an external ID, omit the `Condition` block and the matching `externalId`
+field in the storage config.
+
+## Catalog storage configuration
+
+Provide the role ARN and region when creating the catalog. `userArn` is the identity Polaris
+itself uses (typically the role ARN of the server); `externalId` matches the trust policy above.
+
+```bash
+curl -X POST https://<polaris-host>/management/v1/catalogs \
+ -H "Authorization: Bearer $TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "type": "INTERNAL",
+ "name": "warehouse_s3",
+ "storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "arn:aws:iam::123456789012:role/polaris-warehouse-access",
+ "userArn": "arn:aws:iam::123456789012:role/polaris-server",
+ "externalId": "polaris-prod",
+ "region": "us-east-1"
+ },
+ "properties": { "default-base-location": "s3://warehouse-bucket/prod/" }
+ }'
+```
+
+The role ARN is validated against the pattern enforced by `AwsStorageConfigurationInfo`; an
+ill-formed ARN is rejected at catalog creation time.
+
+## Server-side encryption with KMS
+
+When the bucket uses SSE-KMS, supply the key Polaris should use for writes and the full set of
+keys it is allowed to read from:
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "...",
+ "region": "us-east-1",
+ "currentKmsKey": "arn:aws:kms:us-east-1:123456789012:key/aaaa-bbbb",
+ "allowedKmsKeys": [
+ "arn:aws:kms:us-east-1:123456789012:key/aaaa-bbbb",
Review Comment:
Does the current key need to be repeated here?.. TBH, I do not recall... Could you double check?
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,263 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring AWS S3 Cloud Storage
+linkTitle: Configuring AWS S3 Cloud Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3 as the storage backend for a Polaris catalog. All read and write
+operations against S3 are performed using credential vending, in which Polaris assumes an IAM role
+on behalf of the client and returns scoped, short-lived credentials. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+## IAM role and trust policy
+
+Polaris assumes a customer-managed IAM role via STS when a client requests credentials. The role
+must:
+
+1. Grant the actions required for object access on the bucket and prefix that backs the catalog
+ (`s3:GetObject`, `s3:PutObject`, `s3:DeleteObject`, `s3:ListBucket` and, if encryption is in use,
+ the relevant `kms:*` actions).
+2. Trust the Polaris service principal — typically the IAM role that the Polaris server runs as.
+ Polaris fills the `sts:AssumeRole` request with the configured `userArn` and, when supplied, an
+ `externalId`. The trust policy must accept both.
+
+A minimal trust policy looks like:
+
+```json
+{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Principal": { "AWS": "arn:aws:iam::123456789012:role/polaris-server" },
+ "Action": "sts:AssumeRole",
+ "Condition": {
+ "StringEquals": { "sts:ExternalId": "polaris-prod" }
+ }
+ }
+ ]
+}
+```
+
+If you do not require an external ID, omit the `Condition` block and the matching `externalId`
+field in the storage config.
+
+## Catalog storage configuration
+
+Provide the role ARN and region when creating the catalog. `userArn` is the identity Polaris
+itself uses (typically the role ARN of the server); `externalId` matches the trust policy above.
Review Comment:
I do not think `userArn` is actually used by the current code in communication with AWS S3 or STS APIs.
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,263 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring AWS S3 Cloud Storage
+linkTitle: Configuring AWS S3 Cloud Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3 as the storage backend for a Polaris catalog. All read and write
+operations against S3 are performed using credential vending, in which Polaris assumes an IAM role
+on behalf of the client and returns scoped, short-lived credentials. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+## IAM role and trust policy
+
+Polaris assumes a customer-managed IAM role via STS when a client requests credentials. The role
+must:
+
+1. Grant the actions required for object access on the bucket and prefix that backs the catalog
+ (`s3:GetObject`, `s3:PutObject`, `s3:DeleteObject`, `s3:ListBucket` and, if encryption is in use,
+ the relevant `kms:*` actions).
+2. Trust the Polaris service principal — typically the IAM role that the Polaris server runs as.
+ Polaris fills the `sts:AssumeRole` request with the configured `userArn` and, when supplied, an
+ `externalId`. The trust policy must accept both.
+
+A minimal trust policy looks like:
+
+```json
+{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Principal": { "AWS": "arn:aws:iam::123456789012:role/polaris-server" },
+ "Action": "sts:AssumeRole",
+ "Condition": {
+ "StringEquals": { "sts:ExternalId": "polaris-prod" }
+ }
+ }
+ ]
+}
+```
+
+If you do not require an external ID, omit the `Condition` block and the matching `externalId`
+field in the storage config.
+
+## Catalog storage configuration
+
+Provide the role ARN and region when creating the catalog. `userArn` is the identity Polaris
+itself uses (typically the role ARN of the server); `externalId` matches the trust policy above.
+
+```bash
+curl -X POST https://<polaris-host>/management/v1/catalogs \
+ -H "Authorization: Bearer $TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "type": "INTERNAL",
+ "name": "warehouse_s3",
+ "storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "arn:aws:iam::123456789012:role/polaris-warehouse-access",
+ "userArn": "arn:aws:iam::123456789012:role/polaris-server",
+ "externalId": "polaris-prod",
+ "region": "us-east-1"
+ },
+ "properties": { "default-base-location": "s3://warehouse-bucket/prod/" }
+ }'
+```
+
+The role ARN is validated against the pattern enforced by `AwsStorageConfigurationInfo`; an
+ill-formed ARN is rejected at catalog creation time.
+
+## Server-side encryption with KMS
+
+When the bucket uses SSE-KMS, supply the key Polaris should use for writes and the full set of
+keys it is allowed to read from:
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "...",
+ "region": "us-east-1",
+ "currentKmsKey": "arn:aws:kms:us-east-1:123456789012:key/aaaa-bbbb",
+ "allowedKmsKeys": [
+ "arn:aws:kms:us-east-1:123456789012:key/aaaa-bbbb",
+ "arn:aws:kms:us-east-1:123456789012:key/cccc-dddd"
+ ]
+}
+```
+
+The IAM role's policy must include `kms:GenerateDataKey` and `kms:Decrypt` on every key listed in
+`allowedKmsKeys`, and the key policy must grant the same to the role principal.
+
+If the deployment does not use KMS, set `kmsUnavailable` to `true` so Polaris will not request
+KMS-related session permissions:
+
+```json
+"kmsUnavailable": true
+```
+
+## S3-compatible endpoints
+
+Polaris can be pointed at S3-compatible object stores (MinIO, Ceph RGW, Apache Ozone S3 gateway).
+The available fields are:
+
+- `endpoint` — the S3 API endpoint Polaris and its clients should call.
+- `endpointInternal` — optional, used by the Polaris server when the in-cluster endpoint differs
+ from the one returned to clients.
+- `pathStyleAccess` — set to `true` for backends that do not support virtual-host-style addressing.
+- `stsEndpoint` — STS endpoint; defaults to `endpointInternal` then `endpoint` when not set.
+- `stsUnavailable` — set to `true` when the backend does not implement STS.
+
+How clients receive credentials depends on whether the backend implements STS.
Review Comment:
This contradicts the top-most paragraph on this page - if STS is not available, Polaris will not vend credentials.
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-azure-blob-cloud-storage-specific.md:
##########
@@ -0,0 +1,214 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring Azure Blob Cloud Storage
+linkTitle: Configuring Azure Blob Cloud Storage
+type: docs
+weight: 620
+---
+
+This page covers configuring Azure Blob Storage and Azure Data Lake Storage Gen2 (ADLS Gen2) as
+the storage backend for a Polaris catalog. Polaris authenticates against Azure with the credentials
+of a service principal that has data-plane access to the target storage account, and then vends
+short-lived SAS tokens to clients on each table-load request.
+
+## Service principal and Polaris credentials
+
+Polaris uses the Azure SDK's `DefaultAzureCredential` chain, which by default reads the
+service-principal credentials from environment variables. Create a service principal with data
+access to the storage account and pass its credentials to the Polaris process:
+
+```bash
+# Replace <subscription>, <resource-group>, <storage-account> with your values.
+az ad sp create-for-rbac \
+ --name polaris-storage \
+ --role "Storage Blob Data Contributor" \
+ --scopes "/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account>"
+```
+
+The command prints `appId`, `password`, and `tenant`. Set these on the Polaris server:
+
+```bash
+export AZURE_TENANT_ID=<tenant>
+export AZURE_CLIENT_ID=<appId>
+export AZURE_CLIENT_SECRET=<password>
+```
+
+In a container deployment, set the same three variables on the Polaris container/pod. The
+`Storage Blob Data Contributor` role at storage-account scope is what allows Polaris to issue SAS
+tokens for any container under that account; you can scope the role narrower (single container)
+when you need to confine a single Polaris catalog to one container.
+
+## Storage account requirements
+
+The storage account that backs the catalog should be configured with:
+
+- **Hierarchical namespace (HNS)** enabled — this turns the account into ADLS Gen2 and is required
+ for directory-aware operations (rename, recursive list) that Iceberg relies on for atomic
+ metadata commits. If HNS is disabled, set `hierarchical: false` so Polaris will request flat-blob
Review Comment:
HNS has nothing to do with commit atomicity in Polaris, AFAIK.
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-azure-blob-cloud-storage-specific.md:
##########
@@ -0,0 +1,214 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring Azure Blob Cloud Storage
+linkTitle: Configuring Azure Blob Cloud Storage
+type: docs
+weight: 620
+---
+
+This page covers configuring Azure Blob Storage and Azure Data Lake Storage Gen2 (ADLS Gen2) as
+the storage backend for a Polaris catalog. Polaris authenticates against Azure with the credentials
+of a service principal that has data-plane access to the target storage account, and then vends
+short-lived SAS tokens to clients on each table-load request.
+
+## Service principal and Polaris credentials
+
+Polaris uses the Azure SDK's `DefaultAzureCredential` chain, which by default reads the
+service-principal credentials from environment variables. Create a service principal with data
+access to the storage account and pass its credentials to the Polaris process:
+
+```bash
+# Replace <subscription>, <resource-group>, <storage-account> with your values.
+az ad sp create-for-rbac \
+ --name polaris-storage \
+ --role "Storage Blob Data Contributor" \
+ --scopes "/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account>"
+```
+
+The command prints `appId`, `password`, and `tenant`. Set these on the Polaris server:
+
+```bash
+export AZURE_TENANT_ID=<tenant>
+export AZURE_CLIENT_ID=<appId>
+export AZURE_CLIENT_SECRET=<password>
+```
+
+In a container deployment, set the same three variables on the Polaris container/pod. The
+`Storage Blob Data Contributor` role at storage-account scope is what allows Polaris to issue SAS
+tokens for any container under that account; you can scope the role narrower (single container)
+when you need to confine a single Polaris catalog to one container.
+
+## Storage account requirements
+
+The storage account that backs the catalog should be configured with:
+
+- **Hierarchical namespace (HNS)** enabled — this turns the account into ADLS Gen2 and is required
+ for directory-aware operations (rename, recursive list) that Iceberg relies on for atomic
Review Comment:
not quite... I do not think HNS is required for technical Polaris/Iceberg operation. HNS is important for downscoping vended crdentials, though. Without HNS vended credentials can be scoped down only to the container level, with HNS to the directory (folder) level.
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-azure-blob-cloud-storage-specific.md:
##########
@@ -0,0 +1,214 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring Azure Blob Cloud Storage
+linkTitle: Configuring Azure Blob Cloud Storage
+type: docs
+weight: 620
+---
+
+This page covers configuring Azure Blob Storage and Azure Data Lake Storage Gen2 (ADLS Gen2) as
+the storage backend for a Polaris catalog. Polaris authenticates against Azure with the credentials
+of a service principal that has data-plane access to the target storage account, and then vends
+short-lived SAS tokens to clients on each table-load request.
+
+## Service principal and Polaris credentials
+
+Polaris uses the Azure SDK's `DefaultAzureCredential` chain, which by default reads the
+service-principal credentials from environment variables. Create a service principal with data
+access to the storage account and pass its credentials to the Polaris process:
+
+```bash
+# Replace <subscription>, <resource-group>, <storage-account> with your values.
+az ad sp create-for-rbac \
+ --name polaris-storage \
+ --role "Storage Blob Data Contributor" \
+ --scopes "/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account>"
+```
+
+The command prints `appId`, `password`, and `tenant`. Set these on the Polaris server:
+
+```bash
+export AZURE_TENANT_ID=<tenant>
+export AZURE_CLIENT_ID=<appId>
+export AZURE_CLIENT_SECRET=<password>
+```
+
+In a container deployment, set the same three variables on the Polaris container/pod. The
+`Storage Blob Data Contributor` role at storage-account scope is what allows Polaris to issue SAS
+tokens for any container under that account; you can scope the role narrower (single container)
+when you need to confine a single Polaris catalog to one container.
+
+## Storage account requirements
+
+The storage account that backs the catalog should be configured with:
+
+- **Hierarchical namespace (HNS)** enabled — this turns the account into ADLS Gen2 and is required
+ for directory-aware operations (rename, recursive list) that Iceberg relies on for atomic
+ metadata commits. If HNS is disabled, set `hierarchical: false` so Polaris will request flat-blob
+ permissions only and avoid scoping SAS tokens to non-existent directory ACLs.
+- A **container** that will hold the catalog's namespaces and tables (for example `warehouse`).
+ Polaris does not create the container itself.
+- **Firewall** rules that permit traffic from the Polaris control plane and from the engines that
+ will read the data. SAS tokens do not bypass storage-account firewalls.
+
+## Catalog storage configuration
+
+With the service principal in place on the server, create the catalog with the storage account's
+tenant ID and the `abfss://` location:
+
+```bash
+curl -X POST https://<polaris-host>/management/v1/catalogs \
+ -H "Authorization: Bearer $TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "catalog": {
+ "type": "INTERNAL",
+ "name": "warehouse_azure",
+ "properties": {
+ "default-base-location": "abfss://warehouse@example.dfs.core.windows.net/prod/"
+ },
+ "storageConfigInfo": {
+ "storageType": "AZURE",
+ "tenantId": "00000000-0000-0000-0000-000000000000",
+ "hierarchical": true,
+ "allowedLocations": [
+ "abfss://warehouse@example.dfs.core.windows.net/"
+ ]
+ }
+ }
+ }'
+```
+
+`default-base-location` must use the `abfss://` scheme together with the ADLS Gen2 endpoint
+(`<account>.dfs.core.windows.net`). The `wasbs://` scheme is not supported.
+
+`AzureStorageConfigurationInfo` also accepts `multiTenantAppName` and `consentUrl`. These are
Review Comment:
`multiTenantAppName` and `consentUrl` are not actually used by current Apache Polaris code for communicating with Azure APIs, AFAIK.
It might make sense for users to put them in the Catalog config for informational purposes, but I do not really see much value in documenting them at this time 🤔
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,263 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring AWS S3 Cloud Storage
+linkTitle: Configuring AWS S3 Cloud Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3 as the storage backend for a Polaris catalog. All read and write
+operations against S3 are performed using credential vending, in which Polaris assumes an IAM role
+on behalf of the client and returns scoped, short-lived credentials. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+## IAM role and trust policy
+
+Polaris assumes a customer-managed IAM role via STS when a client requests credentials. The role
+must:
+
+1. Grant the actions required for object access on the bucket and prefix that backs the catalog
+ (`s3:GetObject`, `s3:PutObject`, `s3:DeleteObject`, `s3:ListBucket` and, if encryption is in use,
+ the relevant `kms:*` actions).
+2. Trust the Polaris service principal — typically the IAM role that the Polaris server runs as.
+ Polaris fills the `sts:AssumeRole` request with the configured `userArn` and, when supplied, an
+ `externalId`. The trust policy must accept both.
+
+A minimal trust policy looks like:
+
+```json
+{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Principal": { "AWS": "arn:aws:iam::123456789012:role/polaris-server" },
+ "Action": "sts:AssumeRole",
+ "Condition": {
+ "StringEquals": { "sts:ExternalId": "polaris-prod" }
+ }
+ }
+ ]
+}
+```
+
+If you do not require an external ID, omit the `Condition` block and the matching `externalId`
+field in the storage config.
+
+## Catalog storage configuration
+
+Provide the role ARN and region when creating the catalog. `userArn` is the identity Polaris
+itself uses (typically the role ARN of the server); `externalId` matches the trust policy above.
+
+```bash
+curl -X POST https://<polaris-host>/management/v1/catalogs \
+ -H "Authorization: Bearer $TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "type": "INTERNAL",
+ "name": "warehouse_s3",
+ "storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "arn:aws:iam::123456789012:role/polaris-warehouse-access",
+ "userArn": "arn:aws:iam::123456789012:role/polaris-server",
+ "externalId": "polaris-prod",
+ "region": "us-east-1"
+ },
+ "properties": { "default-base-location": "s3://warehouse-bucket/prod/" }
+ }'
+```
+
+The role ARN is validated against the pattern enforced by `AwsStorageConfigurationInfo`; an
+ill-formed ARN is rejected at catalog creation time.
+
+## Server-side encryption with KMS
+
+When the bucket uses SSE-KMS, supply the key Polaris should use for writes and the full set of
+keys it is allowed to read from:
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "...",
+ "region": "us-east-1",
+ "currentKmsKey": "arn:aws:kms:us-east-1:123456789012:key/aaaa-bbbb",
+ "allowedKmsKeys": [
+ "arn:aws:kms:us-east-1:123456789012:key/aaaa-bbbb",
+ "arn:aws:kms:us-east-1:123456789012:key/cccc-dddd"
+ ]
+}
+```
+
+The IAM role's policy must include `kms:GenerateDataKey` and `kms:Decrypt` on every key listed in
+`allowedKmsKeys`, and the key policy must grant the same to the role principal.
+
+If the deployment does not use KMS, set `kmsUnavailable` to `true` so Polaris will not request
+KMS-related session permissions:
+
+```json
+"kmsUnavailable": true
+```
+
+## S3-compatible endpoints
+
+Polaris can be pointed at S3-compatible object stores (MinIO, Ceph RGW, Apache Ozone S3 gateway).
+The available fields are:
+
+- `endpoint` — the S3 API endpoint Polaris and its clients should call.
+- `endpointInternal` — optional, used by the Polaris server when the in-cluster endpoint differs
+ from the one returned to clients.
+- `pathStyleAccess` — set to `true` for backends that do not support virtual-host-style addressing.
+- `stsEndpoint` — STS endpoint; defaults to `endpointInternal` then `endpoint` when not set.
+- `stsUnavailable` — set to `true` when the backend does not implement STS.
+
+How clients receive credentials depends on whether the backend implements STS.
+
+### Backends with STS support (e.g. AWS S3, MinIO)
+
+Leave `stsUnavailable` unset (or `false`). Polaris will assume the role and vend short-lived,
+subscoped credentials to the client at table-load time when the client sends
+`X-Iceberg-Access-Delegation: vended-credentials`. This is the recommended deployment for AWS S3
+and any compatible backend that exposes the STS API.
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "endpoint": "https://s3.internal.example.com",
+ "pathStyleAccess": true,
+ "region": "us-east-1"
+}
+```
+
+### Backends without STS support (e.g. Apache Ozone S3 gateway, Ceph RGW without STS enabled)
+
+Set `stsUnavailable: true`. Polaris will then skip subscoped credential vending, and clients must
+authenticate to the object store directly with long-lived credentials. Because the vended-credential
+path is disabled, the client must omit the `X-Iceberg-Access-Delegation` header and supply its own
+access key / secret to the underlying FileIO. The Polaris guides for [Apache Ozone][ozone-guide]
+and [Ceph][ceph-guide] show this pattern.
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "endpoint": "https://s3.internal.example.com",
+ "pathStyleAccess": true,
+ "stsUnavailable": true,
+ "region": "us-east-1"
+}
+```
+
+[ozone-guide]: ../../../../guides/ozone/
+[ceph-guide]: ../../../../guides/ceph/
+
+## Client configuration
+
+Engines connect through the Iceberg REST API and let Polaris vend credentials at table-load time;
+they do not need static AWS credentials when STS is available.
+
+Spark example, matching the property names used by the existing MinIO / RustFS guides:
+
+```shell
+bin/spark-sql \
+ --packages org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.10.1,org.apache.iceberg:iceberg-aws-bundle:1.10.1 \
+ --conf spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions \
+ --conf spark.sql.catalog.polaris=org.apache.iceberg.spark.SparkCatalog \
+ --conf spark.sql.catalog.polaris.type=rest \
+ --conf spark.sql.catalog.polaris.uri=https://<polaris-host>/api/catalog \
+ --conf spark.sql.catalog.polaris.oauth2-server-uri=https://<polaris-host>/api/catalog/v1/oauth/tokens \
+ --conf spark.sql.catalog.polaris.token-refresh-enabled=false \
+ --conf spark.sql.catalog.polaris.warehouse=warehouse_s3 \
+ --conf spark.sql.catalog.polaris.scope=PRINCIPAL_ROLE:ALL \
+ --conf spark.sql.catalog.polaris.credential=<client-id>:<client-secret> \
Review Comment:
This property implies Polaris native authentication (and locally managed principals). This is a valid use case, but it's not the only one. Since these docs make production recommendations, I believe we ought to explain external IdP options too.
For now, let's just make it explicit (small paragraph) that this page is limited to native Polaris authentication and other objects are available (even if their docs are not ready yet).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: add production configuration pages for AWS S3 and Azure Blob storage (#1325) [polaris]
Posted by "mj006648 (via GitHub)" <gi...@apache.org>.
mj006648 commented on code in PR #4451:
URL: https://github.com/apache/polaris/pull/4451#discussion_r3302768372
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,258 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring S3 Storage
+linkTitle: Configuring S3 Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3, and S3-compatible object stores (MinIO, Apache Ozone S3
+gateway, Ceph RGW, and similar), as the storage backend for a Polaris catalog. On AWS S3, all read
+and write operations are performed using credential vending: Polaris assumes a customer IAM role
+via STS and returns scoped, short-lived credentials to the client. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+This page is limited to native Polaris authentication. External identity providers are also
+supported but are not yet covered here; the configuration patterns below remain otherwise the same.
+
+## IAM role and trust policy
Review Comment:
Thanks @flyrain. Took a shot at this in <COMMIT_SHA> — added an
overview section naming the three identities and a "Polaris service
identity" section covering IRSA / EC2 / static creds plus the
sts:AssumeRole policy. Also renamed the old section to "Catalog
access role and trust policy" so the labels line up.
Quick check: I read "creating a new catalog" as the IAM role that
gets bound to the catalog at creation time. If you meant the admin
permissions to call the catalogs API, let me know and I'll handle
it separately.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: add production configuration pages for AWS S3 and Azure Blob storage (#1325) [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #4451:
URL: https://github.com/apache/polaris/pull/4451#discussion_r3276787082
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,266 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring S3 Storage
+linkTitle: Configuring S3 Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3, and S3-compatible object stores (MinIO, Apache Ozone S3
+gateway, Ceph RGW, and similar), as the storage backend for a Polaris catalog. On AWS S3, all read
+and write operations are performed using credential vending: Polaris assumes a customer IAM role
+via STS and returns scoped, short-lived credentials to the client. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+This page is limited to native Polaris authentication. External identity providers are also
+supported but are not yet covered here; the configuration patterns below remain otherwise the same.
+
+## IAM role and trust policy
+
+Polaris assumes a customer-managed IAM role via STS when a client requests credentials. The role
+must:
+
+1. Grant the actions required for object access on the bucket and prefix that backs the catalog
+ (`s3:GetObject`, `s3:PutObject`, `s3:DeleteObject`, `s3:ListBucket` and, if encryption is in use,
+ the relevant `kms:*` actions).
+2. Trust the Polaris service principal — typically the IAM role that the Polaris server runs as.
+ Polaris fills the `sts:AssumeRole` request with an `externalId` when one is configured. The
+ trust policy must accept the same external ID.
+
+Using `externalId` is recommended for cross-account or hosted Polaris deployments to mitigate the
+confused-deputy problem. A minimal trust policy looks like:
+
+```json
+{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Principal": { "AWS": "arn:aws:iam::123456789012:role/polaris-server" },
+ "Action": "sts:AssumeRole",
+ "Condition": {
+ "StringEquals": { "sts:ExternalId": "polaris-prod" }
+ }
+ }
+ ]
+}
+```
+
+## Catalog storage configuration
+
+Provide the role ARN, region, and `externalId` when creating the catalog. The token in the
+`Authorization` header below is the Polaris admin bearer token obtained from
+`/api/catalog/v1/oauth/tokens` (see [Configuring Polaris for Production]({{% relref "." %}}) for
+how to bootstrap and issue admin tokens).
+
+```bash
+curl -X POST https://<polaris-host>/management/v1/catalogs \
+ -H "Authorization: Bearer $TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "catalog": {
+ "type": "INTERNAL",
+ "name": "warehouse_s3",
+ "properties": { "default-base-location": "s3://warehouse-bucket/prod/" },
+ "storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "arn:aws:iam::123456789012:role/polaris-warehouse-access",
+ "externalId": "polaris-prod",
+ "region": "us-east-1"
+ }
+ }
+ }'
+```
+
+The role ARN is validated against the pattern enforced by `AwsStorageConfigurationInfo`; an
+ill-formed ARN is rejected at catalog creation time.
+
+## Server-side encryption with KMS
+
+When the bucket uses SSE-KMS, supply both `currentKmsKey` (the key Polaris should use for writes)
+and `allowedKmsKeys` (every key the catalog is allowed to read from). The two fields are processed
+independently in `AwsCredentialsStorageIntegration`, so the write key must be included in
+`allowedKmsKeys` as well if you want it readable through vended credentials:
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "...",
+ "region": "us-east-1",
+ "currentKmsKey": "arn:aws:kms:us-east-1:123456789012:key/aaaa-bbbb",
+ "allowedKmsKeys": [
+ "arn:aws:kms:us-east-1:123456789012:key/aaaa-bbbb",
+ "arn:aws:kms:us-east-1:123456789012:key/cccc-dddd"
+ ]
+}
+```
+
+The IAM role's policy must include `kms:GenerateDataKey` and `kms:Decrypt` on `currentKmsKey` and
+`kms:Decrypt` on every key listed in `allowedKmsKeys`, and each key policy must grant the same to
+the role principal.
+
+If the deployment does not use KMS, set `kmsUnavailable` to `true` so Polaris will not request
+KMS-related session permissions:
+
+```json
+"kmsUnavailable": true
+```
+
+## S3-compatible endpoints
+
+Polaris can be pointed at S3-compatible object stores (MinIO, Ceph RGW, Apache Ozone S3 gateway).
+The available fields are:
+
+- `endpoint` — the S3 API endpoint Polaris and its clients should call.
+- `endpointInternal` — optional, used by the Polaris server when the in-cluster endpoint differs
+ from the one returned to clients.
+- `pathStyleAccess` — set to `true` for backends that do not support virtual-host-style addressing.
+- `stsEndpoint` — STS endpoint; defaults to `endpointInternal` then `endpoint` when not set.
+- `stsUnavailable` — set to `true` when the backend does not implement STS.
+
+The credential-vending guarantee at the top of this page assumes that the backend implements STS.
+For AWS S3 and S3-compatible backends that expose the STS API (such as MinIO), leave
+`stsUnavailable` unset (or `false`) and the vended-credentials flow described above works as is.
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "endpoint": "https://s3.internal.example.com",
+ "pathStyleAccess": true,
+ "region": "us-east-1"
+}
+```
+
+For S3-compatible backends without STS (Apache Ozone S3 gateway, or Ceph RGW without STS enabled),
+set `stsUnavailable: true`. Polaris will then skip subscoped credential vending entirely, and the
+client must omit `X-Iceberg-Access-Delegation: vended-credentials` and authenticate to the object
+store directly. The Polaris guides for [Apache Ozone][ozone-guide] and [Ceph][ceph-guide] show
+this pattern end-to-end.
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "endpoint": "https://s3.internal.example.com",
+ "pathStyleAccess": true,
+ "stsUnavailable": true,
+ "region": "us-east-1"
+}
+```
+
+[ozone-guide]: ../../../../guides/ozone/
+[ceph-guide]: ../../../../guides/ceph/
+
+## Client configuration
+
+Engines connect through the Iceberg REST API and let Polaris vend credentials at table-load time;
+they do not need static AWS credentials when STS is available.
+
+Spark example, matching the property names used by the existing MinIO / RustFS guides:
+
+```shell
+bin/spark-sql \
+ --packages org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.10.1,org.apache.iceberg:iceberg-aws-bundle:1.10.1 \
+ --conf spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions \
+ --conf spark.sql.catalog.polaris=org.apache.iceberg.spark.SparkCatalog \
+ --conf spark.sql.catalog.polaris.type=rest \
+ --conf spark.sql.catalog.polaris.uri=https://<polaris-host>/api/catalog \
+ --conf spark.sql.catalog.polaris.oauth2-server-uri=https://<polaris-host>/api/catalog/v1/oauth/tokens \
+ --conf spark.sql.catalog.polaris.token-refresh-enabled=false \
+ --conf spark.sql.catalog.polaris.warehouse=warehouse_s3 \
+ --conf spark.sql.catalog.polaris.scope=PRINCIPAL_ROLE:ALL \
+ --conf spark.sql.catalog.polaris.credential=<client-id>:<client-secret> \
+ --conf spark.sql.catalog.polaris.header.X-Iceberg-Access-Delegation=vended-credentials
+```
+
+The `oauth2-server-uri` is recommended: without it the Iceberg REST client falls back to a
+hard-coded `/v1/oauth/tokens` path and logs a deprecation warning, since the automatic fallback
+is slated for removal in a future Iceberg release.
+
+For Trino, use the Iceberg connector with the REST catalog. The REST/OAuth2 properties talk to
+Polaris; the native S3 filesystem properties consume the vended credentials. Polaris itself
+returns `endpoint`, `path-style-access`, and `region` in the catalog config response, so the
+client-side `s3.*` block below is only needed where Trino requires it to be explicit (for
+example, on S3-compatible endpoints where the default AWS endpoint resolver does not apply).
+
+```properties
+connector.name=iceberg
+iceberg.catalog.type=rest
+iceberg.rest-catalog.uri=https://<polaris-host>/api/catalog
+iceberg.rest-catalog.warehouse=warehouse_s3
+iceberg.rest-catalog.security=OAUTH2
+iceberg.rest-catalog.oauth2.credential=<client-id>:<client-secret>
+iceberg.rest-catalog.oauth2.scope=PRINCIPAL_ROLE:ALL
+iceberg.rest-catalog.oauth2.server-uri=https://<polaris-host>/api/catalog/v1/oauth/tokens
+iceberg.rest-catalog.vended-credentials-enabled=true
+fs.native-s3.enabled=true
+s3.region=us-east-1
+```
+
+For S3-compatible endpoints, set the endpoint and path-style flag explicitly on the Trino side:
+
+```properties
+s3.endpoint=https://s3.internal.example.com
+s3.path-style-access=true
+```
+
+For PyIceberg, use the `rest` catalog type. The same Polaris-side properties (`uri`, `warehouse`,
+`credential`, `scope`, `oauth2-server-uri`) apply, and the vended-credential header must be
+forwarded as a REST header:
+
+```python
+from pyiceberg.catalog.rest import RestCatalog
+
+cat = RestCatalog(
+ name="polaris",
+ **{
+ "uri": "https://<polaris-host>/api/catalog",
+ "warehouse": "warehouse_s3",
+ "credential": "<client-id>:<client-secret>",
+ "scope": "PRINCIPAL_ROLE:ALL",
+ "oauth2-server-uri": "https://<polaris-host>/api/catalog/v1/oauth/tokens",
+ "header.X-Iceberg-Access-Delegation": "vended-credentials",
+ },
+)
+```
+
+Polaris returns the vended S3 properties (`s3.access-key-id`, `s3.secret-access-key`,
+`s3.session-token`) to the client at table-load time, so static credentials should not be
+configured on the PyIceberg side.
+
+## Verifying the setup
+
+A successful end-to-end test should be possible without giving the client any long-lived AWS
+credentials:
+
+```sql
+CREATE NAMESPACE warehouse_s3.demo;
+CREATE TABLE warehouse_s3.demo.t (id BIGINT, name STRING) USING iceberg;
+INSERT INTO warehouse_s3.demo.t VALUES (1, 'hello');
+SELECT * FROM warehouse_s3.demo.t;
+```
+
+If `INSERT` or `SELECT` fails with a 403, the most common causes are:
+
+- The IAM role's trust policy does not match the `userArn` / `externalId` Polaris is presenting.
Review Comment:
Did you mean `roleArn` here?
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,263 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring AWS S3 Cloud Storage
+linkTitle: Configuring AWS S3 Cloud Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3 as the storage backend for a Polaris catalog. All read and write
+operations against S3 are performed using credential vending, in which Polaris assumes an IAM role
+on behalf of the client and returns scoped, short-lived credentials. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+## IAM role and trust policy
+
+Polaris assumes a customer-managed IAM role via STS when a client requests credentials. The role
+must:
+
+1. Grant the actions required for object access on the bucket and prefix that backs the catalog
+ (`s3:GetObject`, `s3:PutObject`, `s3:DeleteObject`, `s3:ListBucket` and, if encryption is in use,
+ the relevant `kms:*` actions).
+2. Trust the Polaris service principal — typically the IAM role that the Polaris server runs as.
+ Polaris fills the `sts:AssumeRole` request with the configured `userArn` and, when supplied, an
+ `externalId`. The trust policy must accept both.
+
+A minimal trust policy looks like:
+
+```json
+{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Principal": { "AWS": "arn:aws:iam::123456789012:role/polaris-server" },
+ "Action": "sts:AssumeRole",
+ "Condition": {
+ "StringEquals": { "sts:ExternalId": "polaris-prod" }
+ }
+ }
+ ]
+}
+```
+
+If you do not require an external ID, omit the `Condition` block and the matching `externalId`
+field in the storage config.
+
+## Catalog storage configuration
+
+Provide the role ARN and region when creating the catalog. `userArn` is the identity Polaris
+itself uses (typically the role ARN of the server); `externalId` matches the trust policy above.
+
+```bash
+curl -X POST https://<polaris-host>/management/v1/catalogs \
+ -H "Authorization: Bearer $TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "type": "INTERNAL",
+ "name": "warehouse_s3",
+ "storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "arn:aws:iam::123456789012:role/polaris-warehouse-access",
+ "userArn": "arn:aws:iam::123456789012:role/polaris-server",
+ "externalId": "polaris-prod",
+ "region": "us-east-1"
+ },
+ "properties": { "default-base-location": "s3://warehouse-bucket/prod/" }
+ }'
+```
+
+The role ARN is validated against the pattern enforced by `AwsStorageConfigurationInfo`; an
+ill-formed ARN is rejected at catalog creation time.
+
+## Server-side encryption with KMS
+
+When the bucket uses SSE-KMS, supply the key Polaris should use for writes and the full set of
+keys it is allowed to read from:
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "...",
+ "region": "us-east-1",
+ "currentKmsKey": "arn:aws:kms:us-east-1:123456789012:key/aaaa-bbbb",
+ "allowedKmsKeys": [
+ "arn:aws:kms:us-east-1:123456789012:key/aaaa-bbbb",
+ "arn:aws:kms:us-east-1:123456789012:key/cccc-dddd"
+ ]
+}
+```
+
+The IAM role's policy must include `kms:GenerateDataKey` and `kms:Decrypt` on every key listed in
+`allowedKmsKeys`, and the key policy must grant the same to the role principal.
+
+If the deployment does not use KMS, set `kmsUnavailable` to `true` so Polaris will not request
+KMS-related session permissions:
+
+```json
+"kmsUnavailable": true
+```
+
+## S3-compatible endpoints
+
+Polaris can be pointed at S3-compatible object stores (MinIO, Ceph RGW, Apache Ozone S3 gateway).
+The available fields are:
+
+- `endpoint` — the S3 API endpoint Polaris and its clients should call.
+- `endpointInternal` — optional, used by the Polaris server when the in-cluster endpoint differs
+ from the one returned to clients.
+- `pathStyleAccess` — set to `true` for backends that do not support virtual-host-style addressing.
+- `stsEndpoint` — STS endpoint; defaults to `endpointInternal` then `endpoint` when not set.
+- `stsUnavailable` — set to `true` when the backend does not implement STS.
+
+How clients receive credentials depends on whether the backend implements STS.
+
+### Backends with STS support (e.g. AWS S3, MinIO)
+
+Leave `stsUnavailable` unset (or `false`). Polaris will assume the role and vend short-lived,
+subscoped credentials to the client at table-load time when the client sends
+`X-Iceberg-Access-Delegation: vended-credentials`. This is the recommended deployment for AWS S3
+and any compatible backend that exposes the STS API.
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "endpoint": "https://s3.internal.example.com",
+ "pathStyleAccess": true,
+ "region": "us-east-1"
+}
+```
+
+### Backends without STS support (e.g. Apache Ozone S3 gateway, Ceph RGW without STS enabled)
+
+Set `stsUnavailable: true`. Polaris will then skip subscoped credential vending, and clients must
+authenticate to the object store directly with long-lived credentials. Because the vended-credential
+path is disabled, the client must omit the `X-Iceberg-Access-Delegation` header and supply its own
+access key / secret to the underlying FileIO. The Polaris guides for [Apache Ozone][ozone-guide]
+and [Ceph][ceph-guide] show this pattern.
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "endpoint": "https://s3.internal.example.com",
+ "pathStyleAccess": true,
+ "stsUnavailable": true,
+ "region": "us-east-1"
+}
+```
+
+[ozone-guide]: ../../../../guides/ozone/
+[ceph-guide]: ../../../../guides/ceph/
+
+## Client configuration
+
+Engines connect through the Iceberg REST API and let Polaris vend credentials at table-load time;
+they do not need static AWS credentials when STS is available.
+
+Spark example, matching the property names used by the existing MinIO / RustFS guides:
+
+```shell
+bin/spark-sql \
+ --packages org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.10.1,org.apache.iceberg:iceberg-aws-bundle:1.10.1 \
+ --conf spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions \
+ --conf spark.sql.catalog.polaris=org.apache.iceberg.spark.SparkCatalog \
+ --conf spark.sql.catalog.polaris.type=rest \
+ --conf spark.sql.catalog.polaris.uri=https://<polaris-host>/api/catalog \
+ --conf spark.sql.catalog.polaris.oauth2-server-uri=https://<polaris-host>/api/catalog/v1/oauth/tokens \
+ --conf spark.sql.catalog.polaris.token-refresh-enabled=false \
+ --conf spark.sql.catalog.polaris.warehouse=warehouse_s3 \
+ --conf spark.sql.catalog.polaris.scope=PRINCIPAL_ROLE:ALL \
+ --conf spark.sql.catalog.polaris.credential=<client-id>:<client-secret> \
+ --conf spark.sql.catalog.polaris.header.X-Iceberg-Access-Delegation=vended-credentials
+```
+
+The `oauth2-server-uri` is recommended: without it the Iceberg REST client falls back to a
+hard-coded `/v1/oauth/tokens` path and logs a deprecation warning, since the automatic fallback
+is slated for removal in a future Iceberg release.
+
+For Trino, use the Iceberg connector with the REST catalog. Two groups of properties are
+required: the REST/OAuth2 settings for talking to Polaris, and the native S3 filesystem settings
+that Trino uses to read the vended credentials.
+
+```properties
+connector.name=iceberg
+iceberg.catalog.type=rest
+iceberg.rest-catalog.uri=https://<polaris-host>/api/catalog
+iceberg.rest-catalog.warehouse=warehouse_s3
+iceberg.rest-catalog.security=OAUTH2
+iceberg.rest-catalog.oauth2.credential=<client-id>:<client-secret>
+iceberg.rest-catalog.oauth2.scope=PRINCIPAL_ROLE:ALL
+iceberg.rest-catalog.oauth2.server-uri=https://<polaris-host>/api/catalog/v1/oauth/tokens
+iceberg.rest-catalog.vended-credentials-enabled=true
+fs.native-s3.enabled=true
+s3.region=us-east-1
+```
+
+When pointing at an S3-compatible endpoint, also set:
+
+```properties
+s3.endpoint=https://s3.internal.example.com
+s3.path-style-access=true
Review Comment:
@mj006648 : Do you think this is still necessary?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: add production configuration pages for AWS S3 and Azure Blob storage (#1325) [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #4451:
URL: https://github.com/apache/polaris/pull/4451#discussion_r3276829369
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,263 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring AWS S3 Cloud Storage
+linkTitle: Configuring AWS S3 Cloud Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3 as the storage backend for a Polaris catalog. All read and write
+operations against S3 are performed using credential vending, in which Polaris assumes an IAM role
+on behalf of the client and returns scoped, short-lived credentials. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+## IAM role and trust policy
+
+Polaris assumes a customer-managed IAM role via STS when a client requests credentials. The role
+must:
+
+1. Grant the actions required for object access on the bucket and prefix that backs the catalog
+ (`s3:GetObject`, `s3:PutObject`, `s3:DeleteObject`, `s3:ListBucket` and, if encryption is in use,
+ the relevant `kms:*` actions).
+2. Trust the Polaris service principal — typically the IAM role that the Polaris server runs as.
+ Polaris fills the `sts:AssumeRole` request with the configured `userArn` and, when supplied, an
+ `externalId`. The trust policy must accept both.
+
+A minimal trust policy looks like:
+
+```json
+{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Principal": { "AWS": "arn:aws:iam::123456789012:role/polaris-server" },
+ "Action": "sts:AssumeRole",
+ "Condition": {
+ "StringEquals": { "sts:ExternalId": "polaris-prod" }
+ }
+ }
+ ]
+}
+```
+
+If you do not require an external ID, omit the `Condition` block and the matching `externalId`
+field in the storage config.
+
+## Catalog storage configuration
+
+Provide the role ARN and region when creating the catalog. `userArn` is the identity Polaris
+itself uses (typically the role ARN of the server); `externalId` matches the trust policy above.
+
+```bash
+curl -X POST https://<polaris-host>/management/v1/catalogs \
+ -H "Authorization: Bearer $TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "type": "INTERNAL",
+ "name": "warehouse_s3",
+ "storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "arn:aws:iam::123456789012:role/polaris-warehouse-access",
+ "userArn": "arn:aws:iam::123456789012:role/polaris-server",
+ "externalId": "polaris-prod",
+ "region": "us-east-1"
+ },
+ "properties": { "default-base-location": "s3://warehouse-bucket/prod/" }
+ }'
+```
+
+The role ARN is validated against the pattern enforced by `AwsStorageConfigurationInfo`; an
+ill-formed ARN is rejected at catalog creation time.
+
+## Server-side encryption with KMS
+
+When the bucket uses SSE-KMS, supply the key Polaris should use for writes and the full set of
+keys it is allowed to read from:
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "roleArn": "...",
+ "region": "us-east-1",
+ "currentKmsKey": "arn:aws:kms:us-east-1:123456789012:key/aaaa-bbbb",
+ "allowedKmsKeys": [
+ "arn:aws:kms:us-east-1:123456789012:key/aaaa-bbbb",
+ "arn:aws:kms:us-east-1:123456789012:key/cccc-dddd"
+ ]
+}
+```
+
+The IAM role's policy must include `kms:GenerateDataKey` and `kms:Decrypt` on every key listed in
+`allowedKmsKeys`, and the key policy must grant the same to the role principal.
+
+If the deployment does not use KMS, set `kmsUnavailable` to `true` so Polaris will not request
+KMS-related session permissions:
+
+```json
+"kmsUnavailable": true
+```
+
+## S3-compatible endpoints
+
+Polaris can be pointed at S3-compatible object stores (MinIO, Ceph RGW, Apache Ozone S3 gateway).
+The available fields are:
+
+- `endpoint` — the S3 API endpoint Polaris and its clients should call.
+- `endpointInternal` — optional, used by the Polaris server when the in-cluster endpoint differs
+ from the one returned to clients.
+- `pathStyleAccess` — set to `true` for backends that do not support virtual-host-style addressing.
+- `stsEndpoint` — STS endpoint; defaults to `endpointInternal` then `endpoint` when not set.
+- `stsUnavailable` — set to `true` when the backend does not implement STS.
+
+How clients receive credentials depends on whether the backend implements STS.
+
+### Backends with STS support (e.g. AWS S3, MinIO)
+
+Leave `stsUnavailable` unset (or `false`). Polaris will assume the role and vend short-lived,
+subscoped credentials to the client at table-load time when the client sends
+`X-Iceberg-Access-Delegation: vended-credentials`. This is the recommended deployment for AWS S3
+and any compatible backend that exposes the STS API.
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "endpoint": "https://s3.internal.example.com",
+ "pathStyleAccess": true,
+ "region": "us-east-1"
+}
+```
+
+### Backends without STS support (e.g. Apache Ozone S3 gateway, Ceph RGW without STS enabled)
+
+Set `stsUnavailable: true`. Polaris will then skip subscoped credential vending, and clients must
+authenticate to the object store directly with long-lived credentials. Because the vended-credential
+path is disabled, the client must omit the `X-Iceberg-Access-Delegation` header and supply its own
+access key / secret to the underlying FileIO. The Polaris guides for [Apache Ozone][ozone-guide]
+and [Ceph][ceph-guide] show this pattern.
+
+```json
+"storageConfigInfo": {
+ "storageType": "S3",
+ "endpoint": "https://s3.internal.example.com",
+ "pathStyleAccess": true,
+ "stsUnavailable": true,
+ "region": "us-east-1"
+}
+```
+
+[ozone-guide]: ../../../../guides/ozone/
+[ceph-guide]: ../../../../guides/ceph/
+
+## Client configuration
+
+Engines connect through the Iceberg REST API and let Polaris vend credentials at table-load time;
+they do not need static AWS credentials when STS is available.
+
+Spark example, matching the property names used by the existing MinIO / RustFS guides:
+
+```shell
+bin/spark-sql \
+ --packages org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.10.1,org.apache.iceberg:iceberg-aws-bundle:1.10.1 \
+ --conf spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions \
+ --conf spark.sql.catalog.polaris=org.apache.iceberg.spark.SparkCatalog \
+ --conf spark.sql.catalog.polaris.type=rest \
+ --conf spark.sql.catalog.polaris.uri=https://<polaris-host>/api/catalog \
+ --conf spark.sql.catalog.polaris.oauth2-server-uri=https://<polaris-host>/api/catalog/v1/oauth/tokens \
+ --conf spark.sql.catalog.polaris.token-refresh-enabled=false \
+ --conf spark.sql.catalog.polaris.warehouse=warehouse_s3 \
+ --conf spark.sql.catalog.polaris.scope=PRINCIPAL_ROLE:ALL \
+ --conf spark.sql.catalog.polaris.credential=<client-id>:<client-secret> \
+ --conf spark.sql.catalog.polaris.header.X-Iceberg-Access-Delegation=vended-credentials
+```
+
+The `oauth2-server-uri` is recommended: without it the Iceberg REST client falls back to a
+hard-coded `/v1/oauth/tokens` path and logs a deprecation warning, since the automatic fallback
+is slated for removal in a future Iceberg release.
+
+For Trino, use the Iceberg connector with the REST catalog. Two groups of properties are
+required: the REST/OAuth2 settings for talking to Polaris, and the native S3 filesystem settings
+that Trino uses to read the vended credentials.
+
+```properties
+connector.name=iceberg
+iceberg.catalog.type=rest
+iceberg.rest-catalog.uri=https://<polaris-host>/api/catalog
+iceberg.rest-catalog.warehouse=warehouse_s3
+iceberg.rest-catalog.security=OAUTH2
+iceberg.rest-catalog.oauth2.credential=<client-id>:<client-secret>
+iceberg.rest-catalog.oauth2.scope=PRINCIPAL_ROLE:ALL
+iceberg.rest-catalog.oauth2.server-uri=https://<polaris-host>/api/catalog/v1/oauth/tokens
+iceberg.rest-catalog.vended-credentials-enabled=true
+fs.native-s3.enabled=true
+s3.region=us-east-1
+```
+
+When pointing at an S3-compatible endpoint, also set:
+
+```properties
+s3.endpoint=https://s3.internal.example.com
+s3.path-style-access=true
Review Comment:
These properties are provided by Polaris in config responses. AFAIK, client do not need to set the explicitly, but I have not tested that with Trino.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: add production configuration pages for AWS S3 and Azure Blob storage (#1325) [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on code in PR #4451:
URL: https://github.com/apache/polaris/pull/4451#discussion_r3301501955
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,258 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring S3 Storage
+linkTitle: Configuring S3 Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3, and S3-compatible object stores (MinIO, Apache Ozone S3
+gateway, Ceph RGW, and similar), as the storage backend for a Polaris catalog. On AWS S3, all read
+and write operations are performed using credential vending: Polaris assumes a customer IAM role
+via STS and returns scoped, short-lived credentials to the client. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+This page is limited to native Polaris authentication. External identity providers are also
+supported but are not yet covered here; the configuration patterns below remain otherwise the same.
+
+## IAM role and trust policy
Review Comment:
Thanks for adding it! I think there are three different IAM roles involved.
1. The IAM role used for starting a new Polaris instance
2. The IAM role used for creating a new catalog
3. The IAM role used for vended credentials.
This section describes the third one. Would it be possible to describe the other two?
##########
site/content/in-dev/unreleased/configuration/configuring-polaris-for-production/configuring-aws-s3-cloud-storage-specific.md:
##########
@@ -0,0 +1,258 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Configuring S3 Storage
+linkTitle: Configuring S3 Storage
+type: docs
+weight: 610
+---
+
+This page covers configuring AWS S3, and S3-compatible object stores (MinIO, Apache Ozone S3
+gateway, Ceph RGW, and similar), as the storage backend for a Polaris catalog. On AWS S3, all read
+and write operations are performed using credential vending: Polaris assumes a customer IAM role
+via STS and returns scoped, short-lived credentials to the client. The IAM role, its trust policy,
+and the bucket itself must be set up before the catalog is created.
+
+This page is limited to native Polaris authentication. External identity providers are also
+supported but are not yet covered here; the configuration patterns below remain otherwise the same.
+
+## IAM role and trust policy
Review Comment:
Thanks for adding it! I think there are three different IAM roles involved:
1. The IAM role used for starting a new Polaris instance
2. The IAM role used for creating a new catalog
3. The IAM role used for vended credentials.
This section describes the third one. Would it be possible to describe the other two?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: add production configuration pages for AWS S3 and Azure Blob storage (#1325) [polaris]
Posted by "mj006648 (via GitHub)" <gi...@apache.org>.
mj006648 commented on PR #4451:
URL: https://github.com/apache/polaris/pull/4451#issuecomment-4466176105
Thanks for the thorough review, @dimas-b! Pushed `f5eae4e` addressing your comments:
**S3 page**
- L62: removed the "if you skip external ID" guidance and recommended `externalId` as default.
- L67/79: dropped `userArn` from both the JSON example and the surrounding prose since `AwsStorageConfigurationInfo` does not use it.
- L71: added a one-line note about the bearer token being the Polaris admin OAuth2 token, with a relref to the parent production-config page.
- L102 (KMS): clarified that `currentKmsKey` and `allowedKmsKeys` are processed independently in `AwsCredentialsStorageIntegration`, so the write key has to be repeated in `allowedKmsKeys`. Fixed the IAM action wording accordingly.
- L120: retitled the page to "Configuring S3 Storage".
- L130: reconciled the STS subsection — STS-unsupported backends turn off vended credentials entirely and the client must drop the `X-Iceberg-Access-Delegation` header, instead of "falling back to long-lived credentials inside the vending flow".
- L187: added a short paragraph noting the page covers native Polaris auth and external IdPs are supported but documented elsewhere.
- L217: softened the client-side `s3.*` block — Polaris returns `endpoint`/`path-style-access`/`region` in the catalog config response, and the explicit block is now framed as "only needed where Trino requires it to be explicit (e.g. S3-compatible endpoints)". Please double-check that wording matches what you had in mind; if Polaris's response is enough on its own for the AWS S3 case, I am happy to drop the explicit block from the AWS path entirely.
**Azure page**
- L53: recommended Kubernetes Secret refs rather than plain env for `AZURE_CLIENT_SECRET` (and `POLARIS_BOOTSTRAP_CREDENTIALS`).
- L63/64 (HNS): rewrote the bullet — HNS is not required by Polaris/Iceberg for table operations themselves; the main effect is SAS-token downscoping (directory vs. container). Atomic-commit framing removed.
- L102 (`multiTenantAppName` / `consentUrl`): marked as informational only since current Apache Polaris code does not use them when communicating with Azure APIs.
- L118: added a bullet that the `hierarchical` field must match the actual HNS state, otherwise runtime access errors occur.
Re: L217 (Trino S3 block) — would be glad to drop more of it if Polaris's catalog config response is sufficient end-to-end on the Trino side. I have only verified the Trino path against MinIO with the explicit block in place; I have not tested removing it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: add production configuration pages for AWS S3 and Azure Blob storage (#1325) [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain merged PR #4451:
URL: https://github.com/apache/polaris/pull/4451
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org