2018-04-09 04:56:11 +00:00
|
|
|
package connect
|
|
|
|
|
|
|
|
import (
|
|
|
|
"crypto/x509"
|
|
|
|
|
|
|
|
"github.com/hashicorp/consul/agent/structs"
|
|
|
|
)
|
|
|
|
|
|
|
|
// CAProvider is the interface for Consul to interact with
|
|
|
|
// an external CA that provides leaf certificate signing for
|
|
|
|
// given SpiffeIDServices.
|
|
|
|
type CAProvider interface {
|
|
|
|
ActiveRoot() (*structs.CARoot, error)
|
|
|
|
ActiveIntermediate() (*structs.CARoot, error)
|
2018-04-20 08:30:34 +00:00
|
|
|
GenerateIntermediate() (*structs.CARoot, error)
|
2018-04-09 04:56:11 +00:00
|
|
|
Sign(*SpiffeIDService, *x509.CertificateRequest) (*structs.IssuedCert, error)
|
2018-04-21 01:46:02 +00:00
|
|
|
//SignCA(*x509.CertificateRequest) (*structs.IssuedCert, error)
|
|
|
|
Teardown() error
|
2018-04-09 04:56:11 +00:00
|
|
|
}
|