-
Notifications
You must be signed in to change notification settings - Fork 2
Collaborative Threat Modeling
Work with your team in real-time on threat models.
TMI supports real-time collaborative threat modeling, allowing multiple team members to work on the same threat model simultaneously. This page covers the collaboration features, session management, access control, and the underlying technical architecture.
- Multiple users can edit the same threat model at once.
- Changes appear immediately for all connected users.
- WebSocket-based synchronization keeps all clients in sync.
- No need to refresh or manually save.
- See who else is viewing or editing the threat model.
- View the presenter's cursor position in diagrams (presenter mode only).
- See the active participants list with each user's permissions and role.
- Receive real-time notifications when participants join or leave the session.
- Server-authoritative state with operation rejection for conflicts.
- Coordinated updates via WebSocket with sequence numbering.
- Update-vector-based conflict detection.
- Optimistic local updates with automatic resynchronization when the server rejects an operation.
The collaboration dialog displays a list of all participants in the current session. Each participant row shows five columns of information.
| Column | Purpose | Details |
|---|---|---|
| User Type | Identifies host vs. participant | Host shows a co-present icon; participants show a person icon. Tooltip displays the localized role name. |
| Permissions | Shows edit access level | Writer shows an edit icon; reader shows an edit-off icon. Tooltip displays the permission level. |
| Username | Displays participant name | Shows the user's display name with email in the tooltip for disambiguation. |
| Presenter | Presenter mode controls | Context-sensitive icon and controls based on the user's presenter state. |
| Remove | Session management | Host can remove participants from the session. |
The presenter column displays different controls based on the user's role and presenter status.
For the Host:
- When presenter: Podium icon (active) with "Presenter" tooltip.
- When not presenter: Podium icon (inactive) with no action.
For Participants:
- Hand Down: Shows a "Person Raised Hand" icon. Clicking it sends a presenter request to the host.
- Hand Raised: Shows a "Person Raised Hand" icon in green, indicating the participant is waiting for host approval.
- Presenter: Shows a "Podium" icon, indicating the participant is the active presenter.
Host Controls for Participants:
- When a participant is the presenter, the host sees a podium icon with a close overlay to revoke presenter privileges.
- When a participant has a pending request, the host can approve or deny the request via a context menu.
Presenter state transitions are managed via WebSocket messages:
-
Requesting: The participant clicks the hand icon, which sends a
presenter_requestmessage and transitions to the hand-raised state. The server forwards apresenter_request_eventto the host. -
Approved: The host approves the request, which sends a
change_presenter_requestmessage. The server broadcasts an updatedparticipants_updatewith thecurrent_presenterfield set, and the participant transitions to the presenter state. -
Denied: The host denies the request, which sends a
presenter_denied_requestmessage. The server sends apresenter_denied_eventto the requester, and the participant returns to the hand-down state. -
Revoked: The host revokes presenter privileges by sending a
change_presenter_requestwith the host's own ID or null. The server broadcasts an updatedparticipants_update, and the former presenter returns to the hand-down state.
| Role | Icon | Description |
|---|---|---|
| Host | Co-present icon | Session creator with full management permissions. |
| Participant | Person icon | Session member with permissions based on their threat model access level. |
| Presenter | Podium icon | Current presenter who can guide the session view for all participants. |
Access to threat models is managed through the authorization list on the threat model itself. To grant access:
- Open your threat model in the Understanding-the-User-Interface.
- Edit the authorization list to add users by their identity provider and provider ID.
- Assign a permission level (owner, writer, or reader) to each user.
Owner:
- Full control over the threat model.
- Can delete the threat model.
- Can manage the authorization list.
- Can transfer ownership.
Writer:
- Can edit all content.
- Can add and modify diagrams, threats, notes, and other resources.
- Cannot manage the authorization list or delete the threat model.
Reader:
- View-only access.
- Can view all content.
- Cannot make edits.
Note: In collaboration sessions, participants' WebSocket permissions are mapped to
writerorreaderbased on their threat model authorization. Theownerrole is treated aswriterfor WebSocket collaboration purposes.
- Grant team members access via the authorization list.
- Join a video or voice call.
- Collaboratively edit Working-with-Data-Flow-Diagrams.
- Identify threats together.
- Document decisions in Using-Notes-and-Documentation.
- Grant access to the threat model via the authorization list.
- Team members review and add Managing-Threats asynchronously.
- Use Using-Notes-and-Documentation for discussion and documentation.
- The owner reviews and consolidates contributions.
- Track changes via the #audit-trail.
- The development team creates an initial threat model.
- The security team reviews the model as a reader or writer.
- Security team members add threats and notes with their findings.
- The development team addresses the findings.
- Iterate until the security team approves the model.
- Coordinate major changes with your team before making them.
- Use external chat or video calls for complex discussions.
- Use presenter mode to guide collaborators through the diagram.
- Assign sections to individual team members.
- Use consistent naming conventions across the threat model.
- Document assumptions in Using-Notes-and-Documentation.
- Schedule regular synchronization points to review progress.
- Make small, incremental changes rather than large bulk edits.
- Communicate before making major structural edits.
- Review changes made by other team members.
- Acknowledge contributions from collaborators.
TMI maintains a comprehensive audit trail for each threat model. The audit trail records:
- Object type affected (threat model, diagram, threat, asset, document, note, or repository).
- Change type (created, updated, patched, deleted, rolled back, or restored).
- Actor information (email, provider, provider ID, and display name).
- Change summary and timestamps.
- Version tracking for versioned objects.
The audit trail is accessible via the threat model's audit trail page and supports filtering by object type, change type, actor, and date range.
TMI provides server-side notification infrastructure via a WebSocket-based notification hub. Notification types include:
- Threat model created, updated, deleted, or shared.
- Collaboration session started or ended.
- User joined or left a collaboration session.
- System announcements and maintenance notices.
The collaborative diagram editing system uses a server-authoritative architecture. For the full WebSocket protocol specification, see the WebSocket-API-Reference.
- A user loads a diagram locally.
- The user initiates collaboration via the UI, which triggers a REST API call to start or join a session.
- The server creates the session and returns a WebSocket URL along with session metadata.
- Only users with "owner" or "writer" threat model permissions can start collaboration sessions.
- The user navigates to the list of available collaboration sessions, filtered by their permissions.
- The user selects a diagram to collaborate on.
- The client sends a
sync_request, and the server responds with adiagram_statemessage containing the complete diagram state. - The client initializes the diagram editor with the synchronized state.
- The user makes a change to the diagram.
- The client sends a
diagram_operation_requestmessage to the server via WebSocket, including its currentbase_vector. - The server validates the operation, applies it, updates the
update_vector, and broadcasts adiagram_operation_eventto all connected clients. - On conflict, the server sends an
operation_rejectedmessage to the originating client with the rejection reason and the currentupdate_vector. The client then resynchronizes by sending a newsync_request.
-
Update Vector: Each diagram has an
update_vector(an integer) used for conflict detection. Clients send theirbase_vectorwith each operation. - Server-Authoritative State: The server maintains the canonical state and assigns monotonically increasing sequence numbers to accepted operations.
-
Optimistic Updates: Changes are applied locally first and rolled back if the server rejects them via an
operation_rejectedmessage. -
Resynchronization: After a rejection, the client sends a
sync_request. The server responds with either adiagram_state(full state) or async_status_response(if the client is already current).
For the complete message type reference, see the WebSocket-API-Reference.
| Message Type | Direction | Purpose |
|---|---|---|
diagram_operation_request |
Client to Server | Request a diagram change (add, update, or remove cells). |
diagram_operation_event |
Server to Client | Broadcast an accepted diagram operation. |
operation_rejected |
Server to Client | Notify the originator that an operation was rejected. |
authorization_denied |
Server to Client | Deny an operation due to insufficient permissions. |
| Message Type | Direction | Purpose |
|---|---|---|
sync_request |
Client to Server | Request the full diagram state (conditional on update_vector). |
diagram_state |
Server to Client | Respond with the full diagram state. |
sync_status_request |
Client to Server | Perform a lightweight check of the server's update_vector. |
sync_status_response |
Server to Client | Return the current update_vector from the server. |
| Message Type | Direction | Purpose |
|---|---|---|
presenter_request |
Client to Server | Participant requests the presenter role. |
presenter_request_event |
Server to Host | Notify the host of a pending presenter request. |
change_presenter_request |
Client to Server | Host assigns or revokes the presenter role. |
presenter_denied_request |
Client to Server | Host denies a presenter request. |
presenter_denied_event |
Server to Client | Notify the requester that the request was denied. |
presenter_cursor |
Bidirectional | Transmit cursor position for the presenter. |
presenter_selection |
Bidirectional | Transmit selected cell IDs for the presenter. |
| Message Type | Direction | Purpose |
|---|---|---|
participants_update |
Server to Client | Broadcast the complete participant list with host and current presenter. |
remove_participant_request |
Client to Server | Host removes a participant from the session. |
undo_request |
Client to Server | Request undo of the last operation. |
redo_request |
Client to Server | Request redo of the last undone operation. |
error |
Server to Client | Report a general error. |
The DFD editor uses AntV X6 (v2.19.x) for graph visualization. For the full X6 API reference, see DFD-Graphing-Library-Reference.
-
Event Tracking: Listens for
node:added,node:removed,node:change:position,node:change:size,node:change:parent,node:moved,edge:added,edge:removed, and attribute change events. -
History Management: A custom
AppHistoryServiceprovides collaborative undo and redo with per-user operation stacks. -
Remote Operations:
AppRemoteOperationHandlerconverts incoming WebSocketCellOperationmessages to the internalGraphOperationformat and applies them without triggering history recording or re-broadcasting. -
Presenter Cursor Broadcasting:
UiPresenterCursorServicetracks and sends the cursor position when the current user is the presenter. -
Presenter Cursor Display:
UiPresenterCursorDisplayServicerenders incoming presenter cursor positions with custom styling and synthetic hover effects.
- Managing-Threats -- Learn how to identify, categorize, and track threats.
- Issue-Tracker-Integration -- Connect threats to your issue tracking system.
- Using-Notes-and-Documentation -- Document decisions and attach supporting materials.
- Architecture-and-Design -- Understand the system-wide architecture.
- Using TMI for Threat Modeling
- Accessing TMI
- Authentication
- Creating Your First Threat Model
- 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, OCI, GCP, Azure)
- Deploying TMI Server
- OCI Container Deployment
- Certificate Automation
- Deploying TMI Web Application
- Setting Up Authentication
- Database Setup
- Component Integration
- Post-Deployment
- Branding and Customization
- Monitoring and Health
- Cloud Logging
- Database Operations
- Security Operations
- Performance and Scaling
- Maintenance Tasks
- Getting Started with Development
- Architecture and Design
- API Integration
- Testing
- Contributing
- Extending TMI
- Dependency Upgrade Plans
- DFD Graphing Library Reference
- Migration Instructions