Supported Access Control Lists (ACLs)
Access Control Lists (ACLs) control which DIDs can send and receive messages through your DIDComm Mediator.
You can only update DID-level Access Control Lists (ACLs) on self-hosted DIDComm Mediators.
Mediator-level ACLs
| ACL Flag | Description |
|---|---|
| explicit_deny | Open mediator. Any DID may authenticate. Unknown DIDs are auto-registered with the global_acl_default policy. What each DID can then do is controlled by the DID-level ACLs. |
| explicit_allow | Closed mediator. Only pre-registered DIDs may authenticate. Unknown DIDs are rejected at /authenticate/challenge with 403 authentication.blocked. Only admins may add new accounts, with the messaging/account/add Trust Task. |
To configure the mediator-level ACL, set mediator_acl_mode in the [security] section of conf/mediator.toml, or with the MEDIATOR_ACL_MODE environment variable, and restart the mediator. The default is explicit_deny.
Two related [security] settings control direct delivery:
| Setting | Default | Description |
|---|---|---|
local_direct_delivery_allowed | true | If true, messages may be addressed directly to a local DID without mediator routing. If false, all messages must be addressed to the mediator, which handles delivery. |
local_direct_delivery_allow_anon | false | If true, anonymous messages may also be delivered directly to a local DID. |
DID-level ACLs
DID-level ACLs define what each DID can store, send, or receive. New DIDs receive the global_acl_default policy unless an admin sets custom ACLs. A DID the mediator has only seen relaying a forward gets the narrower DENY_ALL,SEND_FORWARDED, and only if global_acl_default grants SEND_FORWARDED.
Send and receive messages
ACL flags provide granular control over whether a DID can send or receive messages.
| ACL Flag | Description |
|---|---|
| ALLOW_ALL | Grants all capabilities, all self-change bits, all self-management rights, and sets the DID’s inbox mode to explicit_deny (open inbox). |
| DENY_ALL | Denies all capabilities, all self-change bits, and sets the DID’s inbox mode to explicit_allow (closed inbox). |
| MODE_EXPLICIT_ALLOW | Sets the DID’s inbox to allowlist mode. Messages are only delivered from senders on the DID’s allowlist. An empty allowlist rejects all senders. |
| MODE_EXPLICIT_DENY | Sets the DID’s inbox to denylist mode. Messages are allowed from all senders unless the sender is on the DID’s denylist. |
| LOCAL | Grants the DID an inbox for message storage, fetch, and WebSocket access. |
| SEND_MESSAGES | DID can send messages to others. |
| RECEIVE_MESSAGES | DID can receive messages from others. |
| SEND_FORWARDED | DID can send forwarded messages. |
| RECEIVE_FORWARDED | DID can receive forwarded messages. |
| ANON_RECEIVE | DID can receive messages from anonymous senders. |
| CREATE_INVITES | DID can create OOB invites. |
| BLOCKED | Marks the DID as blocked, so it cannot authenticate. Set it only on individual DIDs: in global_acl_default, it blocks every new DID. |
Self-change flags
These allow users to update ACLs for their own DID without administrator intervention, with the messaging/account/update Trust Task. Useful in open network modes where users need control over their permissions.
This flag is useful if you want to provide a level of control for the user to update their ACL when needed - for example, in the Public Mediator - Open Network operating mode.
| ACL Flag | Description |
|---|---|
| MODE_SELF_CHANGE | Allows the DID owner to change the ACL Mode for their own DID Access Control List. |
| ALLOW_ALL_SELF_CHANGE | Sets every _CHANGE flag and every SELF_MANAGE_* flag, leaving the capability values unchanged. |
| DENY_ALL_SELF_CHANGE | Clears every _CHANGE flag and every SELF_MANAGE_* flag, leaving the capability values unchanged. |
| SEND_MESSAGES_CHANGE | Allows the DID owner to change the send_messages ACL for their own DID. |
| RECEIVE_MESSAGES_CHANGE | Allows the DID owner to change the receive_messages ACL for their own DID. |
| SEND_FORWARDED_CHANGE | Allows the DID owner to change the send_forwarded ACL for their own DID. |
| RECEIVE_FORWARDED_CHANGE | Allows the DID owner to change the receive_forwarded ACL for their own DID. |
| CREATE_INVITES_CHANGE | Allows the DID owner to change the create_invites ACL for their own DID. |
| ANON_RECEIVE_CHANGE | Allows the DID owner to change the anon_receive ACL for their own DID. |
| SELF_MANAGE_LIST | DID can manage its own access list (add or remove DIDs). Only an admin can grant it. |
| SELF_MANAGE_SEND_QUEUE_LIMIT | DID can set its own send queue limit, up to queued_send_messages_hard (default 10000). Only an admin can grant it. |
| SELF_MANAGE_RECEIVE_QUEUE_LIMIT | DID can set its own receive queue limit, up to queued_receive_messages_hard (default 1000). Only an admin can grant it. |
What’s next
Glad to hear it. Thanks for letting us know.
Sorry to hear that. Thanks for letting us know.
Still stuck? Ask the community on Discord or contact us.