Affinidi Messaging

Supported Access Control Lists (ACLs)

List of supported access control lists (ACLs) of DIDComm Mediator.

Access Control Lists (ACLs) control which DIDs can send and receive messages through your DIDComm Mediator.

Mediator-level ACLs

ACL FlagDescription
explicit_denyOpen 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_allowClosed 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:

SettingDefaultDescription
local_direct_delivery_allowedtrueIf 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_anonfalseIf 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 FlagDescription
ALLOW_ALLGrants all capabilities, all self-change bits, all self-management rights, and sets the DID’s inbox mode to explicit_deny (open inbox).
DENY_ALLDenies all capabilities, all self-change bits, and sets the DID’s inbox mode to explicit_allow (closed inbox).
MODE_EXPLICIT_ALLOWSets 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_DENYSets the DID’s inbox to denylist mode. Messages are allowed from all senders unless the sender is on the DID’s denylist.
LOCALGrants the DID an inbox for message storage, fetch, and WebSocket access.
SEND_MESSAGESDID can send messages to others.
RECEIVE_MESSAGESDID can receive messages from others.
SEND_FORWARDEDDID can send forwarded messages.
RECEIVE_FORWARDEDDID can receive forwarded messages.
ANON_RECEIVEDID can receive messages from anonymous senders.
CREATE_INVITESDID can create OOB invites.
BLOCKEDMarks 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 FlagDescription
MODE_SELF_CHANGEAllows the DID owner to change the ACL Mode for their own DID Access Control List.
ALLOW_ALL_SELF_CHANGESets every _CHANGE flag and every SELF_MANAGE_* flag, leaving the capability values unchanged.
DENY_ALL_SELF_CHANGEClears every _CHANGE flag and every SELF_MANAGE_* flag, leaving the capability values unchanged.
SEND_MESSAGES_CHANGEAllows the DID owner to change the send_messages ACL for their own DID.
RECEIVE_MESSAGES_CHANGEAllows the DID owner to change the receive_messages ACL for their own DID.
SEND_FORWARDED_CHANGEAllows the DID owner to change the send_forwarded ACL for their own DID.
RECEIVE_FORWARDED_CHANGEAllows the DID owner to change the receive_forwarded ACL for their own DID.
CREATE_INVITES_CHANGEAllows the DID owner to change the create_invites ACL for their own DID.
ANON_RECEIVE_CHANGEAllows the DID owner to change the anon_receive ACL for their own DID.
SELF_MANAGE_LISTDID can manage its own access list (add or remove DIDs). Only an admin can grant it.
SELF_MANAGE_SEND_QUEUE_LIMITDID 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_LIMITDID can set its own receive queue limit, up to queued_receive_messages_hard (default 1000). Only an admin can grant it.

What’s next

  Explore Meeting Place, an implementation of Affinidi Messaging

  Explore different mediator deployment options

  Test the mediator connection