-
Notifications
You must be signed in to change notification settings - Fork 0
FAQ
Common questions about TMI deployment, configuration, and usage.
TMI (Threat Modeling Improved) is a collaborative threat modeling application. It enables teams to create data flow diagrams, identify security threats, and document risk assessments with real-time collaborative editing.
Visit https://www.tmi.dev to access the hosted instance. The API is available at https://api.tmi.dev.
For development:
- Go 1.24+
- Docker Desktop
- Make
For production, see Deploying-TMI-Server and Deploying-TMI-Web-Application.
See Using-TMI-for-Threat-Modeling and Creating-Your-First-Threat-Model for step-by-step guidance.
Set the SERVER_PORT environment variable:
export SERVER_PORT=9090
./bin/tmiserverOr configure in YAML:
server:
port: "9090"See Configuration-Reference for all configuration options.
Set TLS configuration variables:
TLS_ENABLED=true
TLS_CERT_FILE=/path/to/cert.pem
TLS_KEY_FILE=/path/to/key.pemSee Configuration-Reference for complete TLS setup.
Each OAuth provider requires:
- Client ID from the provider
- Client secret (keep secure!)
- Callback URL configured on the provider
Supported providers:
- GitHub
- Microsoft (Azure AD)
- SAML
- Custom providers
See Setting-Up-Authentication for provider-specific setup instructions.
Set the JWT_SECRET environment variable:
export JWT_SECRET="your-long-random-secret-256-bits"Important: Change this from the default "secret" in production!
Set PostgreSQL and Redis connection parameters:
DB_HOST=db.example.com
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=secret
REDIS_HOST=cache.example.com
REDIS_PORT=6379See Database-Setup and Configuration-Reference for details.
Yes. Environment variables override YAML configuration values. This allows flexible deployment:
- Use YAML for defaults
- Override specific values via environment variables for each deployment
See Planning-Your-Deployment, Deploying-TMI-Server, and Deploying-TMI-Web-Application for comprehensive guides.
Key steps:
- Set up PostgreSQL and Redis
- Configure Setting-Up-Authentication
- Enable TLS/HTTPS
- Configure Configuration-Reference
- Deploy Deploying-TMI-Server
- Deploy Deploying-TMI-Web-Application
- Configure Monitoring-and-Health
Development uses relaxed defaults for easier setup:
- JWT_SECRET: "secret"
- TLS_ENABLED: false
- LOG_LEVEL: info
Production requires:
- Strong JWT_SECRET
- TLS_ENABLED: true
- More restrictive logging and access controls
- Database backups and monitoring
Yes. TMI runs in Docker containers, making it suitable for Kubernetes deployment. See Component-Integration for details.
PostgreSQL and Redis data should be backed up regularly:
# PostgreSQL backup
pg_dump -U postgres -d tmi > backup.sql
# PostgreSQL restore
psql -U postgres -d tmi < backup.sql
# Redis backup
redis-cli BGSAVE
# Redis restore
redis-cli BGREWRITEAOFSee Database-Operations for backup procedures.
Use authorization roles:
- Navigate to the threat model's sharing settings
- Add users or groups
- Assign role: Reader, Writer, or Owner
See Collaborative-Threat-Modeling for step-by-step instructions.
- Reader - View-only access
- Writer - Can view and edit; cannot delete or change access
- Owner - Full permissions including delete and access control
See Glossary and Authorization Reference.
A pseudo-group granting access to all authenticated users. Useful for organization-wide documents:
{
"subject": "everyone",
"subject_type": "group",
"role": "reader"
}See Glossary for more information.
Yes. Use authorization controls:
- Restrict to specific users/groups
- Never use "everyone" for sensitive models
- Regularly audit access with Security-Operations
- See Security-Best-Practices for more security guidance
Recommended: Every 90 days. More frequently for highly sensitive deployments.
When rotating:
- Deploy new secret
- Keep old secret for grace period (24-48 hours)
- Force re-authentication of active sessions
- Audit logs for unusual activity
- Subscribe to security notifications
- Test patches in staging first
- Apply patches promptly to production
- Monitor container image vulnerabilities with Docker Scout
See Security-Best-Practices for detailed security guidance.
When multiple users edit simultaneously, TMI uses edit locks to prevent conflicts. Wait for the other user to finish or ask them to release the lock.
Real-time editing uses WebSocket connections:
- Client connects via
ws://(development) orwss://(production) - Changes broadcast to all connected clients
- Concurrent edits managed through Redis locks
- Changes synchronized to PostgreSQL
See Working-with-Data-Flow-Diagrams for usage.
- Changes in progress are lost
- Reconnection is automatic
- Latest saved version is restored
- No conflict with other users' changes
The REST API is documented in OpenAPI 3.0.3:
- View specs at API-Specifications
- Use generated client SDKs for your language
- See Client Integration Guide
- Authenticate with OAuth to get a JWT token
- Include the token in request headers:
Authorization: Bearer <token>
See Setting-Up-Authentication and API-Specifications.
Yes. TMI supports webhook integrations and custom integrations via the API.
See Issue-Tracker-Integration and Webhook Integration.
Check:
- Port is available:
lsof -i :8080 - Database is running:
make start-postgres - Redis is running:
make start-redis - Configuration is valid: check logs for errors
See Getting-Help and Common-Issues.
Check:
- OAuth provider credentials are correct
- Callback URL matches provider configuration
- Provider is enabled in config
- TLS/HTTPS is properly configured
See Setting-Up-Authentication.
Check:
- Database host/port are correct
- Credentials are valid
- Database is running and accessible
- Network connectivity to database
See Database-Operations.
Check:
- TLS mismatch:
wss://for HTTPS,ws://for HTTP - Firewall allows WebSocket connections
- Proxy supports WebSocket protocol
- Redis is running (manages WebSocket connections)
See Performance-Troubleshooting for optimization guides.
- See Getting-Help for support resources
- Check Common-Issues for common problems
- Review GitHub Issues
- Email security@tmi.dev for security issues
- Check Common-Issues and existing GitHub issues
- Create a new GitHub issue with:
- Description of the problem
- Steps to reproduce
- Expected vs. actual behavior
- Environment details (OS, TMI version, etc.)
- Check existing GitHub issues and discussions
- Create a feature request with use case and benefit
- Participate in community discussions
Yes! See Contributing for guidelines.
- Configuration-Reference - All configuration options
- Glossary - TMI-specific terminology
- Security-Best-Practices - Security guidance
- GitHub Repository
- API Clients
- Using TMI for Threat Modeling
- Accessing TMI
- Creating Your First Threat Model
- Understanding the User Interface
- Working with Data Flow Diagrams
- Managing Threats
- Collaborative Threat Modeling
- Using Notes and Documentation
- Metadata and Extensions
- Planning Your Deployment
- Deploying TMI Server
- Deploying TMI Web Application
- Setting Up Authentication
- Database Setup
- Component Integration
- Post-Deployment
- Monitoring and Health
- Database Operations
- Security Operations
- Performance and Scaling
- Maintenance Tasks