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

extend the use of tagged-bytes to identifiers #188

Merged
merged 8 commits into from
Jan 8, 2024
Merged

Conversation

thomas-fossati
Copy link
Collaborator

Fix #184

Fix #184

Signed-off-by: Thomas Fossati <thomas.fossati@linaro.org>
Copy link
Collaborator

@yogeshbdeshpande yogeshbdeshpande left a comment

Choose a reason for hiding this comment

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

Minor .nit but LGTM!

Signed-off-by: Thomas Fossati <thomas.fossati@linaro.org>
Signed-off-by: Thomas Fossati <thomas.fossati@linaro.org>
### Tagged Bytes Type {#sec-common-tagged-bytes}

An opaque, variable-length byte string.
It can be used in different contexts: as an instance, class or group identifier in an `environment-map`; as a raw value measurement in a `measurement-values-map`.
Copy link
Member

Choose a reason for hiding this comment

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

Agreed to omit this suggestion.

Co-authored-by: Andrew Draper <andrew.draper@intel.com>
@ietf-rats-wg ietf-rats-wg deleted a comment from yogeshbdeshpande Dec 20, 2023
An opaque, variable-length byte string.
It can be used in different contexts: as an instance, class or group identifier in an `environment-map`; as a raw value measurement in a `measurement-values-map`.
Its semantics is defined by the context in which it is found, and by the overarching CoRIM profile.
When used as an identifier the responsible allocator entity SHOULD ensure uniqueness.
Copy link
Collaborator

Choose a reason for hiding this comment

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

the scope of uniqueness should be defined.

Copy link
Collaborator Author

@thomas-fossati thomas-fossati Dec 20, 2023

Choose a reason for hiding this comment

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

You mean something like:

"[...] ensure uniqueness within the usage scope."

Copy link
Collaborator

Choose a reason for hiding this comment

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

You mean something like:

"[...] ensure uniqueness within the usage scope."

OK

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cool, see 9757398

draft-ietf-rats-corim.md Outdated Show resolved Hide resolved
An opaque, variable-length byte string.
It can be used in different contexts: as an instance, class or group identifier in an `environment-map`; as a raw value measurement in a `measurement-values-map`.
Its semantics is defined by the context in which it is found, and by the overarching CoRIM profile.
When used as an identifier the responsible allocator entity SHOULD ensure uniqueness.
Copy link
Collaborator

Choose a reason for hiding this comment

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

You mean something like:

"[...] ensure uniqueness within the usage scope."

OK

Co-authored-by: Ned Smith <ned.smith@intel.com>
Copy link
Collaborator

@yogeshbdeshpande yogeshbdeshpande left a comment

Choose a reason for hiding this comment

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

LGTM

An opaque, variable-length byte string.
It can be used in different contexts: as an instance, class or group identifier in an `environment-map`; as a raw value measurement in a `measurement-values-map`.
Its semantics are defined by the context in which it is found, and by the overarching CoRIM profile.
When used as an identifier the responsible allocator entity SHOULD ensure uniqueness within the usage scope.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
When used as an identifier the responsible allocator entity SHOULD ensure uniqueness within the usage scope.
When used as an identifier the responsible allocator entity SHOULD ensure global uniqueness.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think global uniqueness is needed here. It is sufficient that the tagged bytes unambiguously identify an entity within a given scope. The same 560(h'01') may refer to instance "1" or to class "1" without ambiguity.

Copy link
Collaborator

@nedmsmith nedmsmith Jan 3, 2024

Choose a reason for hiding this comment

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

The other examples of instance-id have implied global uniqueness properties. The motivation for adding bytes was that some felt ueid might not be big enough to ensure global uniqueness. The verifier doesn't have additional context to know what scope to apply to disambiguate scope-A:bytes from scope-B:bytes. We shouldn't overload class properties in instance-id since class-id is intended accommodate class-based identifiers.

The problem is there is one section for describing the semantics of the tag 560 () but it is used in all three environment-map options where each has different scope (class, instance, or group). 560 means different things depending on class, instance, or group context. Descriptive text should be specific to each context.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Clarifying why I do not agree with Andy's suggestion: the word global to me implies across contexts, which is not what we should require from the allocator for the reason I've tried to describe above.

Descriptive text should be specific to each context.

Do you have any suggestions? ISTM that the exact semantics will be profile-specific, i.e., out-of-scope of base CoRIM -- except if DICE has anything to say about #6.560.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Discussion today resolved that 560 is to be interpreted within the CDDL context in which it occurs. This PR proposes 3 additional contexts from the current raw-value-group context. The description of the CDDL for each context should describe the expected properties.

In the case, of environment-map there are other issue #176 observes the lack of meaningful scoping discussion for each of the fields (class, instance, group). If we resolve #176, then this thread becomes mute.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Discussion today resolved that 560 is to be interpreted within the CDDL context in which it occurs.

Yes

This PR proposes 3 additional contexts from the current raw-value-group context.

I don't understand this.

The description of the CDDL for each context should describe the expected properties.

Yes

In the case, of environment-map there are other issue #176 observes the lack of meaningful scoping discussion for each of the fields (class, instance, group). If we resolve #176, then this thread becomes mute.

WFM

draft-ietf-rats-corim.md Outdated Show resolved Hide resolved
thomas-fossati and others added 2 commits January 3, 2024 18:04
Co-authored-by: Ned Smith <ned.smith@intel.com>
Signed-off-by: Thomas Fossati <thomas.fossati@linaro.org>
@@ -821,7 +832,7 @@ An instance carries a unique identifier that is reliably bound to a Target Envir
that is an instance of the Attester.

The types defined for an instance identifier are CBOR tagged expressions of
UEID, UUID, or cryptographic key identifier.
UEID, UUID, variable-length opaque byte string, or cryptographic key identifier.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please either add a reference to tagged bytes or describe profile specific behaviour dependency here!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done in 6fee7e3

@@ -821,7 +832,7 @@ An instance carries a unique identifier that is reliably bound to a Target Envir
that is an instance of the Attester.

The types defined for an instance identifier are CBOR tagged expressions of
UEID, UUID, or cryptographic key identifier.
UEID, UUID, variable-length opaque byte string, or cryptographic key identifier.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Similar entry is needed in the class identifier as well!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

see 6fee7e3

Copy link
Collaborator

@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.

We may still need to open an issue to document scope assumptions with used with instance-id and group-id. #176 seems to be specific to class-map.

@yogeshbdeshpande yogeshbdeshpande merged commit 7af90a6 into main Jan 8, 2024
2 checks passed
@yogeshbdeshpande yogeshbdeshpande deleted the opaque-id branch January 8, 2024 16:30
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.

Tagged bytes as instance and class identifiers
5 participants