Authorization
MindRoom controls which Matrix users can interact with agents.
Configuration
Configure authorization in config.yaml:
authorization:
# Users with access to all rooms
global_users:
- "@admin:example.com"
- "@developer:example.com"
# Room-specific permissions (must use Matrix room IDs, not aliases)
room_permissions:
"!abc123:example.com":
- "@user1:example.com"
- "@user2:example.com"
# Default for rooms not in room_permissions
default_room_access: false
Defaults (when authorization block is omitted):
global_users: []room_permissions: {}default_room_access: false
This means only MindRoom system users (agents, teams, router, and @mindroom_user) can interact with agents by default.
Matrix ID Format
User IDs follow the Matrix format: @localpart:homeserver.domain
Examples: @alice:matrix.org, @bob:example.com, @admin:company.internal
Authorization Flow
Authorization checks are performed in order:
- Internal system user -
@mindroom_user:{domain}is always authorized. Note:@mindroom_userfrom a different domain is NOT authorized. - MindRoom agents/teams/router - Configured agents, teams, and the router are authorized
- Global users - Users in
global_usershave access to all rooms - Room permissions - If room is in
room_permissions, user must be in that room's list (does NOT fall through todefault_room_access) - Default access - Rooms not in
room_permissionsusedefault_room_access
Tip
Set default_room_access: false and explicitly grant access via global_users or room_permissions for better security.