NETWAYS / NETWAYS/ansible-collection-elasticstack
[Bug]: Beats Elasticsearch output disables TLS verification and hardcodes the CA path
Nobody has claimed this yet.
- Dominant language
- Jinja
- Stars
- 14
- Forks
- 11
- Avg merge
- 1d 47m
- Merged PRs (30d)
- 6
Description
In all three Beats the output.elasticsearch block hardcodes ssl.verification_mode: none and ssl.certificate_authorities: ["/etc/beats/certs/ca.crt"]. none disables server-certificate verification (no MITM protection), and the fixed path is wrong standalone, where the CA lives under beats_ca_dir (e.g. /opt/ca). The output.logstash block in the same files already uses {{ beats_tls_cacert }}.
Introduce shared Beats SSL settings used by all Beats TLS connections — the Elasticsearch output and the Kibana setup (#514):
beats_ssl_verification_mode(defaultfull, secure by default). Users can deliberately drop tocertificatefor SAN mismatches (keeps CA verification, skips the hostname check);noneonly as an explicit opt-out.- CA resolution in three branches:
- full stack →
beats_tls_cacert(the stack CA), - standalone with
beats_ssl_certificate_authoritiesset → that CA (private / externally-managed backend, CA distributed on the Beats hosts), - unset → omit the line → OS system store (public / cloud CAs).
- full stack →
Replaces the hardcoded none + fixed path. If full then fails in a full stack, it reveals a SAN gap in the generated ES certificate that should be fixed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the three Beats output.elasticsearch blocks and the Kibana setup TLS configuration, then compare them with the output.logstash use of beats_tls_cacert. Implement the shared verification and CA-resolution settings across every Beats TLS connection; done means secure defaults, all three CA branches, and no hardcoded CA path or verification override remain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible, elasticsearch
- Domain
- devops, infrastructure, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100