You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Set to true to allow access to OpenSearch/Dashboards without login
210
+
OPENSEARCH_ANONYMOUS_AUTH_ENABLED=false
211
+
208
212
# OpenTelemetry Collector Configuration
209
213
OTEL_COLLECTOR_VERSION=0.143.0
210
214
OTEL_COLLECTOR_HOST=otel-collector
@@ -937,13 +941,31 @@ When modifying OpenSearch credentials:
937
941
938
942
Data Prepper uses a template (`pipelines.template.yaml`) with placeholders processed at container startup via `command:` in docker-compose.yml. No manual credential edits needed in pipeline configs.
939
943
944
+
### Anonymous Authentication
945
+
946
+
Anonymous auth is controlled by `OPENSEARCH_ANONYMOUS_AUTH_ENABLED` in `.env` (default: `false`). When enabled, users can access OpenSearch Dashboards without logging in.
947
+
948
+
The setting is injected at container startup via `sed` into two templates:
Additionally, `savedObjects.permission.enabled` is conditionally set in the Dashboards config at container startup: `false`when anonymous auth is enabled (so anonymous users can access workspaces created by the init script), and `true` (the default) when anonymous auth is disabled. This version of OSD does not support per-workspace permission grants via the API, so without disabling this setting anonymous users get 403 on all workspace-scoped API calls.
953
+
954
+
The init script sets the `defaultWorkspace` UI setting after creating the Observability Stack workspace, so all users (including anonymous) land directly in the workspace instead of seeing a workspace picker.
955
+
956
+
Anonymous users can browse data, view, create, and modify saved objects (visualizations, dashboards, saved queries), explore traces and service maps, run queries, and access the REST API without credentials. They cannot delete existing saved objects or perform admin operations.
957
+
958
+
Modify access is required because Dashboards persists UI settings on every page load via `update` and `bulk` writes to its system indices. Without these permissions the page fails with 403 errors. Since UI settings and saved objects share the same indices, this also allows modification of existing saved objects.
959
+
960
+
**Important**: Toggling `OPENSEARCH_ANONYMOUS_AUTH_ENABLED` requires `docker compose down -v` (not just `restart`) because OpenSearch applies security configuration to an internal index on first startup. The `-v` flag removes all stored data (traces, logs, saved dashboards) to force reinitialization.
961
+
940
962
### Configuration File Locations
941
963
942
-
- **OpenSearch**: No custom config file - uses environment variables in docker-compose.yml
964
+
- **OpenSearch**: Environment variables in docker-compose.yml + `docker-compose/opensearch/opensearch-security/config.template.yml` (anonymous auth injected at startup)
- **Data Prepper**: `docker-compose/data-prepper/pipelines.template.yaml` (credentials injected at startup) and `docker-compose/data-prepper/data-prepper-config.yaml`
Copy file name to clipboardExpand all lines: README.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -310,6 +310,42 @@ The interactive installer prompts "Customize OpenSearch credentials?" — enter
310
310
311
311
**How it works:**`.env` is the single source of truth for credentials. OpenSearch, Dashboards, and the init script read from `.env` via environment variables. Data Prepper uses a [template](docker-compose/data-prepper/pipelines.template.yaml) with `OPENSEARCH_USER`/`OPENSEARCH_PASSWORD` placeholders that are injected via `sed` at container startup — no manual config edits needed. OpenSearch uses HTTPS with self-signed certificates, so use `-k` flag with curl commands.
312
312
313
+
### Anonymous Authentication
314
+
315
+
By default, OpenSearch Dashboards requires login with credentials. You can enable anonymous authentication to allow users to access Dashboards without a login prompt — useful for demos, workshops, or shared development environments.
316
+
317
+
**To enable anonymous access**, set in `.env`:
318
+
```env
319
+
OPENSEARCH_ANONYMOUS_AUTH_ENABLED=true
320
+
```
321
+
322
+
Then restart the stack:
323
+
```bash
324
+
docker compose down -v
325
+
docker compose up -d
326
+
```
327
+
328
+
> **Warning:** The `-v` flag removes all stored data (traces, logs, saved dashboards). This is required because OpenSearch applies security configuration (roles, role mappings) to an internal index on first startup — restarting without `-v` won't update the security settings.
329
+
330
+
**What anonymous users can do:**
331
+
- Browse and search all data (traces, logs, metrics)
332
+
- View existing dashboards, visualizations, and saved queries
333
+
- Create and modify visualizations, dashboards, saved queries, and index patterns
334
+
- Explore trace analytics and service maps
335
+
- Run PPL and SQL queries
336
+
- Access the OpenSearch REST API without credentials (e.g., `curl -k https://localhost:9200/_cat/indices`)
337
+
338
+
**What anonymous users cannot do:**
339
+
- Delete existing dashboards, visualizations, or saved objects
340
+
- Write data to OpenSearch indices
341
+
- Perform admin operations (cluster settings, security configuration, user management)
342
+
343
+
> **Why modify is allowed:** OpenSearch Dashboards requires `update` and `bulk` write permissions on its system indices to persist UI settings (theme, date format, default index) on every page load. Without these permissions the page fails with 403 "Unable to update UI setting" errors. Because UI settings and saved objects share the same system indices, granting the permissions Dashboards needs to function also allows modification of existing saved objects. Deletion is still blocked.
344
+
345
+
Admin operations still require full credentials. When disabled (the default), all users must authenticate via the login page.
346
+
347
+
**Toggling back to require login:** Set `OPENSEARCH_ANONYMOUS_AUTH_ENABLED=false` in `.env` and restart with `docker compose down -v && docker compose up -d`. Note that the `-v` flag removes all stored data (traces, logs, saved dashboards) — this is required because OpenSearch applies security configuration to an internal index on first startup.
Copy file name to clipboardExpand all lines: docker-compose/README.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -299,6 +299,30 @@ Then access your cloud Dashboards URL directly — no local container needed.
299
299
300
300
For production environments with valid certificates, enable verification in each of these places.
301
301
302
+
## Anonymous Authentication
303
+
304
+
By default, users must log in to access OpenSearch Dashboards. To skip the login page (useful for demos or workshops), enable anonymous authentication in `.env`:
305
+
306
+
```env
307
+
OPENSEARCH_ANONYMOUS_AUTH_ENABLED=true
308
+
```
309
+
310
+
Then restart:
311
+
```bash
312
+
docker compose down -v
313
+
docker compose up -d
314
+
```
315
+
316
+
> **Warning:** The `-v` flag removes all stored data (traces, logs, saved dashboards). This is required because OpenSearch applies security configuration (roles, role mappings) to an internal index on first startup. Without `-v`, the security settings are not reinitialized and the change won't take effect.
317
+
318
+
Anonymous users can browse all data, view, create, and modify saved objects (visualizations, dashboards, saved queries, index patterns), explore traces and service maps, run queries, and access the OpenSearch REST API without credentials. They cannot delete existing saved objects or perform admin operations — those still require credentials.
319
+
320
+
> **Note:** Modify access is required because OpenSearch Dashboards persists UI settings (theme, date format, default index) on every page load via `update` and `bulk` writes to its system indices. Without these permissions the page fails with 403 errors. Since UI settings and saved objects share the same indices, this also allows modification of existing saved objects. Deletion is still blocked.
321
+
322
+
Set `OPENSEARCH_ANONYMOUS_AUTH_ENABLED=false` (the default) to require login for all users. Restart with `docker compose down -v && docker compose up -d` to apply. Note that the `-v` flag removes all stored data (traces, logs, saved dashboards) — this is required because OpenSearch applies security configuration to an internal index on first startup.
323
+
324
+
**Troubleshooting:** If toggling `OPENSEARCH_ANONYMOUS_AUTH_ENABLED` doesn't take effect, make sure you used `docker compose down -v` (not just `docker compose restart` or `docker compose down` without `-v`). The `-v` flag is required to reinitialize OpenSearch's security configuration.
325
+
302
326
## Security Warning
303
327
304
328
⚠️ **This configuration is for development only!**
@@ -308,13 +332,15 @@ Security considerations:
308
332
- SSL certificate verification is disabled for development ease
309
333
- Permissive CORS settings
310
334
- No network isolation between services
335
+
- Anonymous authentication is disabled by default (enable via `OPENSEARCH_ANONYMOUS_AUTH_ENABLED=true` in `.env`)
311
336
312
337
For production use:
313
338
- Change default passwords
314
339
- Enable proper SSL/TLS with valid certificates
315
340
- Configure proper authentication and authorization
316
341
- Implement network policies
317
342
- Review and harden all security settings
343
+
- Keep anonymous authentication disabled
318
344
319
345
Never use this configuration in production without proper hardening.
0 commit comments