Skip to content

Commit 408a50a

Browse files
committed
Revert "Merge pull request #8 from kylehounslow/feat/helm-anon-auth"
This reverts commit 00169ec, reversing changes made to d33c863. Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
1 parent 5726f8b commit 408a50a

7 files changed

Lines changed: 1 addition & 232 deletions

File tree

charts/observability-stack/README.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,6 @@ Sources: [OpenSearch shard sizing](https://opensearch.org/blog/optimize-opensear
162162
See `values.yaml` for all options. Notable settings:
163163
164164
```yaml
165-
# Anonymous auth — skip login page for demos/workshops
166-
anonymousAuth:
167-
enabled: false # Set true to allow access without credentials
168-
169165
# Credentials (update opensearchPassword before any real deployment)
170166
opensearchUsername: "admin"
171167
opensearchPassword: "My_password_123!@#"
@@ -183,30 +179,6 @@ prometheus:
183179
# ... etc
184180
```
185181

186-
## Anonymous Authentication
187-
188-
By default, OpenSearch Dashboards requires login. Enable anonymous auth to skip the login page — useful for demos, workshops, or shared dev environments.
189-
190-
```bash
191-
helm install obs-stack charts/observability-stack \
192-
--set anonymousAuth.enabled=true \
193-
--set global.anonymousAuth.enabled=true
194-
```
195-
196-
> **Note:** Both `anonymousAuth.enabled` and `global.anonymousAuth.enabled` must be set. The `global` value is needed because the OpenSearch Dashboards subchart config uses Go templating and can only access global values.
197-
198-
**What anonymous users can do:**
199-
- Browse all data (logs, traces, metrics)
200-
- View, create, and modify saved objects (visualizations, dashboards, saved queries)
201-
- Explore traces and service maps
202-
- Run queries and access the OpenSearch REST API
203-
204-
**What anonymous users cannot do:**
205-
- Delete existing saved objects
206-
- Perform admin operations (user management, security config)
207-
208-
**To disable:** Remove the `--set` flags (or set both to `false`) and redeploy.
209-
210182
## OpenTelemetry Demo (Optional)
211183

212184
The [OpenTelemetry Demo](https://opentelemetry.io/docs/demo/) is available as an optional subchart. It deploys a full microservices e-commerce app (20+ services) that generates realistic telemetry — useful for load testing and showcasing the stack.

charts/observability-stack/files/init-opensearch-dashboards.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
PROMETHEUS_PORT = os.getenv("PROMETHEUS_PORT", "9090")
1616
_opensearch_protocol = os.getenv("OPENSEARCH_PROTOCOL", "https")
1717
OPENSEARCH_ENDPOINT = f"{_opensearch_protocol}://{os.getenv('OPENSEARCH_HOST', 'opensearch')}:{os.getenv('OPENSEARCH_PORT', '9200')}"
18-
ANONYMOUS_AUTH_ENABLED = os.getenv("OPENSEARCH_ANONYMOUS_AUTH_ENABLED", "false").lower() == "true"
1918

2019
def wait_for_dashboards():
2120
"""Wait for OpenSearch Dashboards to be ready"""
@@ -233,7 +232,7 @@ def create_prometheus_datasource(workspace_id):
233232

234233
payload = {
235234
"name": datasource_name,
236-
"allowedRoles": ["all_access", "opendistro_security_anonymous_role"] if ANONYMOUS_AUTH_ENABLED else ["all_access"],
235+
"allowedRoles": [],
237236
"connector": "prometheus",
238237
"properties": {
239238
"prometheus.uri": prometheus_endpoint,

charts/observability-stack/templates/init-dashboards-job.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ spec:
4444
value: "80"
4545
- name: OPENSEARCH_ENDPOINT
4646
value: "https://opensearch-cluster-master:9200"
47-
- name: OPENSEARCH_ANONYMOUS_AUTH_ENABLED
48-
value: {{ .Values.anonymousAuth.enabled | quote }}
4947
volumeMounts:
5048
- name: init-script
5149
mountPath: /scripts

charts/observability-stack/templates/opensearch-security-config.yaml

Lines changed: 0 additions & 103 deletions
This file was deleted.

charts/observability-stack/tests/anonymous_auth_test.yaml

Lines changed: 0 additions & 58 deletions
This file was deleted.

charts/observability-stack/values.yaml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
# Default values for observability-stack umbrella chart
22
# Mirrors the docker-compose setup for Kubernetes deployment
33

4-
# -- Anonymous authentication (skip login page for demos/workshops)
5-
# When enabled, users can access OpenSearch Dashboards without logging in.
6-
# Anonymous users can browse data, create/modify saved objects, but cannot
7-
# delete existing saved objects or perform admin operations.
8-
anonymousAuth:
9-
enabled: false
10-
114
# -- OpenSearch
125
# Sizing guide:
136
# Storage: daily_ingest_GB × 1.45 × (replicas + 1) × retention_days
@@ -42,9 +35,6 @@ opensearch:
4235
config:
4336
opensearch.yml: |
4437
plugins.query.datasources.encryption.masterkey: "BTqK4Ytdz67La1kShIKV3Pu9"
45-
securityConfig:
46-
config:
47-
securityConfigSecret: "opensearch-security-config"
4838
4939
# -- OpenSearch Dashboards
5040
opensearch-dashboards:
@@ -91,7 +81,6 @@ opensearch-dashboards:
9181
opensearch.requestHeadersAllowlist: ["authorization", "securitytenant"]
9282
opensearch_security.multitenancy.enabled: false
9383
opensearch_security.readonly_mode.roles: ["kibana_read_only"]
94-
opensearch_security.auth.anonymous_auth_enabled: {{ .Values.global.anonymousAuth.enabled }}
9584
console.enabled: true
9685
server.maxPayloadBytes: 1048576
9786
savedObjects.maxImportPayloadBytes: 26214400
@@ -101,11 +90,6 @@ opensearch-dashboards:
10190
explore.discoverMetrics.enabled: true
10291
explore.agentTraces.enabled: true
10392
workspace.enabled: true
104-
{{- if .Values.global.anonymousAuth.enabled }}
105-
savedObjects.permission.enabled: false
106-
{{- else }}
107-
savedObjects.permission.enabled: true
108-
{{- end }}
10993
data_source.enabled: true
11094
data_source.ssl.verificationMode: none
11195
datasetManagement.enabled: true
@@ -522,10 +506,3 @@ gateway:
522506
# host: dashboards.example.com
523507
# annotations:
524508
# application-networking.k8s.aws/certificate-arn: arn:aws:acm:REGION:ACCOUNT:certificate/ID
525-
526-
# -- Global values (accessible to all subcharts via .Values.global)
527-
# Used to pass anonymousAuth.enabled to opensearch-dashboards subchart config
528-
# which uses tpl() for Go template rendering.
529-
global:
530-
anonymousAuth:
531-
enabled: false

terraform/aws/observability-stack.tf

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -163,22 +163,6 @@ resource "helm_release" "observability_stack" {
163163
}
164164
}
165165

166-
# --- Anonymous auth (conditional) ---
167-
dynamic "set" {
168-
for_each = var.anonymous_auth ? [1] : []
169-
content {
170-
name = "anonymousAuth.enabled"
171-
value = "true"
172-
}
173-
}
174-
dynamic "set" {
175-
for_each = var.anonymous_auth ? [1] : []
176-
content {
177-
name = "global.anonymousAuth.enabled"
178-
value = "true"
179-
}
180-
}
181-
182166
depends_on = [
183167
helm_release.aws_lb_controller,
184168
]

0 commit comments

Comments
 (0)