You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polaris.apache.org by ad...@apache.org on 2026/04/01 10:19:51 UTC
(polaris) branch conductor/helm-realm-require-header created (now 2e94ef3133)
This is an automated email from the ASF dual-hosted git repository.
adutra pushed a change to branch conductor/helm-realm-require-header
in repository https://gitbox.apache.org/repos/asf/polaris.git
at 2e94ef3133 Helm: Add support for polaris.realm-context.require-header option
This branch includes the following new commits:
new 2e94ef3133 Helm: Add support for polaris.realm-context.require-header option
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(polaris) 01/01: Helm: Add support for polaris.realm-context.require-header option
Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
adutra pushed a commit to branch conductor/helm-realm-require-header
in repository https://gitbox.apache.org/repos/asf/polaris.git
commit 2e94ef313342c750af1c981af6b09d0b8211c101
Author: Alexandre Dutra <ad...@apache.org>
AuthorDate: Wed Apr 1 12:19:30 2026 +0200
Helm: Add support for polaris.realm-context.require-header option
Co-Authored-By: Claude Opus 4.6 <no...@anthropic.com>
---
helm/polaris/templates/configmap.yaml | 1 +
helm/polaris/tests/configmap_test.yaml | 3 ++-
helm/polaris/values.schema.json | 4 ++++
helm/polaris/values.yaml | 5 +++++
site/content/in-dev/unreleased/helm-chart/reference.md | 1 +
5 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/helm/polaris/templates/configmap.yaml b/helm/polaris/templates/configmap.yaml
index 27613c4418..75b7dcb76b 100644
--- a/helm/polaris/templates/configmap.yaml
+++ b/helm/polaris/templates/configmap.yaml
@@ -35,6 +35,7 @@ data:
{{- /* Realm Context */ -}}
{{- $_ := set $map "polaris.realm-context.type" .Values.realmContext.type -}}
{{- $_ = set $map "polaris.realm-context.realms" (join "," .Values.realmContext.realms) -}}
+ {{- $_ = set $map "polaris.realm-context.require-header" .Values.realmContext.requireHeader -}}
{{- /* Features */ -}}
{{- range $k, $v := .Values.features -}}
diff --git a/helm/polaris/tests/configmap_test.yaml b/helm/polaris/tests/configmap_test.yaml
index 40417eea6a..5ab960bb60 100644
--- a/helm/polaris/tests/configmap_test.yaml
+++ b/helm/polaris/tests/configmap_test.yaml
@@ -98,10 +98,11 @@ tests:
- it: should configure realm context
set:
- realmContext: { type: "custom", realms: [ "realm1", "realm2" ] }
+ realmContext: { type: "custom", realms: [ "realm1", "realm2" ], requireHeader: true }
asserts:
- matchRegex: { path: 'data["application.properties"]', pattern: "polaris.realm-context.type=custom" }
- matchRegex: { path: 'data["application.properties"]', pattern: "polaris.realm-context.realms=realm1,realm2" }
+ - matchRegex: { path: 'data["application.properties"]', pattern: "polaris.realm-context.require-header=true" }
- it: should configure features
set:
diff --git a/helm/polaris/values.schema.json b/helm/polaris/values.schema.json
index 970a1a4b38..e76b30c88c 100644
--- a/helm/polaris/values.schema.json
+++ b/helm/polaris/values.schema.json
@@ -1127,6 +1127,10 @@
"type": "string"
}
},
+ "requireHeader": {
+ "description": "Whether to require the realm header in requests. When set to true, requests without the realm header will be rejected. When set to false, the default realm will be used instead. It is recommended to set this to true in production environments.",
+ "type": "boolean"
+ },
"type": {
"description": "The type of realm context resolver to use. Two built-in types are supported: default and test; test is not recommended for production as it does not perform any realm validation.",
"type": "string"
diff --git a/helm/polaris/values.yaml b/helm/polaris/values.yaml
index c402d5a6cc..132cbea1e5 100644
--- a/helm/polaris/values.yaml
+++ b/helm/polaris/values.yaml
@@ -855,6 +855,11 @@ realmContext:
# @section -- Realm Context
realms:
- POLARIS
+ # -- Whether to require the realm header in requests. When set to true, requests without the
+ # realm header will be rejected. When set to false, the default realm will be used instead.
+ # It is recommended to set this to true in production environments.
+ # @section -- Realm Context
+ requireHeader: false
# -- Features to enable or disable globally. If a feature is not present in the map, the default
# built-in value is used. Refer to Polaris [Configuration reference](https://polaris.apache.org/in-dev/unreleased/configuration/configuration-reference)
diff --git a/site/content/in-dev/unreleased/helm-chart/reference.md b/site/content/in-dev/unreleased/helm-chart/reference.md
index 72b8183028..47b8de377a 100644
--- a/site/content/in-dev/unreleased/helm-chart/reference.md
+++ b/site/content/in-dev/unreleased/helm-chart/reference.md
@@ -247,6 +247,7 @@ weight: 900
|-----|------|---------|-------------|
| realmContext.type | string | `"default"` | The type of realm context resolver to use. Two built-in types are supported: default and test; test is not recommended for production as it does not perform any realm validation. |
| realmContext.realms | list | `["POLARIS"]` | List of valid realms, for use with the default realm context resolver. The first realm in the list is the default realm. Realms not in this list will be rejected. |
+| realmContext.requireHeader | bool | `false` | Whether to require the realm header in requests. When set to true, requests without the realm header will be rejected. When set to false, the default realm will be used instead. It is recommended to set this to true in production environments. |
### Features