This document outlines the security measures implemented in Mass Suite and best practices for secure deployment.
Mass Suite uses JWT (JSON Web Tokens) for API authentication. Never commit JWT secrets to source control.
Development:
# Auto-generated 32+ character key (logged as warning)
dotnet runProduction:
# Set via environment variable (REQUIRED)
export MASS_JWTSETTINGS__SECRETKEY="your-secure-256-bit-key-here"Generate a secure key:
openssl rand -base64 32Default: 60 minutes. Configure via:
export MASS_JWTSETTINGS__EXPIRYMINUTES=60- Allows all origins for ease of development
- Automatically enabled when
ASPNETCORE_ENVIRONMENT=Development
- Strict origin whitelist required
- Configure allowed origins:
{
"Cors": {
"AllowedOrigins": [
"https://your-production-domain.com",
"https://admin.your-domain.com"
]
}
}Or via environment variables:
export MASS_CORS__ALLOWEDORIGINS__0="https://your-domain.com"
export MASS_CORS__ALLOWEDORIGINS__1="https://admin.your-domain.com"Boot file endpoints implement defense-in-depth against directory traversal:
- Filename validation: Only
[a-zA-Z0-9_\-\.]allowed - Explicit
..rejection: Any path containing..is blocked - Path normalization check: Normalized path must start with
pxeRoot
Example protected endpoint:
// β Blocked: path.Contains("..")
// β Blocked: !SafeFilenameRegex().IsMatch(fileName)
// β Blocked: !fullPath.StartsWith(_pxeRoot)Never commit Stripe keys. Use environment variables:
export MASS_STRIPE__SECRETKEY="sk_live_..."
export MASS_STRIPE__WEBHOOKSECRET="whsec_..."
export MASS_STRIPE__MONTHLYPRICEID="price_..."Webhook signature validation is enforced to prevent replay attacks.
Default: 100 requests/minute per IP
Configure:
{
"Security": {
"EnableRateLimiting": true,
"MaxRequestsPerMinute": 100
}
}Exceeded requests return 429 Too Many Requests.
- Set
ASPNETCORE_ENVIRONMENT=Production - Generate and set
MASS_JWTSETTINGS__SECRETKEY(32+ chars) - Configure
MASS_CORS__ALLOWEDORIGINSwith exact domains - Set Stripe keys via environment variables
- Enable HTTPS with valid SSL certificate
- Configure IP whitelisting if applicable
- Review and adjust rate limits
- Enable firewall rules (UDP 67, 69, 4011; TCP 443)
- Rotate secrets regularly (quarterly recommended)
Do not open public GitHub issues for security vulnerabilities.
Contact: Tomy Tolledo (via private channel)
- Use HTTPS in production - HTTP is only for development
- Rotate JWT secrets every 90 days
- Monitor PXE event logs for suspicious activity
- Use strong passwords for admin accounts (12+ chars, mixed case, numbers, symbols)
- Whitelist known IP ranges if PXE server is internal-only
- Keep boot files updated from trusted sources only
- Run services with minimum privileges - avoid running as Administrator/root
Last audit: December 2025
Next scheduled audit: March 2026
Mass Suite is licensed under the MIT License.
Copyright Β© 2025 Tomy Tolledo