Repository navigation
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.26+
- 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 TMI_SERVER_PORT environment variable:
export TMI_SERVER_PORT=9090
./bin/tmiserverOr configure in YAML:
server:
port: "9090"See Configuration-Reference for all configuration options.
Set TLS configuration variables:
TMI_SERVER_TLS_ENABLED=true
TMI_SERVER_TLS_CERT_FILE=/path/to/cert.pem
TMI_SERVER_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 OAuth/OIDC providers:
- GitHub
- Microsoft (Entra ID)
- Any generic OIDC-compliant provider
TMI also supports SAML identity providers (configured separately).
See Setting-Up-Authentication for provider-specific setup instructions.
Set the TMI_JWT_SECRET environment variable:
export TMI_JWT_SECRET="your-long-random-secret-256-bits"Important: Change this from the default "secret" in production!
TMI supports five databases: PostgreSQL, Oracle, MySQL, SQL Server, and SQLite. Set the database and Redis connection URLs:
TMI_DATABASE_URL=postgres://postgres:secret@db.example.com:5432/tmi?sslmode=require
TMI_REDIS_URL=redis://cache.example.com:6379/0Alternatively, Redis can be configured with individual fields:
TMI_REDIS_HOST=cache.example.com
TMI_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:
- TMI_JWT_SECRET: "secret"
- TMI_SERVER_TLS_ENABLED: false
- TMI_LOG_LEVEL: info
Production requires:
- Strong TMI_JWT_SECRET
- TMI_SERVER_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 that grants access to all authenticated users. Useful for organization-wide documents:
{
"principal_type": "group",
"provider": "*",
"provider_id": "everyone",
"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 Grype (
make scan-containers)
See Security-Best-Practices for detailed security guidance.
TMI does not lock diagram elements. In a collaboration session the server applies operations one at a time in arrival order; it rejects only structural conflicts (for example, adding a cell that already exists, or updating a cell that was removed), and the client then resynchronizes. If two users change the same existing cell, the later change wins. REST updates use optimistic locking with If-Match (a stale version returns 409 version_mismatch). See WebSocket-API-Reference.
Real-time editing uses WebSocket connections:
- Client connects via
ws://(development) orwss://(production) - Changes broadcast to all connected clients
- Operations are applied one at a time in arrival order (see WebSocket-API-Reference)
- 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-database - 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
- Authentication
- Identity Linking
- Creating Your First Threat Model
- Surveys and Intake
- Understanding the User Interface
- Working with Data Flow Diagrams
- Managing Threats
- Collaborative Threat Modeling
- Using Notes and Documentation
- Timmy AI Assistant
- Metadata and Extensions
- Planning Your Deployment
- Terraform Deployment (AWS)
- Deploying TMI Server
- Oracle Container Images
- Deploying TMI Web Application
- Setting Up Authentication
- Database Setup
- Bootstrapping Production
- Component Integration
- Post-Deployment
- Branding and Customization
- Monitoring and Health
- Cloud Logging
- Configuring Local Development
- Managing Operational Settings
- Content Extractors - Limits and Overrides
- Database Operations
- Database Security Strategies
- Transaction Isolation
- Oracle Content Feedback FK Cleanup
- Security Operations
- Secret Rotation
- Performance and Scaling
- Maintenance Tasks
- Getting Started with Development
- Local Development Cluster
- Architecture and Design
- API Integration
- Testing
- Contributing
- Extending TMI
- Dependency Upgrade Plans
- DFD Graphing Library Reference
- Migration Instructions
- Issue Tracker Integration
- Webhook Integration
- Addon System
- MCP Integration
- Delegated Content Providers
- Setting Up Google Content Providers
- API Clients
- API Client Maintenance
- Database Tool Reference
- TMI Terraform Analyzer
- WebSocket Test Harness