Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cond ref series triple branch #49

Merged
merged 33 commits into from
Mar 3, 2023
Merged

Conversation

nedmsmith
Copy link
Collaborator

Added section for conditional reference series triple.

started section for conditional reference series triple. Issue #44
Prettified cddl for inclusion in markdown.
Added section for Conditional Reference Series triple.
@nedmsmith
Copy link
Collaborator Author

Closes issue #44.

@nedmsmith nedmsmith self-assigned this Feb 1, 2023
Copy link
Collaborator

@shnwc shnwc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested edits. The input evidence already has claims that match all the reference values in the matched record, so the reference values in that record should not be accepted again (which creates duplicates).

draft-ietf-rats-corim.md Outdated Show resolved Hide resolved
draft-ietf-rats-corim.md Outdated Show resolved Hide resolved
draft-ietf-rats-corim.md Outdated Show resolved Hide resolved
draft-ietf-rats-corim.md Outdated Show resolved Hide resolved
nedmsmith and others added 4 commits February 6, 2023 16:43
Co-authored-by: Shanwei <58789783+shnwc@users.noreply.github.com>
Co-authored-by: Shanwei <58789783+shnwc@users.noreply.github.com>
Co-authored-by: Shanwei <58789783+shnwc@users.noreply.github.com>
Co-authored-by: Shanwei <58789783+shnwc@users.noreply.github.com>
#### Conditional Reference Series Triple {#sec-comid-triple-cond-ref}

A Conditional Reference Series triple relates reference measurements to a Target
Environment where endorsed measurements are accepted given all reference measurements
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change 'given' to 'if'

measurement-map / measurement-values-map ; reference values
? measurement-map / measurement-values-map ; conditionally endorsed values, could be empty, but still a valid expression in a series
measurement-map / measurement-values-map ; addit'l reference values
? measurement-map / measurement-values-map ; endorsed values
Copy link
Collaborator Author

@nedmsmith nedmsmith Feb 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ned captured an issue raised by others: is there a syntactical bug with measurement-map / measurement-values-map?

Copy link
Collaborator Author

@nedmsmith nedmsmith Feb 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that tooling doesn't complain about syntax and examples pass schema checks. If there is a problem, it doesn't appear to be syntactical. The parser may be handed a byte string that could be either a measurement-map or measurement-values-map, but given one or the other may have failed a parsing test (but not both), chances are good the type of byte string would be included with the byte string to the parser. This would substitute for a well-known type such as a CBOR tag. In any case, it seem unlikely that a parser would be confused unless the first few bytes can satisfy both the measurement-map and measurement-values-map schema constraints and an implementation favors one over the other (incorrectly). Nevertheless, the use doesn't require supporting this much optionality, especially if the initial reference values are always measurement-maps and authorized-by, if used, applies to all measurements in the series data.

changed 'given' to 'if' in conditional-reference-series-triple section.
Changed name of series record data to conditional-series-record. Removed measurement-values-map from triple subject and removed measurement-map from triple object. The authorized-by semantics are specified in the triple subject and apply to all triple object measurements.
updated example to align with updated conditional-reference-endorsed-triple cddl
@shnwc
Copy link
Collaborator

shnwc commented Feb 8, 2023

The latest commits look good to me.

draft-ietf-rats-corim.md Outdated Show resolved Hide resolved
draft-ietf-rats-corim.md Outdated Show resolved Hide resolved
The first successfully matched record from the `conditional-series-record` array
terminates evaluation retaining the accepted Claims.

If none of the records in the series are matched then no Claims are accepted and
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that the term "claims" are used a few times. Wonder if it will be more clear to change all "endorsement measurements" to "endorsement claims"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A Claim is the combination of a named thing and its measurement(s). In this triple the triple subject is the named thing and the object is the set of measurements that are accepted. The measurement is more or less the triple object, but given a compound object like series records, the measurement could refer to either the reference or endorsed values. Given this understanding of Claim, does the proposed text still make sense?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the existing proposed text still make sense.

nedmsmith and others added 2 commits February 8, 2023 15:03
Co-authored-by: Shanwei <58789783+shnwc@users.noreply.github.com>
Co-authored-by: Shanwei <58789783+shnwc@users.noreply.github.com>
The `authorized-by` value in `measurement-map`, if present, applies to all measurements
in the triple including those in `conditional-series-record` records.

The triple object is a series of additional measurements expressed as an array of
Copy link
Collaborator

@yogeshbdeshpande yogeshbdeshpande Feb 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my view we should have a simplified triple object that simply says that accept these values when the subject matches evidence.

This PR makes the individual conditional checking within the triple object far too complicated to have it in the main specifiction

@yogeshbdeshpande
Copy link
Collaborator

yogeshbdeshpande commented Feb 15, 2023

I feel the proposed changes are far too complex to be part of base specification:

What we can have is a simple statement as under:

; A supply chain actor would like to provision additional reference values or endorsed values,
; based on the simple condition that the subject specified using the given env and ref values
; matches the criterion specified by the Verifier
; Then we should leave it to individual schemes/profiles, how individual verifiers want to accept the series
; of reference and/or endorsed values specified within the object of the triple
based on their specific implementations

conditional-reference-series-triple-record = [
; triple subject
[ environment-map,
measurement-map ; initial reference values
]
; triple object - series of ref-end values
[ + ref-end-series-map ] ; not sure we need a series here as well, but retaining to clarify?
]

ref-end-series-map = non-emtpy <{
? [+measurement-values-map] ; reference values
? [+measurement-values-map] ; endorsed values
}>

@nedmsmith
Copy link
Collaborator Author

nedmsmith commented Feb 22, 2023 via email

added dependencies on conditional series and conditional endorsement related cddl files
removed coswid cddl file.
created cddl file for conditional-endorsement-series-triple-record
created cddl file for conditional-endorsement-triple-record
removed cddl file for conditional-reference-series-triple-record
created cddl file for conditional-series-record
removed dependency on conditional-reference-series-triple-record.cddl and added dependencies on the revised conditional endorsement triples
removed example that tested removed triple
added example that tests new conditional endorsement triple
added example that tests conditional endorsement series triple
added cddl file for stateful-environment-record
added conditional-endorsement and conditional endorsement series triples to triples-map
updated prose in markdown file to reflect changes to conditional triples.
cleaned up comments
cleaned up comments
Copy link
Collaborator Author

@nedmsmith nedmsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied changes discussed as part of issue #44 - PR #49 is ready for review

@thomas-fossati
Copy link
Collaborator

Applied changes discussed as part of issue #44 - PR #49 is ready for review

I think we should use the CDDL in #44 (comment)

@nedmsmith
Copy link
Collaborator Author

I think we should use the CDDL in #44 (comment)

I thought I did. What is different?

@thomas-fossati
Copy link
Collaborator

I think we should use the CDDL in #44 (comment)

I thought I did. What is different?

sorry, my bad. I checked out a similarly named branch conditional-reference-series-triple-record and got utterly confused :-(

Copy link
Collaborator

@thomas-fossati thomas-fossati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, a few comments inlined

@@ -5,7 +5,9 @@ COMID_FRAGS += class-map.cddl
COMID_FRAGS += comid-entity-map.cddl
COMID_FRAGS += comid-role-type-choice.cddl
COMID_FRAGS += concise-mid-tag.cddl
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related to this PR, just noting this duplicates L1

cddl/conditional-endorsement-series-triple-record.cddl Outdated Show resolved Hide resolved
cddl/triples-map.cddl Outdated Show resolved Hide resolved
cddl/triples-map.cddl Outdated Show resolved Hide resolved
draft-ietf-rats-corim.md Outdated Show resolved Hide resolved
draft-ietf-rats-corim.md Show resolved Hide resolved
nedmsmith and others added 3 commits March 3, 2023 13:36
accepted suggested change

Co-authored-by: Thomas Fossati <tho.ietf@gmail.com>
accepted suggested change

Co-authored-by: Thomas Fossati <tho.ietf@gmail.com>
accepted suggested change

Co-authored-by: Thomas Fossati <tho.ietf@gmail.com>
Copy link
Collaborator

@shnwc shnwc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

cddl/conditional-series-record.cddl Outdated Show resolved Hide resolved
nedmsmith and others added 2 commits March 3, 2023 14:12
accepted proposed change

Co-authored-by: Shanwei <58789783+shnwc@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants