Documentation ¶
Index ¶
- Constants
- func NoCache(clt auth.ClientI, cacheName []string) (auth.AccessPoint, error)
- type CachingAuditLog
- func (ll *CachingAuditLog) Close() error
- func (ll *CachingAuditLog) EmitAuditEvent(eventType string, fields events.EventFields) error
- func (ll *CachingAuditLog) GetSessionChunk(string, session.ID, int, int) ([]byte, error)
- func (ll *CachingAuditLog) GetSessionEvents(string, session.ID, int) ([]events.EventFields, error)
- func (ll *CachingAuditLog) PostSessionChunk(namespace string, sid session.ID, reader io.Reader) error
- func (ll *CachingAuditLog) SearchEvents(time.Time, time.Time, string) ([]events.EventFields, error)
- type CachingAuthClient
- func (cs *CachingAuthClient) GetCertAuthorities(ct services.CertAuthType, loadKeys bool) (cas []services.CertAuthority, err error)
- func (cs *CachingAuthClient) GetDomainName() (clusterName string, err error)
- func (cs *CachingAuthClient) GetNamespace(name string) (namespace *services.Namespace, err error)
- func (cs *CachingAuthClient) GetNamespaces() (namespaces []services.Namespace, err error)
- func (cs *CachingAuthClient) GetNodes(namespace string) (nodes []services.Server, err error)
- func (cs *CachingAuthClient) GetProxies() (proxies []services.Server, err error)
- func (cs *CachingAuthClient) GetReverseTunnels() (tunnels []services.ReverseTunnel, err error)
- func (cs *CachingAuthClient) GetRole(name string) (role services.Role, err error)
- func (cs *CachingAuthClient) GetRoles() (roles []services.Role, err error)
- func (cs *CachingAuthClient) GetUsers() (users []services.User, err error)
- func (cs *CachingAuthClient) UpsertNode(s services.Server) error
- func (cs *CachingAuthClient) UpsertProxy(s services.Server) error
- type Config
- type NewCachingAccessPoint
Constants ¶
const ( // MaxQueueSize determines how many logging events to queue in-memory // before start dropping them (probably because logging server is down) MaxQueueSize = 10 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CachingAuditLog ¶
type CachingAuditLog struct {
// contains filtered or unexported fields
}
CachingAuditLog implements events.IAuditLog on the recording machine (SSH server) It captures the local recording and forwards it to the AuditLog network server
func MakeCachingAuditLog ¶
func MakeCachingAuditLog(logServer events.IAuditLog) *CachingAuditLog
MakeCachingAuditLog creaets a new & fully initialized instance of the alog
func (*CachingAuditLog) Close ¶
func (ll *CachingAuditLog) Close() error
func (*CachingAuditLog) EmitAuditEvent ¶
func (ll *CachingAuditLog) EmitAuditEvent(eventType string, fields events.EventFields) error
func (*CachingAuditLog) GetSessionChunk ¶
func (*CachingAuditLog) GetSessionEvents ¶
func (ll *CachingAuditLog) GetSessionEvents(string, session.ID, int) ([]events.EventFields, error)
func (*CachingAuditLog) PostSessionChunk ¶
func (*CachingAuditLog) SearchEvents ¶
func (ll *CachingAuditLog) SearchEvents(time.Time, time.Time, string) ([]events.EventFields, error)
type CachingAuthClient ¶
type CachingAuthClient struct { Config // contains filtered or unexported fields }
CachingAuthClient implements auth.AccessPoint interface and remembers the previously returned upstream value for each API call.
This which can be used if the upstream AccessPoint goes offline
func NewCachingAuthClient ¶
func NewCachingAuthClient(config Config) (*CachingAuthClient, error)
NewCachingAuthClient creates a new instance of CachingAuthClient using a live connection to the auth server (ap)
func (*CachingAuthClient) GetCertAuthorities ¶
func (cs *CachingAuthClient) GetCertAuthorities(ct services.CertAuthType, loadKeys bool) (cas []services.CertAuthority, err error)
GetCertAuthorities is a part of auth.AccessPoint implementation
func (*CachingAuthClient) GetDomainName ¶
func (cs *CachingAuthClient) GetDomainName() (clusterName string, err error)
GetDomainName is a part of auth.AccessPoint implementation
func (*CachingAuthClient) GetNamespace ¶
func (cs *CachingAuthClient) GetNamespace(name string) (namespace *services.Namespace, err error)
GetNamespace returns namespace
func (*CachingAuthClient) GetNamespaces ¶
func (cs *CachingAuthClient) GetNamespaces() (namespaces []services.Namespace, err error)
GetNamespaces is a part of auth.AccessPoint implementation
func (*CachingAuthClient) GetNodes ¶
func (cs *CachingAuthClient) GetNodes(namespace string) (nodes []services.Server, err error)
GetNodes is a part of auth.AccessPoint implementation
func (*CachingAuthClient) GetProxies ¶
func (cs *CachingAuthClient) GetProxies() (proxies []services.Server, err error)
GetProxies is a part of auth.AccessPoint implementation
func (*CachingAuthClient) GetReverseTunnels ¶
func (cs *CachingAuthClient) GetReverseTunnels() (tunnels []services.ReverseTunnel, err error)
func (*CachingAuthClient) GetRole ¶
func (cs *CachingAuthClient) GetRole(name string) (role services.Role, err error)
GetRole is a part of auth.AccessPoint implementation
func (*CachingAuthClient) GetRoles ¶
func (cs *CachingAuthClient) GetRoles() (roles []services.Role, err error)
GetRoles is a part of auth.AccessPoint implementation
func (*CachingAuthClient) GetUsers ¶
func (cs *CachingAuthClient) GetUsers() (users []services.User, err error)
GetUsers is a part of auth.AccessPoint implementation
func (*CachingAuthClient) UpsertNode ¶
func (cs *CachingAuthClient) UpsertNode(s services.Server) error
UpsertNode is part of auth.AccessPoint implementation
func (*CachingAuthClient) UpsertProxy ¶
func (cs *CachingAuthClient) UpsertProxy(s services.Server) error
UpsertProxy is part of auth.AccessPoint implementation
type Config ¶
type Config struct { // CacheTTL sets maximum TTL the cache keeps the value CacheTTL time.Duration // NeverExpires if set, never expires cache values NeverExpires bool // AccessPoint is access point for this AccessPoint auth.AccessPoint // Backend is cache backend Backend backend.Backend // Clock can be set to control time Clock clockwork.Clock // SkipPreload turns off preloading on start SkipPreload bool }
Config is CachingAuthClient config
func (*Config) CheckAndSetDefaults ¶
CheckAndSetDefaults checks parameters and sets default values
type NewCachingAccessPoint ¶
NewCachingAcessPoint returns new caching access point using access point policy