Elasticsearch credentials and index are hardcoded in YAML config—should support environment variable overrides.
Currently, the following values in src/ichec_logger/configs/elasticsearch.yaml
are hardcoded:
- sink: "elasticsearch"
host: "http://localhost:9200"
username: "elastic"
password: "MLnt8JNW"
index: "app-logs"
These credentials are specific to the user @njanagaraj
and are not suitable for other users or production environments. Hardcoding sensitive information is also a security risk.
Proposed Solution:
- Replace hardcoded values with environment variable placeholders, for example:
- sink: "elasticsearch" host: "http://localhost:9200" username: "${ELASTIC_USER}" password: "${ELASTIC_PASSWORD}" index: "${ELASTIC_INDEX}"
- Document in the README that users should set these environment variables before running the application.