Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACLResolver ¶
type ACLResolver interface {
ResolveTokenAndDefaultMeta(token string, entMeta *acl.EnterpriseMeta, authzContext *acl.AuthorizerContext) (resolver.Result, error)
}
type CAManager ¶
type CAManager interface {
AuthorizeAndSignCertificate(csr *x509.CertificateRequest, authz acl.Authorizer) (*structs.IssuedCert, error)
}
type Config ¶
type Config struct { Publisher EventPublisher GetStore func() StateStore Logger hclog.Logger ACLResolver ACLResolver CAManager CAManager ForwardRPC func(structs.RPCInfo, func(*grpc.ClientConn) error) (bool, error) ConnectEnabled bool }
type EventPublisher ¶
type EventPublisher interface {
Subscribe(*stream.SubscribeRequest) (*stream.Subscription, error)
}
type MockACLResolver ¶
MockACLResolver is an autogenerated mock type for the ACLResolver type
func NewMockACLResolver ¶
func NewMockACLResolver(t testing.TB) *MockACLResolver
NewMockACLResolver creates a new instance of MockACLResolver. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockACLResolver) ResolveTokenAndDefaultMeta ¶
func (_m *MockACLResolver) ResolveTokenAndDefaultMeta(token string, entMeta *acl.EnterpriseMeta, authzContext *acl.AuthorizerContext) (resolver.Result, error)
ResolveTokenAndDefaultMeta provides a mock function with given fields: token, entMeta, authzContext
type MockCAManager ¶
MockCAManager is an autogenerated mock type for the CAManager type
func NewMockCAManager ¶
func NewMockCAManager(t testing.TB) *MockCAManager
NewMockCAManager creates a new instance of MockCAManager. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockCAManager) AuthorizeAndSignCertificate ¶
func (_m *MockCAManager) AuthorizeAndSignCertificate(csr *x509.CertificateRequest, authz acl.Authorizer) (*structs.IssuedCert, error)
AuthorizeAndSignCertificate provides a mock function with given fields: csr, authz
type Server ¶
type Server struct {
Config
}
func (*Server) Sign ¶
func (s *Server) Sign(ctx context.Context, req *pbconnectca.SignRequest) (*pbconnectca.SignResponse, error)
Sign a leaf certificate for the service or agent identified by the SPIFFE ID in the given CSR's SAN.
func (*Server) WatchRoots ¶
func (s *Server) WatchRoots(_ *pbconnectca.WatchRootsRequest, serverStream pbconnectca.ConnectCAService_WatchRootsServer) error
WatchRoots provides a stream on which you can receive the list of active Connect CA roots. Current roots are sent immediately at the start of the stream, and new lists will be sent whenever the roots are rotated.
type StateStore ¶
type StateStore interface { CAConfig(memdb.WatchSet) (uint64, *structs.CAConfiguration, error) AbandonCh() <-chan struct{} }