Implement tlsconfig package
azdagron opened this issue · 1 comments
azdagron commented
The tlsconfig
package contains various methods of creating/updating TLS configuration with the ability to perform SPIFFE authentication over TLS.
There are 3 primitive helper functions:
- GetCertificate: takes an
x509svid.Source
and implements theGetCertificate
callback for servertls.Config
- GetClientCertificate: takes an
x509svid.Source
and implements theGetClientCertificate
callback for clienttls.Config
- VerifyPeerCertificate takes an
x509bundle.Source
and an authorizer and implements theVerifyPeerCertificate
callback for both client and servertls.Config
.
Along with the primitive helpers, there are a slew of functions that set up a variety of TLS configurations using the above helpers. Most of the implementation can be borrowed from the existing v1 TLS peer implementation.
The v2-api
branch has scaffolding for the implementations in config.go
.