feat: OpenSearch security hardening#375
Open
defesteban wants to merge 2 commits into
Open
Conversation
defesteban
commented
May 22, 2026
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.
9cfa700 to
8bee5b1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Description
What's done:
Added
Run Hardening Testspipeline.Added
PYTHONDONTWRITEBYTECODE=1environment variable for all Python images.Added
opensearch-service.defaultLabelsto all pods.Actualized pod security context with {runAsUser: 1000, runAsGroup: 1000} and container security context with {readOnlyRootFilesystem: true} (all except OpenSearch).
OpenSearch: installed plugins in Dockerfile; used
/tmpfolder forreconfiguration.shscript; added/usr/share/opensearch/logsand/tmpempty directories.OpenSearch Dashboards: added
/usr/share/opensearch-dashboards/dataand/usr/share/opensearch-dashboards/optimizeempty directories.Monitoring: moved logs from
/opt/elasticsearch-monitoring/exec-scriptsto/tmp/monitoring/logsfolder; added/tmpempty directory.TLS init: moved all files to ${OPENSEARCH_CONFIGS} folder; added
/opt/opensearch-tls-init/configempty directory.Tests: added
Test Container Hardeningtest; fixed work with resource files in HA tests; added/tmpempty directory.