NETWAYS / NETWAYS/ansible-collection-elasticstack

[Bug]: Beats Elasticsearch output disables TLS verification and hardcodes the CA path

Open
#513 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug component:beats
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 (default full, secure by default). Users can deliberately drop to certificate for SAN mismatches (keeps CA verification, skips the hostname check); none only as an explicit opt-out.
  • CA resolution in three branches:
    • full stack → beats_tls_cacert (the stack CA),
    • standalone with beats_ssl_certificate_authorities set → that CA (private / externally-managed backend, CA distributed on the Beats hosts),
    • unset → omit the line → OS system store (public / cloud CAs).

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.