Skip to content

Commit 2cfa41b

Browse files
authored
Docs/improve idp documentation (#2695)
* Fix Github links in IDP documentation * Separate IDP docs for usage and development * - Add telemetry config example - Fix link to getting started from landing page - Fix mentioning role-arn as required * Fix some relative links (local Hugo resolves them properly, but PR auto checks still fails) * Docs: narrow down --role-arn usage for AWS S3 only; fix a link in keycloak guide. * Docs: fix a link in keycloak guide.
1 parent f97c5eb commit 2cfa41b

File tree

12 files changed

+231
-123
lines changed

12 files changed

+231
-123
lines changed

client/python/cli/command/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,5 @@ def validate(self) -> None:
188188
"""
189189
Used to validate a command. Should always be called before `execute`. The arg parser will catch many issues
190190
with options, but this is used to apply additional constraints that the arg parser can't currently handle.
191-
One example is that a catalog cannot be created with the `s3` storage type without a `--role-arn` option, but
192-
one can be created without this flag if it's using the `gcs` storage type.
193191
"""
194192
raise Exception("`validate` called on abstract `Command`")

client/python/cli/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class Create:
227227
"Multiple locations can be provided by specifying this option more than once."
228228
)
229229

230-
ROLE_ARN = "(Only for S3) A role ARN to use when connecting to S3"
230+
ROLE_ARN = "(Only for AWS S3) A role ARN to use when connecting to S3"
231231
EXTERNAL_ID = "(Only for S3) The external ID to use when connecting to S3"
232232
REGION = "(Only for S3) The region to use when connecting to S3"
233233
USER_ARN = "(Only for S3) A user ARN to use when connecting to S3"

site/content/_index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ cascade:
2525
{{< blocks/cover title="Welcome to the Apache Polaris™ (incubating) web site!" image_anchor="center" color="primary" >}}
2626
Apache Polaris is an open-source, fully-featured catalog for Apache Iceberg™. It implements Iceberg's REST API, enabling seamless multi-engine interoperability across a wide range of platforms, including Apache Doris™, Apache Flink®, Apache Spark™, Dremio® OSS, StarRocks, and Trino.
2727

28-
<a href="/in-dev/unreleased/getting-started/install-dependencies/" class="btn btn-lg btn-dark mt-5">Get Started <i class="fas fa-arrow-alt-circle-right ms-2"></i></a>
28+
<a href="/in-dev/unreleased/getting-started/" class="btn btn-lg btn-dark mt-5">Get Started <i class="fas fa-arrow-alt-circle-right ms-2"></i></a>
2929

3030
{{< /blocks/cover >}}
3131

site/content/in-dev/unreleased/command-line-interface.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,12 @@ options:
133133
--type The type of catalog to create in [INTERNAL, EXTERNAL]. INTERNAL by default.
134134
--storage-type (Required) The type of storage to use for the catalog
135135
--default-base-location (Required) Default base location of the catalog
136+
--endpoint (Only for S3) The S3 endpoint to use when connecting to S3
137+
--endpoint-internal (Only for S3) The S3 endpoint used by Polaris to use when connecting to S3, if different from the one that clients use
138+
--sts-endpoint (Only for S3) The STS endpoint to use when connecting to STS
139+
--path-style-access (Only for S3) Whether to use path-style-access for S3
136140
--allowed-location An allowed location for files tracked by the catalog. Multiple locations can be provided by specifying this option more than once.
137-
--role-arn (Required for S3) A role ARN to use when connecting to S3
141+
--role-arn (Only for AWS S3) A role ARN to use when connecting to S3
138142
--region (Only for S3) The region to use when connecting to S3
139143
--external-id (Only for S3) The external ID to use when connecting to S3
140144
--tenant-id (Required for Azure) A tenant ID to use when connecting to Azure Storage
@@ -145,7 +149,7 @@ options:
145149
--catalog-connection-type The type of external catalog in [ICEBERG, HADOOP].
146150
--iceberg-remote-catalog-name The remote catalog name when federating to an Iceberg REST catalog
147151
--hadoop-warehouse The warehouse to use when federating to a HADOOP catalog
148-
--catalog-authentication-type The type of authentication in [OAUTH, BEARER, SIGV4]
152+
--catalog-authentication-type The type of authentication in [OAUTH, BEARER, SIGV4, IMPLICIT]
149153
--catalog-service-identity-type The type of service identity in [AWS_IAM]
150154
--catalog-service-identity-iam-arn When using the AWS_IAM service identity type, this is the ARN of the IAM user or IAM role Polaris uses to assume roles and then access external resources.
151155
--catalog-uri The URI of the external catalog

site/content/in-dev/unreleased/getting-started/creating-a-catalog/s3/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ For the `polaris catalogs create` [command]({{% ref "../../../command-line-inter
3232

3333
```text
3434
--storage-type s3
35-
--role-arn (Required for S3) A role ARN to use when connecting to S3
35+
--role-arn (Only for AWS S3) A role ARN to use when connecting to S3
3636
--region (Only for S3) The region to use when connecting to S3
3737
--external-id (Only for S3) The external ID to use when connecting to S3
3838
```

site/content/in-dev/unreleased/getting-started/using-polaris.md renamed to site/content/in-dev/unreleased/getting-started/using-polaris/_index.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#
2020
Title: Using Polaris
2121
type: docs
22-
weight: 400
22+
weight: 401
2323
---
2424

2525
## Setup
@@ -34,17 +34,17 @@ export CLIENT_SECRET=YOUR_CLIENT_SECRET
3434
Refer to the [Creating a Catalog]({{% ref "creating-a-catalog" %}}) page for instructions on defining a
3535
catalog for your specific storage type. The following examples assume the catalog's name is `quickstart_catalog`.
3636

37-
In Polaris, the [catalog]({{% relref "../entities#catalog" %}}) is the top-level entity that objects like [tables]({{% relref "../entities#table" %}}) and [views]({{% relref "../entities#view" %}}) are organized under.
37+
In Polaris, the [catalog]({{% relref "../../entities#catalog" %}}) is the top-level entity that objects like [tables]({{% relref "../../entities#table" %}}) and [views]({{% relref "../../entities#view" %}}) are organized under.
3838

3939
The `DEFAULT_BASE_LOCATION` value you provided at catalog creation time will be the default location that objects in
4040
this catalog should be stored in.
4141

42-
Additionally, if Polaris is running somewhere other than `localhost:8181`, you can specify the correct hostname and port by providing `--host` and `--port` flags. For the full set of options supported by the CLI, please refer to the [docs]({{% relref "../command-line-interface" %}}).
42+
Additionally, if Polaris is running somewhere other than `localhost:8181`, you can specify the correct hostname and port by providing `--host` and `--port` flags. For the full set of options supported by the CLI, please refer to the [docs]({{% relref "../../command-line-interface" %}}).
4343

4444

4545
### Creating a Principal and Assigning it Privileges
4646

47-
With a catalog created, we can create a [principal]({{% relref "../entities#principal" %}}) that has access to manage that catalog. For details on how to configure the Polaris CLI, see [the section above](#defining-a-catalog) or refer to the [docs]({{% relref "../command-line-interface" %}}).
47+
With a catalog created, we can create a [principal]({{% relref "../../entities#principal" %}}) that has access to manage that catalog. For details on how to configure the Polaris CLI, see [the section above](#defining-a-catalog) or refer to the [docs]({{% relref "../../command-line-interface" %}}).
4848

4949
```shell
5050
./polaris \
@@ -81,7 +81,7 @@ export USER_CLIENT_ID=XXXX
8181
export USER_CLIENT_SECRET=YYYY
8282
```
8383

84-
Now, we grant the principal the [principal role]({{% relref "../entities#principal-role" %}}) we created, and grant the [catalog role]({{% relref "../entities#catalog-role" %}}) the principal role we created. For more information on these entities, please refer to the linked documentation.
84+
Now, we grant the principal the [principal role]({{% relref "../../entities#principal-role" %}}) we created, and grant the [catalog role]({{% relref "../../entities#catalog-role" %}}) the principal role we created. For more information on these entities, please refer to the linked documentation.
8585

8686
```shell
8787
./polaris \
@@ -106,7 +106,7 @@ Now, we’ve linked our principal to the catalog via roles like so:
106106

107107
![Principal to Catalog](/img/quickstart/privilege-illustration-1.png "Principal to Catalog")
108108

109-
In order to give this principal the ability to interact with the catalog, we must assign some [privileges]({{% relref "../entities#privilege" %}}). For the time being, we will give this principal the ability to fully manage content in our new catalog. We can do this with the CLI like so:
109+
In order to give this principal the ability to interact with the catalog, we must assign some [privileges]({{% relref "../../entities#privilege" %}}). For the time being, we will give this principal the ability to fully manage content in our new catalog. We can do this with the CLI like so:
110110

111111
```shell
112112
./polaris \
@@ -120,7 +120,7 @@ In order to give this principal the ability to interact with the catalog, we mus
120120
CATALOG_MANAGE_CONTENT
121121
```
122122

123-
This grants the [catalog privileges]({{% relref "../entities#privilege" %}}) `CATALOG_MANAGE_CONTENT` to our catalog role, linking everything together like so:
123+
This grants the [catalog privileges]({{% relref "../../entities#privilege" %}}) `CATALOG_MANAGE_CONTENT` to our catalog role, linking everything together like so:
124124

125125
![Principal to Catalog with Catalog Role](/img/quickstart/privilege-illustration-2.png "Principal to Catalog with Catalog Role")
126126

@@ -334,7 +334,9 @@ curl -v http://127.0.0.1:8181/api/management/v1/catalogs/quickstart_catalog -H "
334334
```
335335

336336
## Next Steps
337-
* Visit [Configuring Polaris for Production]({{% relref "../configuring-polaris-for-production" %}}).
337+
* Visit [Using Keycloak as the external identity provider]({{% relref "keycloak-idp" %}}).
338+
* Visit [Using Polaris with telemetry tools]({{% relref "telemetry-tools" %}}).
339+
* Visit [Configuring Polaris for Production]({{% relref "../../configuring-polaris-for-production" %}}).
338340
* A Getting Started experience for using Spark with Jupyter Notebooks is documented [here](https://github.com/apache/polaris/blob/main/getting-started/spark/README.md).
339341
* To shut down a locally-deployed Polaris server and clean up all related Docker containers, run the command listed below. Cloud Deployments have their respective termination commands on their Deployment page, while Polaris running on Gradle will terminate when the Gradle process terminates.
340342
```shell

site/content/in-dev/unreleased/managing-security/external-idp/keycloak-idp.md renamed to site/content/in-dev/unreleased/getting-started/using-polaris/keycloak-idp.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@
1717
# specific language governing permissions and limitations
1818
# under the License.
1919
#
20-
title: Using Polaris with Keycloak as external IDP
20+
title: Getting Started with Apache Polaris, External Authentication and Keycloak
2121
linkTitle: Using Keycloak IDP
2222
type: docs
23-
weight: 100
23+
weight: 400
2424
---
2525

26+
## Overview
27+
2628
This example uses Keycloak as an **external** identity provider for Polaris. The "iceberg" realm is automatically
2729
created and configured from the `iceberg-realm.json` file.
2830

@@ -48,7 +50,7 @@ Polaris is configured with 3 realms:
4850
issued by both Polaris and Keycloak.
4951

5052
For more information about how to configure Polaris with external authentication, see the
51-
[Polaris documentation]({{% ref "../external-idp" %}}).
53+
[IDP integration documentation]({{% relref "../../managing-security/external-idp" %}}).
5254

5355
## Starting the Example
5456

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
#
20+
title: Getting Started with Apache Polaris, Prometheus and Jaeger
21+
linkTitle: Using Polaris with telemetry tools
22+
type: docs
23+
weight: 401
24+
---
25+
26+
This example requires `jq` to be installed on your machine.
27+
28+
1. Build the Polaris image if it's not already present locally:
29+
30+
```shell
31+
./gradlew \
32+
:polaris-server:assemble \
33+
:polaris-server:quarkusAppPartsBuild --rerun \
34+
-Dquarkus.container-image.build=true
35+
```
36+
37+
2. Start the docker compose group by running the following command from the root of the repository:
38+
39+
```shell
40+
export ASSETS_PATH=$(pwd)/getting-started/assets/
41+
export CLIENT_ID=root
42+
export CLIENT_SECRET=s3cr3t
43+
docker compose -f getting-started/telemetry/docker-compose.yml up
44+
```
45+
46+
3. To access Polaris from the host machine, first request an access token:
47+
48+
```shell
49+
export POLARIS_TOKEN=$(curl -s http://localhost:8181/api/catalog/v1/oauth/tokens \
50+
--user root:s3cr3t \
51+
-d 'grant_type=client_credentials' \
52+
-d 'scope=PRINCIPAL_ROLE:ALL' | jq -r .access_token)
53+
```
54+
55+
4. Then, use the access token in the Authorization header when accessing Polaris; you can also test
56+
the `Polaris-Request-Id` header; you should see it in all logs and traces:
57+
58+
```shell
59+
curl -v 'http://localhost:8181/api/management/v1/principal-roles' \
60+
-H "Authorization: Bearer $POLARIS_TOKEN" \
61+
-H "Polaris-Request-Id: 1234"
62+
curl -v 'http://localhost:8181/api/catalog/v1/config?warehouse=quickstart_catalog' \
63+
-H "Authorization: Bearer $POLARIS_TOKEN" \
64+
-H "Polaris-Request-Id: 5678"
65+
```
66+
67+
5. Access the following services:
68+
69+
- Prometheus UI: browse to http://localhost:9093 to view metrics.
70+
- Jaeger UI: browse to http://localhost:16686 to view traces.

site/content/in-dev/unreleased/managing-security/_index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,9 @@
2020
title: Managing Security
2121
linkTitle: Managing Security
2222
type: docs
23-
weight: 1001
23+
weight: 550
2424
---
25+
26+
## [Access Control]({{< relref "access-control" >}})
27+
28+
## [Authentification and Identity Providers]({{< relref "external-idp" >}})

0 commit comments

Comments
 (0)