loki: use https, limit endpoint exposure #144

Merged
oysteikt merged 3 commits from loki/disable-public-pprof into main 2026-06-21 18:23:35 +02:00
Owner
No description provided.
adriangl marked the pull request as work in progress 2026-06-12 13:34:44 +02:00
Author
Owner

Hvorfor dro den inn radical committen.
ikke tid atm til å fikse.

Hvorfor dro den inn radical committen. ikke tid atm til å fikse.
felixalb reviewed 2026-06-12 14:43:15 +02:00
@@ -3,14 +3,15 @@
let
cfg = config.services.loki;
stateDir = "/data/monitoring/loki";
internalPort = 83100;
Owner

Tror ikke du kan bruke portnummer over 65535

Tror ikke du kan bruke portnummer over 65535
oysteikt marked this conversation as resolved
oysteikt reviewed 2026-06-12 14:45:28 +02:00
@@ -0,0 +3,4 @@
domain = "dav.pvv.ntnu.no";
radicalePort = 5232;
in {
services.radicale = {
Owner

Hvordan havna radicale i pr-en?

Hvordan havna radicale i pr-en?
oysteikt marked this conversation as resolved
Owner

Hvorfor dro den inn radical committen.
ikke tid atm til å fikse.

Den på main er 5f14c15679, den på branchen din er b592f0100a, de har forskjellig commitmelding og hash

> Hvorfor dro den inn radical committen. > ikke tid atm til å fikse. Den på main er https://git.pvv.ntnu.no/Drift/pvv-nixos-config/commit/5f14c15679647f9b5cf103573e5c7142602b1c0e, den på branchen din er https://git.pvv.ntnu.no/Drift/pvv-nixos-config/commit/b592f0100a73ae6113482074a9a77d8b55775ee9, de har forskjellig commitmelding og hash
oysteikt force-pushed loki/disable-public-pprof from 05589e7520 to 2805c5e78d 2026-06-12 16:32:51 +02:00 Compare
Owner

Tok meg friheten til å bare fikse litt, siden det er SOC issue

Tok meg friheten til å bare fikse litt, siden det er SOC issue
Owner

identitetstyveri

identitetstyveri
Owner

ja hehe :3

ja hehe :3
Owner

Where did you find the suggestion to only expose this endpoint btw? Are we sure that we don't need any other endpoints like GET /ready?

https://grafana.com/docs/loki/latest/reference/loki-http-api/

Where did you find the suggestion to only expose this endpoint btw? Are we sure that we don't need any other endpoints like `GET /ready`? https://grafana.com/docs/loki/latest/reference/loki-http-api/
Owner

I suppose we could also firewall the nginx to only accept data from the pvv subnet in any case

I suppose we could also firewall the nginx to only accept data from the pvv subnet in any case
Owner

Need to change the host in the fluentbit log exporter to match the virtualhost.

I suppose we also don't have any loki exporters on the non-nixos machines, so no salt changes needed.

Need to change the host in the fluentbit log exporter to match the virtualhost. I suppose we also don't have any loki exporters on the non-nixos machines, so no salt changes needed.
Owner

also DNS for the virtual host...

also DNS for the virtual host...
oysteikt force-pushed loki/disable-public-pprof from 2805c5e78d to 34570c554b 2026-06-12 20:23:50 +02:00 Compare
oysteikt changed title from WIP: Loki/disable public pprof to loki: use https, limit endpoint exposure 2026-06-12 20:31:33 +02:00
Owner

Merging this so we can answer SOC, please fixup any wrongdoing in a later commit if there is any.

Merging this so we can answer SOC, please fixup any wrongdoing in a later commit if there is any.
oysteikt added 3 commits 2026-06-21 18:23:25 +02:00
Co-authored-by: Øystein Kristoffer Tveit <oysteikt@pvv.ntnu.no>
ildkule/loki: restrict incoming connections to pvv + ntnu
Build topology graph / evals (push) Successful in 2m21s
Eval nix flake / evals (pull_request) Successful in 7m17s
Eval nix flake / evals (push) Successful in 8m58s
3fee83ec05
oysteikt force-pushed loki/disable-public-pprof from 34570c554b to 3fee83ec05 2026-06-21 18:23:25 +02:00 Compare
oysteikt merged commit 3fee83ec05 into main 2026-06-21 18:23:35 +02:00
oysteikt deleted branch loki/disable-public-pprof 2026-06-21 18:23:36 +02:00
Sign in to join this conversation.
No Reviewers
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Drift/pvv-nixos-config#144