@syntropysoft/praetorian
Version:
Praetorian CLI – A universal multi-environment configuration validator for DevSecOps teams. Validate, compare, and secure YAML/ENV files with ease.
142 lines (124 loc) • 2.88 kB
YAML
# Staging Configuration - SECURE EXAMPLE
# This configuration passes all security rules
app:
name: "MySecureApp"
version: "1.0.0"
environment: "staging"
# Security Configuration - Staging grade security
security:
authentication:
enabled: true
method: "oauth2"
# Using secure secret management
clientId: "${OAUTH_CLIENT_ID}"
clientSecret: "${OAUTH_CLIENT_SECRET}"
tokenExpiry: 3600
refreshTokenExpiry: 86400
encryption:
enabled: true
algorithm: "AES-256-GCM"
keyRotation: true
keyRotationInterval: "30d"
# Encrypted configuration
configKey: "encrypted:${ENCRYPTED_CONFIG_KEY}"
ssl:
enabled: true
certificate: "${SSL_CERT_PATH}"
privateKey: "${SSL_KEY_PATH}"
minTlsVersion: "1.2"
cipherSuites:
- "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
- "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256"
# Additional security headers
headers:
hsts: true
csp: "default-src 'self'"
xFrameOptions: "DENY"
xContentTypeOptions: "nosniff"
# Database Configuration - Staging secure
database:
host: "${DB_HOST}"
port: 5432
name: "myapp_staging"
# Secure password management
password: "${DB_PASSWORD}"
ssl: true
encryption: true
connectionPool:
min: 5
max: 20
idleTimeout: 30000
# API Configuration - Staging secure
api:
baseUrl: "https://api-staging.example.com"
timeout: 30000
retries: 3
# Secure API key management
apiKey: "${API_KEY}"
# Enhanced rate limiting for staging
rateLimit:
enabled: true
requestsPerMinute: 500
burstLimit: 50
# API security
cors:
enabled: true
origins: ["https://app-staging.example.com"]
credentials: true
# Logging Configuration - Staging secure
logging:
level: "info"
format: "json"
# Comprehensive field exclusion
excludeFields:
- "password"
- "secret"
- "token"
- "apiKey"
- "authorization"
# Secure log management
destination: "file"
path: "/var/log/app"
rotation: true
maxSize: "500MB"
maxFiles: 5
compression: true
# Log encryption
encryption:
enabled: true
algorithm: "AES-256"
# Monitoring Configuration - Staging
monitoring:
enabled: true
metrics:
enabled: true
endpoint: "/metrics"
port: 9090
# Secure metrics collection
authentication: true
apiKey: "${METRICS_API_KEY}"
healthCheck:
enabled: true
endpoint: "/health"
interval: 30s
alerting:
enabled: true
webhook: "${ALERT_WEBHOOK_URL}"
thresholds:
cpu: 80
memory: 85
disk: 90
# Cache Configuration - Staging secure
cache:
enabled: true
type: "redis"
host: "${REDIS_HOST}"
port: 6379
# Secure cache authentication
password: "${REDIS_PASSWORD}"
ttl: 3600
encryption: true
ssl: true
# Cache security
keyPrefix: "myapp:staging:"
compression: true