Make Pccs mandatory but add a remote mode with no internal cache - #88
Open
ameba23 wants to merge 2 commits into
Open
Make Pccs mandatory but add a remote mode with no internal cache#88ameba23 wants to merge 2 commits into
ameba23 wants to merge 2 commits into
Conversation
samlaf
reviewed
Aug 27, 2026
samlaf
left a comment
Contributor
There was a problem hiding this comment.
Only did a superficial pass but LGTM. Appreciate the docs :)
Comment on lines
+47
to
+60
| pub enum PccsMode { | ||
| /// Fetch collateral from the configured endpoint for every asynchronous | ||
| /// lookup, without keeping an internal cache. | ||
| /// | ||
| /// Synchronous lookups are unavailable in this mode because fetching | ||
| /// collateral requires asynchronous I/O. | ||
| Remote, | ||
| /// Start pre-warming an internal cache when [`Pccs`] is constructed. | ||
| /// | ||
| /// Call [`Pccs::ready`] to wait for the initial pre-warm to complete. | ||
| Prewarmed, | ||
| /// Start with an empty internal cache and fetch collateral on demand. | ||
| Lazy, | ||
| } |
Contributor
There was a problem hiding this comment.
curious why you chose to use PccsMode::Remote instead of PccsCache::None. Is it because not having a cache doesnt necessarily imply that you are fetching from a remote..?
Otherwise Prewarmed and Lazy are describing a cache strategy whereas remote doesnt (arguably indirectly). Very possible Im just misunmderstanding because I havent reviewed super closely and dont fully understand the subtleties in this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This addresses a bug found by @samlaf - see #70 (comment)
Previously, with no internal PCCS cache configured, a custom remote one cannot be used - we always default to intel PCS.
In some cases we would want a remote pccs rather than the internal in-memory cache. For example when we have multiple instances of the attested TLS proxy behind a load balancer (as we do on Builderhub) they can share a common cache.
This PR refactors things to make the
PccsonAttestationVerifiermandatory (notOption) but add a 'remote mode' which always fetches from the remote resource.