bug: /_continuwuity/metrics should require token #2504
Labels
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Compliance
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
bob the builder
No milestone
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
continuwuation/continuwuity#2504
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What is the bug?
It seems like the metrics endpoint would be publicly accessible if there is no prometheus_metrics_token token specified, and it should just be unavailable/not served/etc.
Steps to reproduce
1: allow_prometheus_metrics = true
2: don't set prometheus_metrics_token
3: ???
Server name and version
explodie.org 26.11.0-alpha.1 (
67dc7fc57)Additional context
No response
this is standards practice especially if there is another port to listen to as you can hide it with firewall
Yeah this is a feature in my eyes - my own servers don't set a token because the metrics endpoint is inaccessible outside of my LAN, and I'm not too worried about monsters in my LAN being able to see the performance metrics of my deployments. The only reason I told you to set a token when setting up my prometheus collector for you is because that's going over the internet.
Preventing the metrics endpoint being accessible via the reverse proxy is as easy as
if one is inclined to expose metrics without a token - this also allows for some nifty stuff like IP allowlisting with route matchers and such.
I'm pretty sure there's warning on startup if you enable metrics without a token anyway, and the docs seem sufficiently detailed
yep this is the best practice #2354
I'm going to close this as invalid considering this is intentional and documented behaviour. Feel free to re-open if you disagree :)