Skip to content

Generalise fetching infrastructure - #275

Merged
ctz merged 5 commits into
mainfrom
jbp-generalise-fetch
Oct 30, 2026
Merged

ctz merged 5 commits into
mainfrom
jbp-generalise-fetch

Conversation

@ctz

@ctz ctz commented Oct 30, 2026

Copy link
Copy Markdown
Member

This splits off some parts of #103 -- I've processed the prior comments made there.

@codspeed

codspeed Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 3 untouched benchmarks


Comparing jbp-generalise-fetch (d88181b) with main (13255b5)

Open in CodSpeed

@djc

djc commented Oct 30, 2026

Copy link
Copy Markdown
Member

Can you explain some more of your thinking behind this? I feel like the fetching stuff here is a little unclear about whether it wants to be a framework or a library.

Do the intermediates and CRLite upstreams actually share a manifest type definition, or are you chosing to reuse their definition for your intermediates setup?

Would it make sense to attach MANAGED_EXTENSIONS to the PostProcessor trait (perhaps renaming it to something more generic)?

@ctz

ctz commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

Can you explain some more of your thinking behind this? I feel like the fetching stuff here is a little unclear about whether it wants to be a framework or a library.

Mainly I want the networking details to be as reusable as possible. If intermediate preloading and crlite filters are doing something drastically different to fetch their data, that would feel very odd.

Do the intermediates and CRLite upstreams actually share a manifest type definition, or are you chosing to reuse their definition for your intermediates setup?

Depends what you mean by upstreams. The source data are different (crlite has a manifest-like JSON structure as part of the firefox settings service, but obviously is not a stable format and is re-cast into the manifest by the mirroring step; intermediates construct a manifest based on the contents of CCADB after sharding the intermediate certificates to limit the number of files needing to be downloaded.)

If you mean the upstreams as in mirror contents, yes, these already both use the same manifest format:

https://upki.rustls.dev/intermediates/manifest.json
https://upki.rustls.dev/revocation/manifest.json

Would it make sense to attach MANAGED_EXTENSIONS to the PostProcessor trait (perhaps renaming it to something more generic)?

It's a separate concern. Intermediates probably would have pem for extensions and no post-process step.

@ctz
ctz force-pushed the jbp-generalise-fetch branch from 65a0b04 to d7a749e Compare October 30, 2026 10:48
@djc

djc commented Oct 30, 2026

Copy link
Copy Markdown
Member

Can you explain some more of your thinking behind this? I feel like the fetching stuff here is a little unclear about whether it wants to be a framework or a library.

Mainly I want the networking details to be as reusable as possible. If intermediate preloading and crlite filters are doing something drastically different to fetch their data, that would feel very odd.

Okay, I think that makes sense.

Do the intermediates and CRLite upstreams actually share a manifest type definition, or are you chosing to reuse their definition for your intermediates setup?

Depends what you mean by upstreams. The source data are different (crlite has a manifest-like JSON structure as part of the firefox settings service, but obviously is not a stable format and is re-cast into the manifest by the mirroring step; intermediates construct a manifest based on the contents of CCADB after sharding the intermediate certificates to limit the number of files needing to be downloaded.)

If you mean the upstreams as in mirror contents, yes, these already both use the same manifest format:

https://upki.rustls.dev/intermediates/manifest.json https://upki.rustls.dev/revocation/manifest.json

Right. Maybe we can add some comments to the Manifest type to explain who "owns" the format and where/how it is used?

Would it make sense to attach MANAGED_EXTENSIONS to the PostProcessor trait (perhaps renaming it to something more generic)?

It's a separate concern. Intermediates probably would have pem for extensions and no post-process step.

Fair enough.

Comment thread upki/src/revocation/fetch.rs Resolved
Comment thread upki/src/revocation/index.rs Resolved
ctz added 5 commits October 30, 2026 14:11
`revocation` re-exports both, so `upki::revocation::Manifest` keeps
working for existing users.
This eliminates revocation-specific knowledge in `Plan::construct()`:
that `.filter` and `.delta` are the files it may delete when no manifest
mentions them.
Introduce a `PostProcess` trait that names a derived file and builds its
contents. `revocation` supplies `RevocationIndexer`, so `fetch` no
longer depends on anything revocation-specific.
@ctz
ctz force-pushed the jbp-generalise-fetch branch from d7a749e to d88181b Compare October 30, 2026 14:12
@ctz
ctz added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit f2ed8de Oct 30, 2026
17 checks passed
@ctz
ctz deleted the jbp-generalise-fetch branch October 30, 2026 15:48
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