Skip to content

Commit

Permalink
Merge pull request #12 from openmls/keks/assemble-code-refs
Browse files Browse the repository at this point in the history
Update List with CodeRefs
  • Loading branch information
keks authored Sep 5, 2024
2 parents 4f87423 + 967b99d commit 76b8fae
Show file tree
Hide file tree
Showing 11 changed files with 235 additions and 117 deletions.
102 changes: 63 additions & 39 deletions checksets/01-leaf_node.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,22 @@ let checks =
types.Status.Unknown
types.CodeRefs/empty
types.CodeRefs/empty
types.Notes/empty
( types.Notes/single
"maybe this should be an application-level check?"
)
, types.Check/new
2
( types.RfcRef/single
"Verify that the signature on the LeafNode is valid using signature_key."
"section-7.3-4.2"
)
types.Status.Unknown
types.CodeRefs/empty
types.Status.Partial
( types.CodeRefs/single
"openmls::key_packages::KeyPackageIn::validate"
"https://github.com/openmls/openmls/blob/5067034708f2332b0dfd8d7d28eb6618fd38f4c7/openmls/src/key_packages/key_package_in.rs#L150"
)
types.CodeRefs/empty
types.Notes/empty
(types.Notes/single "todo: add test ref")
, types.Check/new
3
( types.RfcRef/single
Expand Down Expand Up @@ -71,14 +76,13 @@ let checks =
''
"section-7.3-4.4"
)
types.Status.Missing
types.CodeRefs/empty
types.CodeRefs/empty
( types.Notes/single
''
reported in https://github.com/xmtp/openmls/pull/19
''
types.Status.Partial
( types.CodeRefs/single
"openmls::group::public_group::validation::validate_capabilities"
"https://github.com/openmls/openmls/blob/5067034708f2332b0dfd8d7d28eb6618fd38f4c7/openmls/src/group/public_group/validation.rs#L303-L383"
)
types.CodeRefs/empty
(types.Notes/single "todo: add test refs")
, types.Check/new
5
( types.RfcRef/new
Expand All @@ -90,10 +94,19 @@ let checks =
''
[ "section-7.3-4.5.1", "section-7.3-4.5.2.1" ]
)
types.Status.Unknown
types.CodeRefs/empty
types.Status.Partial
( types.CodeRefs/single
"openmls::key_packages::KeyPackageIn::validate"
"https://github.com/openmls/openmls/blob/5067034708f2332b0dfd8d7d28eb6618fd38f4c7/openmls/src/key_packages/key_package_in.rs#L193-L194"
)
types.CodeRefs/empty
types.Notes/empty
( types.Notes/new
[ ''
probably only done for key packages, but these should be the only
leaf nodes with lifetimes anyway''
, "todo: add test refs"
]
)
, types.Check/new
6
( types.RfcRef/new
Expand All @@ -108,7 +121,7 @@ let checks =
''
[ "section-7.3-4.5.1", "section-7.3-4.5.2.2" ]
)
types.Status.Unknown
types.Status.Missing
types.CodeRefs/empty
types.CodeRefs/empty
types.Notes/empty
Expand All @@ -122,10 +135,13 @@ let checks =
''
"section-7.3-4.6"
)
types.Status.Unknown
types.CodeRefs/empty
types.Status.Partial
( types.CodeRefs/single
"openmls::group::public_group::validation::validate_capabilities"
"https://github.com/openmls/openmls/blob/5067034708f2332b0dfd8d7d28eb6618fd38f4c7/openmls/src/group/public_group/validation.rs#L303-L383"
)
types.CodeRefs/empty
types.Notes/empty
(types.Notes/single "todo: add test ref")
, types.Check/new
8
( types.RfcRef/new
Expand All @@ -135,10 +151,13 @@ let checks =
''
[ "section-7.3-4.7.1", "section-7.3-4.7.2.1" ]
)
types.Status.Unknown
types.CodeRefs/empty
types.Status.Partial
( types.CodeRefs/single
"openmls::key_packages::KeyPackageIn::validate"
"https://github.com/openmls/openmls/blob/5067034708f2332b0dfd8d7d28eb6618fd38f4c7/openmls/src/key_packages/key_package_in.rs#L148-L154"
)
types.CodeRefs/empty
types.Notes/empty
(types.Notes/single "todo: add test refs")
, types.Check/new
9
( types.RfcRef/new
Expand All @@ -150,10 +169,17 @@ let checks =
''
[ "section-7.3-4.7.1", "section-7.3-4.7.2.2" ]
)
types.Status.Unknown
types.CodeRefs/empty
types.Status.Partial
( types.CodeRefs/single
"openmls::group::public_group::PublicGroup::validate_key_uniqueness"
"https://github.com/openmls/openmls/blob/5067034708f2332b0dfd8d7d28eb6618fd38f4c7/openmls/src/group/public_group/validation.rs#L280-L282"
)
types.CodeRefs/empty
types.Notes/empty
( types.Notes/new
[ "we might be more restrictive here, because we don't accept colliding keys at all, not just in Update proposals"
, "todo: add test refs"
]
)
, types.Check/new
10
( types.RfcRef/new
Expand All @@ -164,7 +190,7 @@ let checks =
''
[ "section-7.3-4.7.1", "section-7.3-4.7.2.3" ]
)
types.Status.Unknown
types.Status.Missing
types.CodeRefs/empty
types.CodeRefs/empty
types.Notes/empty
Expand All @@ -177,14 +203,13 @@ let checks =
''
[ "section-7.3-4.8.1", "section-7.3-4.7.8.1" ]
)
types.Status.Missing
types.CodeRefs/empty
types.CodeRefs/empty
( types.Notes/single
''
reported in https://github.com/xmtp/openmls/pull/19
''
types.Status.Partial
( types.CodeRefs/single
"openmls::group::public_group::validation::validate_key_uniqueness"
"https://github.com/openmls/openmls/blob/5067034708f2332b0dfd8d7d28eb6618fd38f4c7/openmls/src/group/public_group/validation.rs#L169-L298"
)
types.CodeRefs/empty
(types.Notes/single "todo: add test ref")
, types.Check/new
12
( types.RfcRef/new
Expand All @@ -194,14 +219,13 @@ let checks =
''
[ "section-7.3-4.8.1", "section-7.3-4.7.8.2" ]
)
types.Status.Missing
types.CodeRefs/empty
types.CodeRefs/empty
( types.Notes/single
''
reported in https://github.com/xmtp/openmls/pull/19
''
types.Status.Partial
( types.CodeRefs/single
"openmls::group::public_group::validation::validate_key_uniqueness"
"https://github.com/openmls/openmls/blob/5067034708f2332b0dfd8d7d28eb6618fd38f4c7/openmls/src/group/public_group/validation.rs#L169-L298"
)
types.CodeRefs/empty
(types.Notes/single "todo: add test ref")
]
: List types.Check

Expand Down
27 changes: 20 additions & 7 deletions checksets/02-key_package.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ let checks =
types.Status.Unknown
types.CodeRefs/empty
types.CodeRefs/empty
types.Notes/empty
( types.Notes/single
"currently this is only done when processing adds in commit messages"
)
, types.Check/new
3
( types.RfcRef/single
Expand All @@ -54,10 +56,18 @@ let checks =
''
"section-10.1-4.3"
)
types.Status.Unknown
types.CodeRefs/empty
types.Status.Partial
( types.CodeRefs/single
"openmls::key_packages::KeyPackageIn::validate"
"https://github.com/openmls/openmls/blob/5067034708f2332b0dfd8d7d28eb6618fd38f4c7/openmls/src/key_packages/key_package_in.rs#L150"
)
types.CodeRefs/empty
types.Notes/empty
( types.Notes/single
''
this looks like a bug in the RFC. It should be signed using leaf_node.signature_key,
but the credential can have opinions on whether that key is valid.
''
)
, types.Check/new
4
( types.RfcRef/single
Expand All @@ -67,10 +77,13 @@ let checks =
''
"section-10.1-4.4"
)
types.Status.Unknown
types.CodeRefs/empty
types.Status.Partial
( types.CodeRefs/single
"openmls::key_packages::KeyPackageIn::validate"
"https://github.com/openmls/openmls/blob/5067034708f2332b0dfd8d7d28eb6618fd38f4c7/openmls/src/key_packages/key_package_in.rs#L160-L163"
)
types.CodeRefs/empty
types.Notes/empty
(types.Notes/single "todo: add test ref")
]

in types.CheckSet/new id name desc checks
78 changes: 55 additions & 23 deletions checksets/03-regular_commit_proposal_list.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,41 @@ let checks =
''
"section-12.2-3.1"
)
types.Status.Unknown
types.CodeRefs/empty
types.Status.Partial
( types.CodeRefs/single
"openmls::group::public_group::PublicGroup::validate_commit"
"https://github.com/openmls/openmls/blob/5067034708f2332b0dfd8d7d28eb6618fd38f4c7/openmls/src/group/public_group/staged_commit.rs#L42-L165"
)
types.CodeRefs/empty
types.Notes/empty
( types.Notes/new
[ "The use of the ? operator means that if any of the checks fails, the function returns an error"
, "todo: add test ref"
]
)
, types.Check/new
2
( types.RfcRef/single
"It contains an Update proposal generated by the committer."
"section-12.2-3.2"
)
types.Status.Unknown
types.CodeRefs/empty
types.Status.Partial
( types.CodeRefs/single
"openmls::group::public_group::PublicGroup::validate_commit"
"https://github.com/openmls/openmls/blob/5067034708f2332b0dfd8d7d28eb6618fd38f4c7/openmls/src/group/public_group/validation.rs#L436-L458"
)
types.CodeRefs/empty
types.Notes/empty
(types.Notes/single "todo: add tests ref")
, types.Check/new
3
( types.RfcRef/single
"It contains a Remove proposal that removes the committer."
"section-12.2-3.3"
)
types.Status.Unknown
types.CodeRefs/empty
types.Status.Partial
( types.CodeRefs/single
"openmls::group::mls_group::MlsGroup::from_committed_proposals"
"https://github.com/openmls/openmls/blob/5067034708f2332b0dfd8d7d28eb6618fd38f4c7/openmls/src/group/mls_group/proposal_store.rs#L239-L270"
)
types.CodeRefs/empty
types.Notes/empty
, types.Check/new
Expand All @@ -70,10 +83,16 @@ let checks =
types.Status.Missing
types.CodeRefs/empty
types.CodeRefs/empty
( types.Notes/single
''
reported in https://github.com/xmtp/openmls/pull/19
''
( types.Notes/new
[ ''
reported in https://github.com/xmtp/openmls/pull/19
''
, ''
this check seems contradictory; if a forbidden thing happens, use this
resolution strategy. We likely don't do the right thing, but it's also
not clear what the right thing would be.
''
]
)
, types.Check/new
5
Expand All @@ -88,10 +107,15 @@ let checks =
types.Status.Missing
types.CodeRefs/empty
types.CodeRefs/empty
( types.Notes/single
''
reported in https://github.com/xmtp/openmls/pull/19
''
( types.Notes/new
[ ''
reported in https://github.com/xmtp/openmls/pull/19
''
, ''
possibly an app-level concern, but then we at least need to give the app the
tools to valiate this
''
]
)
, types.Check/new
6
Expand All @@ -107,10 +131,15 @@ let checks =
types.Status.Missing
types.CodeRefs/empty
types.CodeRefs/empty
( types.Notes/single
''
reported in https://github.com/xmtp/openmls/pull/19
''
( types.Notes/new
[ ''
reported in https://github.com/xmtp/openmls/pull/19
''
, ''
possibly an app-level concern, but then we at least need to give the app the
tools to valiate this
''
]
)
, types.Check/new
7
Expand All @@ -121,8 +150,11 @@ let checks =
''
"section-12.2-3.7"
)
types.Status.Unknown
types.CodeRefs/empty
types.Status.Partial
( types.CodeRefs/single
"openmls::group::public_group::PublicGroup::validate_pre_shared_key_proposals"
"https://github.com/openmls/openmls/blob/5067034708f2332b0dfd8d7d28eb6618fd38f4c7/openmls/src/group/public_group/validation.rs#L467-L492"
)
types.CodeRefs/empty
types.Notes/empty
, types.Check/new
Expand Down Expand Up @@ -203,7 +235,7 @@ let checks =
''
"section-12.2-3.12"
)
types.Status.Unknown
types.Status.Missing
types.CodeRefs/empty
types.CodeRefs/empty
types.Notes/empty
Expand Down
9 changes: 6 additions & 3 deletions checksets/05-add_proposal.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ let checks =
''
"section-12.1.1-3"
)
types.Status.Unknown
types.CodeRefs/empty
types.Status.Partial
( types.CodeRefs/single
"openmls::messages::proposals_in::AddProposalIn::validate"
"https://github.com/openmls/openmls/blob/5067034708f2332b0dfd8d7d28eb6618fd38f4c7/openmls/src/messages/proposals_in.rs#L156"
)
types.CodeRefs/empty
types.Notes/empty
(types.Notes/single "todo: add test refs")
]

in types.CheckSet/new id name desc checks
Loading

0 comments on commit 76b8fae

Please sign in to comment.