Skip to content

feat: OpenSearch security hardening#375

Open
defesteban wants to merge 2 commits into
mainfrom
feature/security_hardening
Open

feat: OpenSearch security hardening#375
defesteban wants to merge 2 commits into
mainfrom
feature/security_hardening

Conversation

@defesteban
Copy link
Copy Markdown
Collaborator

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

What's done:

  1. Added Run Hardening Tests pipeline.

  2. Added PYTHONDONTWRITEBYTECODE=1 environment variable for all Python images.

  3. Added opensearch-service.defaultLabels to all pods.

  4. Actualized pod security context with {runAsUser: 1000, runAsGroup: 1000} and container security context with {readOnlyRootFilesystem: true} (all except OpenSearch).

  5. OpenSearch: installed plugins in Dockerfile; used /tmp folder for reconfiguration.sh script; added /usr/share/opensearch/logs and /tmp empty directories.

  6. OpenSearch Dashboards: added /usr/share/opensearch-dashboards/data and /usr/share/opensearch-dashboards/optimize empty directories.

  7. Monitoring: moved logs from /opt/elasticsearch-monitoring/exec-scripts to /tmp/monitoring/logs folder; added /tmp empty directory.

  8. TLS init: moved all files to ${OPENSEARCH_CONFIGS} folder; added /opt/opensearch-tls-init/config empty directory.

  9. Tests: added Test Container Hardening test; fixed work with resource files in HA tests; added /tmp empty directory.

@github-actions github-actions Bot added the enhancement New feature or request label May 22, 2026
@defesteban defesteban changed the title feature: OpenSearch security hardening feat: OpenSearch security hardening May 22, 2026
Comment thread operator/charts/helm/opensearch-service/templates/dashboards/deployment.yaml Outdated
1. Added `Run Hardening Tests` pipeline.
2. Added `PYTHONDONTWRITEBYTECODE=1` environment variable for all Python images.
3. Added `opensearch-service.defaultLabels` to all pods.
4. Actualized pod security context with {runAsUser: 1000, runAsGroup: 1000} and container security context with {readOnlyRootFilesystem: true} (all except OpenSearch).

5. OpenSearch: installed plugins in Dockerfile; used `/tmp` folder for `reconfiguration.sh` script; added `/usr/share/opensearch/logs` and `/tmp` empty directories.
6. OpenSearch Dashboards: added `/usr/share/opensearch-dashboards/data` and `/usr/share/opensearch-dashboards/optimize` empty directories.
7. Monitoring: moved logs from `/opt/elasticsearch-monitoring/exec-scripts` to `/tmp/monitoring/logs` folder; added `/tmp` empty directory.
8. TLS init: moved all files to ${OPENSEARCH_CONFIGS} folder; added `/opt/opensearch-tls-init/config` empty directory.
9. Tests: added `Test Container Hardening` test; fixed work with resource files in HA tests; added `/tmp` empty directory.
@defesteban defesteban force-pushed the feature/security_hardening branch from 9cfa700 to 8bee5b1 Compare May 22, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant