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

Improve EAR policy #640

Merged
merged 2 commits into from
Jan 3, 2025
Merged

Conversation

fitzthum
Copy link
Member

@fitzthum fitzthum commented Dec 20, 2024

There is no need to set claims for every platform and compare them with min. We can just set the claims directly and rely on short-circuiting to skip any platforms that don't have TCB claims set.

The SNP executables should depend on the SNP reference values

Signed-off-by: Tobin Feldman-Fitzthum <[email protected]>
Make the policy logic simpler. Rather than using the min function
(which I'm not sure is even defined on TrustClaims) use short-circuiting
to only evaluate the rules for the platform that has TCB values defined.

I don't think there is any risk that the policy could be tricked into
evaluating the wrong rules, such as the sample ones.

Signed-off-by: Tobin Feldman-Fitzthum <[email protected]>
@fitzthum fitzthum requested a review from a team as a code owner December 20, 2024 17:07
Copy link
Member

@Xynnn007 Xynnn007 left a comment

Choose a reason for hiding this comment

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

Thanks for this. Do you think we need example policies for different platforms?

@fitzthum
Copy link
Member Author

fitzthum commented Jan 2, 2025

Do you think we need example policies for different platforms?

This policy is still intended to be used with all the platforms we support. Previously I defined intermediate claims such as snp_hardware and then produced one claim from all of the *_hardware claims. Now I just define hardware directly. If the evidence for the platform isn't there, the definition will be short-circuited.

We do still have TODOs at the bottom to add logic for other platforms. I am hoping that all our platforms will be defined here soon but I may need a bit of help with that from platform experts.

@fitzthum fitzthum merged commit bf306c8 into confidential-containers:main Jan 3, 2025
25 checks passed
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.

2 participants