Security¶
Tram has no authentication or authorization of its own. Whoever can create a stream decides which ports Tram opens and where it sends data, so treat access to every configuration source like access to the Tram process:
- API: the gRPC and HTTP APIs accept every request. They listen on
localhostby default; if you bind them to other interfaces with--grpc-endpointand--http-endpoint, restrict access, e.g. with a network policy or an authenticating proxy in front - Profiling:
--pprof-endpointserves the Go profiles under/debug/pprof/on their own endpoint, without authentication; it is off by default. Profiles reveal internals such as stack traces and command-line arguments, so bind it tolocalhostor a port that is not exposed, and reach it withkubectl port-forward. It also turns on mutex and block profiling, which costs a little on contended locks - OTLP source: listens on the configured port on all network interfaces, without TLS or authentication. Anyone who can reach the port can send data into the stream. Restrict it on the network level, or terminate TLS and authenticate in a proxy in front of it
- Sinks: an OTLP sink sends data to any URL in its spec, and
insecure: trueturns off certificate checks. Keep credentials in sink specs, e.g. inheadersor NATS URLs, out of version control; the file sync writes new files readable only by their owner - Kubernetes operator: watches
Streamresources in all namespaces unless--watch-namespaceis set, so everyone allowed to create aStreamin a watched namespace can open ports on the Tram pod and send data anywhere Tram can reach. AStreamcan also refer to secrets in its namespace, which Tram reads and passes to the stream, so its author can send their values anywhere. Grantcreateonstreams.io.tram.coreonly to users you would also trust with the Tram deployment and with the secrets of that namespace.--stream-selectoris no access control: anyone who can create aStreamcan set the matching labels