Skip to content

Alternate approach to proxying #55

@ameba23

Description

@ameba23

Alternative proposal based on conversation with @0x416e746f6e:

  • Attestation generation and verification should be done once per TLS certificate, not once per session (certificate binding but no session binding).
  • Have an intermediary CA-endorsed entity which signs certificates with the attestation evidence included as a certificate extension.
  • Already validated remote certificates (together with attestation evidence) are cached by the proxy client or proxy server.

Protocol:

  1. When a TCP connection from the source client to the proxy client is made, the proxy client connects to the proxy server, and does a TLS handshake, optionally with client authentication (unlike the current protocol, the proxy client does not eagerly connect and keep the session open).
  2. The proxy-client checks if it has already validated the attestation evidence from the remote certificate (included in the extension), by checking its cache. If not, it validates the evidence in the certificate extension and adds it to the cache.
  3. If client authentication is enabled, the proxy server does the same with the client certificate and evidence.
  4. The proxy client begins forwarding traffic from the source client connection to the proxy server.
  5. The proxy server makes a TCP connection to the target service and begins forwarding traffic from the proxy client.

Advantages:

Disadvantages:

  • No session binding / freshness guarantee (maybe not an issue)
  • TLS handshake between proxy client and proxy server is performed once per connection from the source client. Current design keeps the connection open.

I think whether this approach makes sense depends on the use-case. The current design is based on the needs of buildernet node to builder hub, where frequent requests are made to get details of active peers (meaning it makes sense to keep the connection open and avoid additional TCP and TLS handshakes.

It could be worth considering to support both approaches, either through command line options or by having a second crate using some of the functionality from this one.

@0x416e746f6e please let me know if this description fits what you were imagining.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions