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

Add linear privilege level measurement value type #354

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

deeglaze
Copy link
Collaborator

As a means of representing a CPL or VMPL, this provides some extra semantic understanding. Leaving condition-matching to a later PR.

As a means of representing a CPL or VMPL, this provides some extra
semantic understanding. Leaving condition-matching to a later PR.
@yogeshbdeshpande
Copy link
Collaborator

@deeglaze Instead of directly making a change request, can we please have an issue, which describes a requirement.

What is a Privilege level of an Environment ?

Why it is needed? What uses cases are relevant when this feature gains relevance ?

@yogeshbdeshpande
Copy link
Collaborator

Add matching rules to the PR

Add examples to the PR, in CDDL

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.

Please continue good work on the PR

@yogeshbdeshpande
Copy link
Collaborator

@deeglaze I assume, there is still work to be done on this PR, so we would not take this up during CoRIM Meeting on 29th Jan 2025 ?

As a means of representing a CPL or VMPL, this provides some extra
semantic understanding. Leaving condition-matching to a later PR.
This adds taggs 564 and 565 (563 proposed by PR ietf-rats-wg#297).
The -Infinity is valid diagnostic notation, but our tooling does not
recognize it.
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.

See inline comments

draft-ietf-rats-corim.md Outdated Show resolved Hide resolved
deeglaze and others added 2 commits January 29, 2025 21:34
Co-authored-by: Ned Smith <ned.smith@intel.com>
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.

LGTM

nedmsmith
nedmsmith previously approved these changes Jan 30, 2025
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.

LGTM

@@ -1118,6 +1118,21 @@ are acceptable states.
Integrity Registers can be used to model the PCRs in a TPM or vTPM, in which case the identifier is the register index, or other kinds of vendor-specific measured objects.


##### Linear Privilege Level {#sec-comid-linear-privlevel}

A Linear Privilege Level describes an operating privilege for the target environment.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would swap the bottom sentence to state that:

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Please clarify.

@@ -1118,6 +1118,21 @@ are acceptable states.
Integrity Registers can be used to model the PCRs in a TPM or vTPM, in which case the identifier is the register index, or other kinds of vendor-specific measured objects.


##### Linear Privilege Level {#sec-comid-linear-privlevel}

A Linear Privilege Level describes an operating privilege for the target environment.
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
A Linear Privilege Level describes an operating privilege for the target environment.
A Linear Privilege Level describes an operating privilege for the target environment. The privilege can be expressed in either positive integer ranges or in negative integer ranges.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

0 is also legal though.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I added to the example showing that a range can include both negative and positive integers. Maybe just document that the values are integers?

##### Linear Privilege Level {#sec-comid-linear-privlevel}

A Linear Privilege Level describes an operating privilege for the target environment.
The convention is that 0 is the highest privilege, and higher numbers correspond to fewer privileges.
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
The convention is that 0 is the highest privilege, and higher numbers correspond to fewer privileges.
When expressed in positive integer ranges the convention is that 0 is the highest privilege, and higher numbers correspond to fewer privileges. No negative number representation is allowed, in this setting.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What setting? This is convention.

Copy link
Collaborator

Choose a reason for hiding this comment

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

What setting? This is convention.

Yes, I mean that you can replace it with convention or something similar!

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 understand this comment. Replace what with convention? I'm trying to encode a range comparison that requires an internalized notion of order.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The text related to positive range should follow the cddl section as the rest of the discussion on ranges is following the cddl section.


The ACS entry value stored under `measurement-values-map` codepoint 15 is a linear privilege level, which must have type `linear-privlevel-type-choice`.

If the entry `linear-privlevel-type-choice` is an `int` or an `int` tagged with #6.564, then comparison with the `int` named as PRIV is as follows.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not clear when was PRIV introduced and what its context is? Can you please clarify..

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

PRIV is referenced below when describing the comparison. PRIV here represents an exact privilege level in the ACS that will be compared against a CoRIM. I'm following the same wording form as for SVN.


If the entry `linear-privlevel-type-choice` is an `int` or an `int` tagged with #6.564, then comparison with the `int` named as PRIV is as follows.

* If the condition ECT value for `measurement-values-map` codepoint 15 is an untagged `int` or an `int` tagged with #6.564 then an equality comparison is performed on the `int` components.
Copy link
Collaborator

@yogeshbdeshpande yogeshbdeshpande Feb 5, 2025

Choose a reason for hiding this comment

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

When would one use int and when would one use tagged-int. can you please explain as this is the base spec!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

linear-privlevel-type-choice /= signed-integer-range-type-choice
signed-integer-range-type-choice = int-eq / int-range / tagged-int-eq / tagged-int-range
int-eq = int
int-range = [min: inf-int, max: inf-int]
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks like a policy construct which i am little nervous in absorbing here..?

is there a way to express it more clearly using base types?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's a weak form of comparison for use in conditional endorsements. We have SVN range comparisons. This is just slightly broader.

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.

Made some comments!

@@ -1118,6 +1118,21 @@ are acceptable states.
Integrity Registers can be used to model the PCRs in a TPM or vTPM, in which case the identifier is the register index, or other kinds of vendor-specific measured objects.


##### Linear Privilege Level {#sec-comid-linear-privlevel}

A Linear Privilege Level describes an operating privilege for the target environment.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I added to the example showing that a range can include both negative and positive integers. Maybe just document that the values are integers?

##### Linear Privilege Level {#sec-comid-linear-privlevel}

A Linear Privilege Level describes an operating privilege for the target environment.
The convention is that 0 is the highest privilege, and higher numbers correspond to fewer privileges.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The text related to positive range should follow the cddl section as the rest of the discussion on ranges is following the cddl section.

* If the condition ECT value for `measurement-values-map` codepoint 15 is an `int-range` tagged with #6.564 then a range inclusion comparison is performed.
The comparison MUST return true if the value of PRIV is greater than or equal to the `min` value in the condition ECT AND the value of PRIV is less than or equal to than the `max` value in the condition ECT

If the entry `linear-privilege-type-choice` is an `int-range` or `int-range` tagged with #6.564, then comparison with the pair of `inf-int` values MINPRIV and MAXPRIV is as follows.
Copy link
Collaborator

Choose a reason for hiding this comment

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

inf-int doesn't appear to be defined anywhere.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

@nedmsmith
Copy link
Collaborator

General feedback: The value of an integer measurement type that is strictly used for privilege levels doesn't allow the flexibility to be used for other measurement types (as in the type mechanism isn't extensible) means it isn't as generally useful. I thought we were going to give it semantics that were similar to raw-value where the mkey tag can be used to distginguish semantic richness while the appraisal comparison doesn't care as it's simple checking whether a singleton value falls within the range of integers.

@nedmsmith nedmsmith dismissed their stale review February 12, 2025 19:26

Reevaluating the direction

@deeglaze
Copy link
Collaborator Author

General feedback: The value of an integer measurement type that is strictly used for privilege levels doesn't allow the flexibility to be used for other measurement types (as in the type mechanism isn't extensible) means it isn't as generally useful.

Agreed, which is why the tagged value is a tagged-int-range, and not a tagged-linear-privilege-range. The added semantic context of linear privilege comes from codepoint 15. An mkey can add further context that it's for a specific notion of privilege like CPL or VMPL.

I thought we were going to give it semantics that were similar to raw-value where the mkey tag can be used to distginguish semantic richness while the appraisal comparison doesn't care as it's simple checking whether a singleton value falls within the range of integers.

The comparison only cares so much as it provides the semantics of range inclusion.

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.

3 participants