connectca

package
v1.16.109 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2023 License: MPL-2.0 Imports: 20 Imported by: 0

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

type MockACLResolver struct {
	mock.Mock
}

MockACLResolver is an autogenerated mock type for the ACLResolver type

func NewMockACLResolver

func NewMockACLResolver(t mockConstructorTestingTNewMockACLResolver) *MockACLResolver

NewMockACLResolver creates a new instance of MockACLResolver. It also registers a testing 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

type MockCAManager struct {
	mock.Mock
}

MockCAManager is an autogenerated mock type for the CAManager type

func NewMockCAManager

func NewMockCAManager(t mockConstructorTestingTNewMockCAManager) *MockCAManager

NewMockCAManager creates a new instance of MockCAManager. It also registers a testing 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 NewServer

func NewServer(cfg Config) *Server

func (*Server) Register

func (s *Server) Register(grpcServer *grpc.Server)

func (*Server) Sign

Sign a leaf certificate for the service or agent identified by the SPIFFE ID in the given CSR's SAN.

func (*Server) WatchRoots

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{}
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL