Add toy implementation of association entry processing #605
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This is not meant to be a real PR, but more of a discussion piece to weigh out the pros and cons of having self-contained credentials. Things like signatures are mocked, and I'm sure there are edge cases I haven't considered here.
The purpose of this spike was to figure out how manageable it would be to have a version of XID where clients could verify credentials without talking to the server.
We ultimately have to choose between a more complicated data structure on the client, or a more complicated distributed-systems problem keeping identity state synchronized between nodes.
This change makes the revocation code more complex in exchange for relaxing the need for clients to have an up-to-date view of the network state to validate credentials.
Architecture
To get the current state of an XID you need two inputs:
The recovery log is always evaluated first, and generates the initial state. Each entry in the association log is then evaluated sequentially. An entry is all-or-nothing, if any validation fails no part of it will be applied and the state remains unchanged.
The idea here is that each client can present a credential that contains an association log leading from XID creation up to the Installation being added. Each group is able to store the Revocation Log of an XID in its
GroupContext
, so that all members have a consistent view of which revocations should be considered at any point in the group's life.When evaluating a credential in a given epoch, each client has a consistent view of the two logs irrespective of the state of the backend. When a new revocation happens, the first member of a group to discover the Revocation event from the backend will publish it into the group state as a MLS proposal.
Revocations
We are looking for the following properties around revocation:
existing_entity_signature
from the revoked entityexisting_entity_signature
of a revoked entity are protected from revocation if they were added before the revocationThe code in this PR should hit all of these properties.
Notes
CreateXid
into the revocation log in this PR. It may make sense to actually exist in both or to be considered separately from either.