eric-maynard commented on code in PR #2643:
URL: https://github.com/apache/polaris/pull/2643#discussion_r2369599442
##########
site/content/in-dev/unreleased/command-line-interface.md:
##########
@@ -81,6 +83,11 @@ If the `--host` and `--port` options are not provided, the
CLI will default to c
Alternatively, the `--base-url` option can be used instead of `--host` and
`--port`, but both options cannot be used simultaneously. This allows
specifying arbitrary Polaris URLs, including HTTPS ones, that have additional
base prefixes before the `/api/*/v1` subpaths.
+If your polaris server is configured to use multy realm (or not default
realm), you can use `--realm` option to specify the realm you want to use. If
`--realm` is not provided, the CLI will check the `REALM` environment variable.
If neither is provided, the CLI will not use realm context header.
Review Comment:
```suggestion
If your Polaris server is configured to use a realm other than the default,
you can use the `--realm` option to specify a realm. If `--realm` is not
provided, the CLI will check the `REALM` environment variable. If neither is
provided, the CLI will not send the realm context header.
```
##########
site/content/in-dev/unreleased/command-line-interface.md:
##########
@@ -81,6 +83,11 @@ If the `--host` and `--port` options are not provided, the
CLI will default to c
Alternatively, the `--base-url` option can be used instead of `--host` and
`--port`, but both options cannot be used simultaneously. This allows
specifying arbitrary Polaris URLs, including HTTPS ones, that have additional
base prefixes before the `/api/*/v1` subpaths.
+If your polaris server is configured to use multy realm (or not default
realm), you can use `--realm` option to specify the realm you want to use. If
`--realm` is not provided, the CLI will check the `REALM` environment variable.
If neither is provided, the CLI will not use realm context header.
+Also, if you polaris server uses custom realm header name, you can use
`--realm-header` option to specify the header name. If `--realm-header` is not
provided, the CLI will check the `REALM_HEADER` environment variable. If
neither is provided, the CLI will use default header name `Polaris-Realm`.
Review Comment:
```suggestion
Also, if your Polaris server uses a custom realm header name, you can use
the `--realm-header` option to specify it. If `--realm-header` is not provided,
the CLI will check the `REALM_HEADER` environment variable. If neither is
provided, the CLI will use default header name `Polaris-Realm`.
```
##########
client/python/cli/constants.py:
##########
@@ -369,6 +371,9 @@ class Namespaces:
CLIENT_ID_ENV = "CLIENT_ID"
CLIENT_SECRET_ENV = "CLIENT_SECRET"
CLIENT_PROFILE_ENV = "CLIENT_PROFILE"
+REALM_ENV = "REALM"
+REALM_HEADER_ENV = "REALM_HEADER"
Review Comment:
I think the ability to specify a custom realm header is valuable, though I
wonder if it is worth a new argument. In the end, the CLI can't expose every
custom behavior and this may be in the realm (ha) of things we route people to
using the REST API directly for.
If we do want the CLI to support a custom header name, perhaps we could
consider an API like:
```bash
polaris ... --realm '{"my-header": "realm_name"}'
```
I'll be interested to see what other reviewers think about CLI support for
custom header names.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]