Skip to content

Add tls_config support to alloy server#1433

Merged
brianmcgillion merged 1 commit intotiiuae:mainfrom
everton-dematos:pr_tls_config
Sep 29, 2025
Merged

Add tls_config support to alloy server#1433
brianmcgillion merged 1 commit intotiiuae:mainfrom
everton-dematos:pr_tls_config

Conversation

@everton-dematos
Copy link
Copy Markdown
Contributor

Description of Changes

Enable mTLS support for the Alloy log forwarder when sending logs to Loki. Improvements can be listed as follows:

  • Supports per-target mTLS profiles (custom CA, SNI, min TLS version, and client cert/key), enabling easy personalization for different SIEMs or gateways with their own PKI and policy requirements.
  • Allows using a custom CA (internal PKI), which is typical in SIEM environments and zero-trust networks.
  • Client identity available (mTLS-ready).
  • Transport is TLS-encrypted with explicit policy (no silent downgrade).

Type of Change

  • New Feature
  • Bug Fix
  • Improvement / Refactor

Related Issues / Tickets

Checklist

  • Clear summary in PR description
  • Detailed and meaningful commit message(s)
  • Commits are logically organized and squashed if appropriate
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • Author has run make-checks and it passes
  • All automatic GitHub Action checks pass - see actions
  • Author has added reviewers and removed PR draft status

Testing Instructions

Applicable Targets

  • Orin AGX aarch64
  • Orin NX aarch64
  • Lenovo X1 x86_64
  • Dell Latitude x86_64
  • System 76 x86_64

Installation Method

  • Requires full re-installation
  • Can be updated with nixos-rebuild ... switch
  • Other:

Test Steps To Verify:

  1. Check if the logs are being uploaded to remote server (e.g., Grafana)
  2. On admin-vm, run the following command to dump a live graph of all running Alloy components: curl -s http://127.0.0.1:12345/api/v0/web/components
  3. Look for the loki.write block labeled remote. You should see: referencesTo includes local.file.tls_cert and local.file.tls_key (and local.file.tls_ca if you set a custom CA). This confirms the tls_config is wired in.

Copy link
Copy Markdown
Collaborator

@vunnyso vunnyso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall good, few minor comments.

Signed-off-by: Everton de Matos <everton.dematos@tii.ae>
@brianmcgillion brianmcgillion added the Needs Testing CI Team to pre-verify label Sep 28, 2025
@milva-unikie
Copy link
Copy Markdown

Tested on Darter Pro (nixos-rebuild switch)

  • Grafana displays logs normally
  • loki.write block has correct references

@milva-unikie milva-unikie added Tested on System76 and removed Needs Testing CI Team to pre-verify labels Sep 29, 2025
@brianmcgillion brianmcgillion merged commit c5a5a03 into tiiuae:main Sep 29, 2025
27 checks passed
@everton-dematos everton-dematos deleted the pr_tls_config branch January 23, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants