Skip to content

Make Pccs mandatory but add a remote mode with no internal cache - #88

Open
ameba23 wants to merge 2 commits into
mainfrom
peg/pccs-modes
Open

Make Pccs mandatory but add a remote mode with no internal cache#88
ameba23 wants to merge 2 commits into
mainfrom
peg/pccs-modes

Conversation

@ameba23

@ameba23 ameba23 commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

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 Pccs on AttestationVerifier mandatory (not Option) but add a 'remote mode' which always fetches from the remote resource.

Base automatically changed from peg/attestation-verifier-builder to main August 27, 2026 09:19

@samlaf samlaf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Only did a superficial pass but LGTM. Appreciate the docs :)

Comment thread crates/pccs/src/lib.rs
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,
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

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