Skip to content

fix(loki-logger): encrypt the headers field - #13784

Merged
nic-6443 merged 1 commit into
apache:masterfrom
nic-6443:fix/loki-logger-encrypt-headers
Aug 7, 2026
Merged

fix(loki-logger): encrypt the headers field#13784
nic-6443 merged 1 commit into
apache:masterfrom
nic-6443:fix/loki-logger-encrypt-headers

Conversation

@nic-6443

@nic-6443 nic-6443 commented Aug 6, 2026

Copy link
Copy Markdown
Member

Description

The loki-logger headers field is the documented place for the Loki / Grafana Cloud Authorization token, and it is copied verbatim into the outbound request. But headers is not listed in the plugin's encrypt_fields, so the token is stored in plaintext in etcd and returned unmasked from the Admin API — unlike the identically-shaped elasticsearch-logger headers, which is encrypted.

This adds headers to loki-logger's encrypt_fields, matching elasticsearch-logger.

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change (no doc change needed — behavior is at-rest encryption of an existing field)
  • I have verified that this change is backward compatible

The headers field carries the Loki/Grafana Cloud Authorization token but was not in
encrypt_fields, so it was stored in plaintext in etcd and returned unmasked, unlike
the identically-shaped elasticsearch-logger headers. Add headers to encrypt_fields.
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Aug 6, 2026

@membphis membphis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@nic-6443
nic-6443 merged commit c05c2ec into apache:master Aug 7, 2026
16 checks passed
@nic-6443
nic-6443 deleted the fix/loki-logger-encrypt-headers branch August 7, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants