Security
This page describes the general security assumptions of Rebel Media and the attack vectors that some configurations may enable.
As with any complex system, it is near certain that bugs will be found, some of them security-relevant. If you find a security bug please report it privately to the maintainers listed in the MAINTAINERS of the relevant repository. We will fix the issue as soon as possible and coordinate a release date with you. You will be able to choose if you want public acknowledgement of your effort and if you want to be mentioned by name.
Automated security scanners
Special note for security scanner users: Please be mindful with the reports produced. Most scanners are generic and produce lots of false positives. More and more reports are being sent to us, and it takes a significant amount of work to go through all of them and reply with the care you expect. This problem is particularly bad with Go and NPM dependency scanners.
As a courtesy to us and our time, we would ask you not to submit raw reports. Instead, please submit them with an analysis outlining which specific results are applicable to us and why.
Exporters
Exporters generally only talk to one configured instance with a preset set of commands/requests, which cannot be expanded via their HTTP endpoint.
Client Libraries
Client libraries are intended to be included in users’ applications.
If using a client-library-provided HTTP handler, it should not be possible for malicious requests that reach that handler to cause issues beyond those resulting from additional load and failed scrapes.
Authentication, Authorization, and Encryption
Most exporters, support TLS. Including authentication of clients via TLS client certificates. Details on configuring Prometheus are here.
The Go projects share the same TLS library, based on the Go crypto/tls library. We default to TLS 1.2 as minimum version. Our policy regarding this is based on Qualys SSL Labs recommendations, where we strive to achieve a grade ‘A’ with a default configuration and correctly provided certificates, while sticking as closely as possible to the upstream Go defaults. Achieving that grade provides a balance between perfect security and usability.
If you have special TLS needs, like a different cipher suite or older TLS version, you can tune the minimum TLS version and the ciphers, as long as the cipher is not marked as insecure in the crypto/tls library. If that still does not suit you, the current TLS settings enable you to build a secure tunnel between the servers and reverse proxies with more special requirements.
HTTP Basic Authentication is also supported. Basic Authentication can be used without TLS, but it will then expose usernames and passwords in cleartext over the network.
On the server side, basic authentication passwords are stored as hashes with the bcrypt algorithm. It is your responsibility to pick the number of rounds that matches your security standards. More rounds make brute-force more complicated at the cost of more CPU power and more time to authenticate the requests.
API Security
As administrative and mutating endpoints are intended to be accessed via simple tools such as cURL, there is no built-in CSRF protection as that would break such use cases. Accordingly, when using a reverse proxy, you may wish to block such paths to prevent CSRF.
For non-mutating endpoints, you may wish to set CORS headers such as Access-Control-Allow-Origin in your reverse proxy to prevent XSS.
If you are composing PromQL queries that include input from untrusted users (e.g. URL parameters to console templates, or something you built yourself) who are not meant to be able to run arbitrary PromQL queries make sure any untrusted input is appropriately escaped to prevent injection attacks. For example up{job="<user_input>"} would become up{job=""} or some_metric{zzz=""} if the <user_input> was "} or some_metric{zzz=".
For those using Grafana note that dashboard permissions are not data source permissions, so do not limit a user’s ability to run arbitrary queries in proxy mode.
Secrets
Non-secret information or fields may be available via the HTTP API and/or logs.
Fields containing secrets in configuration files (marked explicitly as such in the documentation) will not be exposed in logs or via the HTTP API. Secrets should not be placed in other configuration fields, as it is common for components to expose their configuration over their HTTP endpoint. It is the responsibility of the user to protect files on disk from unwanted reads and writes.
Secrets from other sources used by dependencies (e.g. the AWS_SECRET_KEY environment variable as used by EC2 service discovery) may end up exposed due to code outside our control or due to functionality that happens to expose wherever it is stored.
Denial of Service
There are some mitigations in place for excess load or expensive queries. However, if too many or too expensive queries/metrics are provided components will fall over. It is more likely that a component will be accidentally taken out by a trusted user than by malicious action.
It is the responsibility of the user to ensure they provide components with sufficient resources including CPU, RAM, disk space, IOPS, file descriptors, and bandwidth.
It is recommended to monitor all components for failure, and to have them automatically restart on failure.
Libraries
This document considers vanilla binaries built from the stock source code. Information presented here does not apply if you modify the source code.
Build Process
The build pipeline runs on third-party providers to which many members of the Rebel Media development team and the staff of those providers have access. If you are concerned about the exact provenance of your binaries, it is recommended to build them yourself rather than relying on the pre-built binaries provided by the project.