Open Bug 1839611 Opened 1 year ago Updated 1 year ago

Add code to the ObliviousHttpService for automatic keyconfig fetching and management

Categories

(Core :: Networking, enhancement, P2)

enhancement

Tracking

()

People

(Reporter: valentin, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

The nsIObliviousHttpService.newChannel interface can be used right away for making requests to arbitrary Relay/Gateway configurations, but it requires custom fetching and management for keyconfigs.
As we expand our support of OHTTP to more components it would be nice to have a common logic to manage configs:

Random list of requirements:

  • Fetch keyconfig and store it in a memory cache
  • Provide API to get cached keyconfig
  • Provide API for clearing keyconfigs when clear-site signal is issued
  • Get a signal from ObliviousHttpChannel when decryption fails because of a bad/expired keyconfig so we can refetch the updated keyconfig.

I wrote https://searchfox.org/mozilla-central/source/netwerk/protocol/http/OHTTPConfigManager.sys.mjs , which ticks some but not all these boxes. It may need to move to C++ and/or grow an idl interface if we want to use it from C++ consumers. For now we'll use it directly from the JS OHTTP shopping code to handle some of this.

You need to log in before you can comment on or make changes to this bug.