Skip to content

Commit 83d62f0

Browse files
committed
docs: add security documentation for plain text secrets
- Add security warning to prometheus.yml.tpl about plain text token storage - Document Prometheus limitation with runtime environment variable substitution - Include TODO items for researching safer secret injection methods: * Prometheus file_sd_configs with dynamic token refresh * External authentication proxy (oauth2-proxy, etc.) * Vault integration or secret management solutions * Init containers to generate configs with short-lived tokens - Add security documentation to .env.production about plain text secrets - Explain runtime secret injection alternatives for Docker Compose - Provide practical examples for secure deployment workflows - Mention Docker secrets and external secret management options These changes improve security awareness and provide clear paths for implementing enhanced secret management in production deployments.
1 parent 770fe25 commit 83d62f0

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

application/.env.production

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
# Torrust Tracker Demo - Production Environment Configuration
2-
#
2+
#
33
# This configuration uses MySQL as the default database backend.
44
# Make sure to change the default passwords before deployment!
5+
#
6+
# SECURITY NOTE: Secrets are stored in plain text in this Docker Compose .env file.
7+
# For enhanced security, administrators can inject secrets at runtime when launching
8+
# Docker Compose instead of storing them in this file:
9+
#
10+
# Examples:
11+
# export MYSQL_PASSWORD="secure_password"
12+
# export TRACKER_ADMIN_TOKEN="secure_token"
13+
# docker compose up -d
14+
#
15+
# Or use Docker secrets, external secret management systems (Vault, etc.),
16+
# or environment-specific CI/CD secret injection.
517

618
USER_ID=1000
719

infrastructure/config/templates/prometheus.yml.tpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
---
2+
# Prometheus Configuration Template
3+
# Generated from environment variables for ${ENVIRONMENT}
4+
#
5+
# NOTE: Admin token is stored in plain text in this config file after template processing.
6+
# This is a limitation of Prometheus configuration - it does not support runtime environment
7+
# variable substitution like other services.
8+
#
9+
# TODO: Research safer secret injection methods for Prometheus:
10+
# - Prometheus file_sd_configs with dynamic token refresh
11+
# - External authentication proxy (oauth2-proxy, etc.)
12+
# - Vault integration or secret management solutions
13+
# - Init containers to generate configs with short-lived tokens
14+
215
global:
316
scrape_interval: 15s
417

0 commit comments

Comments
 (0)