RevokeAssociation mechanism defined in XIP-46.
RevokeAssociation Action
Revocation is performed by publishing aRevokeAssociation identity update to the network.
Structure
member_to_revoke- The installation key or wallet address being revokedrecovery_identifier_signature- Signature from the recovery identifier (wallet) authorizing the revocation
crates/xmtp_id/src/associations/association_log.rs:220-227
What Can Be Revoked?
Two types of members can be revoked:- Installation keys - Removes an installation’s ability to act on behalf of the inbox
- Wallet addresses - Disassociates a wallet from the inbox
Creating a Revocation
Building the Revocation Action
crates/xmtp_id/src/associations/unsigned_actions.rs:43-47
Signature Requirements
The recovery identifier is set during inbox creation and can be updated withChangeRecoveryAddress actions.
Signature process:
crates/xmtp_id/src/associations/builder.rs:360-371
Revocation Effects
Immediate Effects
Once published to the network:- The revoked member is removed from the
AssociationState - The member can no longer sign new identity updates
- The member cannot be used to validate new associations
crates/xmtp_id/src/associations/association_log.rs:227
Group Membership Effects
Instead:- Any group member can update the group membership to the latest
sequence_id - This update removes the revoked installation from the group
- The protocol makes no guarantees about timeliness of removal
sync process:
What Revocation Does NOT Do
XMTP does not detect or automatically remove inactive clients. Inactive client detection must be handled at the application layer, which should then trigger explicit removal.
Revocation Examples
Revoking an Installation
Revoking a Wallet
Self-Revocation Protection
Can an installation revoke itself?
Can an installation revoke itself?
No. Revocations must be signed by the recovery identifier (wallet), not by the installation being revoked.This prevents compromised installations from revoking themselves to cover their tracks.
State Management
AssociationState Tracking
Revocations modify theAssociationState by removing members:
crates/xmtp_id/src/associations/state.rs:123-128
Computing State Diffs
To detect revocations, compute the diff between states:crates/xmtp_id/src/associations/state.rs:45-54
Revocation and Group Updates
GroupMembership Extension
Each MLS group maintains aGroupMembership extension:
sequence_id corresponds to the state of that inbox at a point in time.
Updating After Revocation
Process:- Fetch latest
sequence_idfor affected inbox - Create commit that updates
GroupMembershipto newsequence_id - Compute expected installation list from new state
- Validate that MLS group members match expected installations
crates/xmtp_mls/README.md:72-77
Recovery Identifier Management
What is the Recovery Identifier?
The recovery identifier is the wallet address (or other identifier) authorized to:- Revoke installations and wallets
- Change the recovery identifier itself
- Recover access to the inbox
Changing the Recovery Identifier
While not a revocation per se, changing the recovery identifier affects who can perform revocations:Backend Trust Considerations
Mitigation: Clients should:- Query identity updates from multiple sources if available
- Implement application-level revocation verification
- Monitor for unexpected installations in groups
Testing Revocation
Example Test
crates/xmtp_id/src/associations/mod.rs:524-548 (similar test)
Related Documentation
- Security Overview - Overall security architecture
- Credential Validation - How credentials are validated
- Key Rotation - Key package lifecycle
