Extract pd
auto-https code into standalone utility crate, or else make it unnecessary
#3119
Labels
A-node
Area: System design and implementation for node software
C-enhancement
Category: an enhancement to the codebase
Is your feature request related to a problem? Please describe.
In #1406, we added automatic HTTPS support to
pd
. However, this is only usable inside ofpd
, but there are other places we would like to have HTTPS support, including:pclientd
(cf Transport security and client authentication for View and Custody services #1556)Doing this involved writing custom wrappers between Tokio types and types used by the
rustls_acme
crate we use for auto-HTTPS.Also, the code in
pd
has some special tweaks that turned out to be necessary to get things working and were difficult to debug. For instance, we had mysterious issues withgrpc-web
support until we realized that we needed to manually configure TLS ALPN settings. Ideally these tweaks could be shared with other code, but on the other hand, the work of figuring them out might be the more important part.Describe the solution you'd like
There are two paths forward, depending on whether or not we can discard our wrapper code.
In the first path, we would make the custom shim code unnecessary. Newer versions of
rustls_acme
apparently have Tokio support. We could attempt to remove our wrapper code. Then we could just copy over the setup code frompd
into other binaries we want to have auto-https.In the second path, if we still needed the custom shim code, we should extract it into a new crate under
crates/util
, maybecrates/util/penumbra-auto-https
. Then other crates in our workspace could depend on it.The text was updated successfully, but these errors were encountered: