Consider removing direct ACME support for bundle endpoints #2184
Labels
priority/backlog
Issue is approved and in the backlog
unscoped
The issue needs more design or understanding in order for the work to progress
Endpoints which return bundle information must be protected by TLS to secure the transmission of these security critical pieces of information. When implementing both the SPIRE server federation bundle endpoint and the OIDC discovery provider JWKS endpoint, the decision was made to incorporate ACME support as a way to facilitate easy TLS protected deployment when SPIFFE authentication itself was not desired.
Building in ACME support has led to some less than ideal interactions, particularly in SPIRE server. First, in order to simplify key management we decided to fork the popular golang.org/x/crypto/acme/autocert package to support the key manager plugin. This was not a straightforward fork and keeping up with it has been meddlesome. Further, KeyManager operations can be expensive, tying the TLS handshake for the bundle endpoint to the KeyManager can have unseen costs since can often be an internet-facing endpoint. Additionally, our implementation doesn't even properly manage the keys during key rotation, leading to a period of broken TLS handshakes during ACME renewal (#2167).
While we want to make it easy to do the right thing, building in ACME support was probably a step too far. Many proxies have built in ACME support and would be trivial to stick in front of SPIRE or the OIDC discovery provider to provide TLS protected access.
In order to make it hard to do the wrong thing, we might consider only making the bundle endpoint available over UDS when it isn't being protected with SPIFFE authenticated TLS. This makes it hard for somebody to expose a plain text TCP port, or at least makes it an explicit action by an operator.
The text was updated successfully, but these errors were encountered: