Documentation ¶
Index ¶
- func NewAgentsDB(dbPlugin *ast.ObjectItem) (agentdb.AgentDB, error)
- func NewAuth(authPlugin *ast.ObjectItem) (auth.Auth, error)
- type BanAgentRequest
- type BatchCreateEntryRequest
- type BatchCreateEntryResponse
- type BatchDeleteEntryRequest
- type BatchDeleteEntryResponse
- type CreateJoinTokenRequest
- type CreateJoinTokenResponse
- type DebugServerRequest
- type DebugServerResponse
- type DeleteAgentRequest
- type DeleteClusterRequest
- type EditClusterRequest
- type GetTornjakServerInfoRequest
- type GetTornjakServerInfoResponse
- type HTTPConfig
- type HTTPSConfig
- type HealthcheckRequest
- type HealthcheckResponse
- type ListAgentMetadataRequest
- type ListAgentMetadataResponse
- type ListAgentsRequest
- type ListAgentsResponse
- type ListClustersRequest
- type ListClustersResponse
- type ListEntriesRequest
- type ListEntriesResponse
- type ListSelectorsRequest
- type ListSelectorsResponse
- type RegisterClusterRequest
- type RegisterSelectorRequest
- type Server
- func (s *Server) BanAgent(inp BanAgentRequest) error
- func (s *Server) BatchCreateEntry(inp BatchCreateEntryRequest) (*BatchCreateEntryResponse, error)
- func (s *Server) BatchDeleteEntry(inp BatchDeleteEntryRequest) (*BatchDeleteEntryResponse, error)
- func (s *Server) Configure() error
- func (s *Server) ConfigureDefaults() error
- func (s *Server) CreateJoinToken(inp CreateJoinTokenRequest) (*CreateJoinTokenResponse, error)
- func (s *Server) DebugServer(inp DebugServerRequest) (*DebugServerResponse, error)
- func (s *Server) DefineCluster(inp RegisterClusterRequest) error
- func (s *Server) DefineSelectors(inp RegisterSelectorRequest) error
- func (s *Server) DeleteAgent(inp DeleteAgentRequest) error
- func (s *Server) DeleteCluster(inp DeleteClusterRequest) error
- func (s *Server) EditCluster(inp EditClusterRequest) error
- func (s *Server) GetRouter() http.Handler
- func (s *Server) GetTornjakServerInfo(inp GetTornjakServerInfoRequest) (*GetTornjakServerInfoResponse, error)
- func (s *Server) HandleRequests()
- func (s *Server) ListAgentMetadata(inp ListAgentMetadataRequest) (*ListAgentMetadataResponse, error)
- func (s *Server) ListAgents(inp ListAgentsRequest) (*ListAgentsResponse, error)
- func (s *Server) ListClusters(inp ListClustersRequest) (*ListClustersResponse, error)
- func (s *Server) ListEntries(inp ListEntriesRequest) (*ListEntriesResponse, error)
- func (s *Server) ListSelectors(inp ListSelectorsRequest) (*ListSelectorsResponse, error)
- func (s *Server) SPIREHealthcheck(inp HealthcheckRequest) (*HealthcheckResponse, error)
- func (s *Server) VerifyConfiguration() error
- type TornjakConfig
- type TornjakSpireServerInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAgentsDB ¶
func NewAgentsDB(dbPlugin *ast.ObjectItem) (agentdb.AgentDB, error)
NewAgentsDB returns a new agents DB, given a DB connection string
Types ¶
type BanAgentRequest ¶
type BanAgentRequest agent.BanAgentRequest
type BatchCreateEntryRequest ¶
type BatchCreateEntryRequest entry.BatchCreateEntryRequest
type BatchCreateEntryResponse ¶
type BatchCreateEntryResponse entry.BatchCreateEntryResponse
type BatchDeleteEntryRequest ¶
type BatchDeleteEntryRequest entry.BatchDeleteEntryRequest
type BatchDeleteEntryResponse ¶
type BatchDeleteEntryResponse entry.BatchDeleteEntryResponse
type CreateJoinTokenRequest ¶
type CreateJoinTokenRequest agent.CreateJoinTokenRequest
type CreateJoinTokenResponse ¶
type DebugServerRequest ¶
type DebugServerRequest debugServer.GetInfoRequest
type DebugServerResponse ¶
type DebugServerResponse debugServer.GetInfoResponse
type DeleteAgentRequest ¶
type DeleteAgentRequest agent.DeleteAgentRequest
type DeleteClusterRequest ¶
type DeleteClusterRequest tornjakTypes.ClusterInput
type EditClusterRequest ¶
type EditClusterRequest tornjakTypes.ClusterInput
type GetTornjakServerInfoRequest ¶
type GetTornjakServerInfoRequest struct{}
type GetTornjakServerInfoResponse ¶
type GetTornjakServerInfoResponse TornjakSpireServerInfo
type HTTPConfig ¶
type HTTPConfig struct {
ListenPort int `hcl:"port"`
}
type HTTPSConfig ¶
type HealthcheckRequest ¶
type HealthcheckRequest grpc_health_v1.HealthCheckRequest
type HealthcheckResponse ¶
type HealthcheckResponse grpc_health_v1.HealthCheckResponse
type ListAgentMetadataRequest ¶
type ListAgentMetadataRequest tornjakTypes.AgentMetadataRequest
type ListAgentMetadataResponse ¶
type ListAgentMetadataResponse tornjakTypes.AgentInfoList
type ListAgentsRequest ¶
type ListAgentsRequest agent.ListAgentsRequest
type ListAgentsResponse ¶
type ListAgentsResponse agent.ListAgentsResponse
type ListClustersRequest ¶
type ListClustersRequest struct{}
type ListClustersResponse ¶
type ListClustersResponse tornjakTypes.ClusterInfoList
type ListEntriesRequest ¶
type ListEntriesRequest entry.ListEntriesRequest
type ListEntriesResponse ¶
type ListEntriesResponse entry.ListEntriesResponse
type ListSelectorsRequest ¶
type ListSelectorsRequest struct{}
type ListSelectorsResponse ¶
type ListSelectorsResponse tornjakTypes.AgentInfoList
type RegisterClusterRequest ¶
type RegisterClusterRequest tornjakTypes.ClusterInput
type RegisterSelectorRequest ¶
type RegisterSelectorRequest tornjakTypes.AgentInfo
type Server ¶
type Server struct { // SPIRE socket location SpireServerAddr string // SpireServerInfo provides config info for the spire server SpireServerInfo TornjakSpireServerInfo // Information from Tornjak Config file passed in as argument TornjakConfig *TornjakConfig // Plugins Db agentdb.AgentDB Auth auth.Auth }
func (*Server) BanAgent ¶
func (s *Server) BanAgent(inp BanAgentRequest) error
func (*Server) BatchCreateEntry ¶
func (s *Server) BatchCreateEntry(inp BatchCreateEntryRequest) (*BatchCreateEntryResponse, error)
func (*Server) BatchDeleteEntry ¶
func (s *Server) BatchDeleteEntry(inp BatchDeleteEntryRequest) (*BatchDeleteEntryResponse, error)
func (*Server) ConfigureDefaults ¶
func (*Server) CreateJoinToken ¶
func (s *Server) CreateJoinToken(inp CreateJoinTokenRequest) (*CreateJoinTokenResponse, error)
func (*Server) DebugServer ¶
func (s *Server) DebugServer(inp DebugServerRequest) (*DebugServerResponse, error)
func (*Server) DefineCluster ¶
func (s *Server) DefineCluster(inp RegisterClusterRequest) error
DefineCluster registers cluster to local DB
func (*Server) DefineSelectors ¶
func (s *Server) DefineSelectors(inp RegisterSelectorRequest) error
DefineSelectors registers an agent to the local DB with the following info spiffeid string plugin string
func (*Server) DeleteAgent ¶
func (s *Server) DeleteAgent(inp DeleteAgentRequest) error
func (*Server) DeleteCluster ¶
func (s *Server) DeleteCluster(inp DeleteClusterRequest) error
DeleteCluster deletes cluster with name cinfo.Name and assignment to agents
func (*Server) EditCluster ¶
func (s *Server) EditCluster(inp EditClusterRequest) error
EditCluster registers cluster to local DB
func (*Server) GetTornjakServerInfo ¶
func (s *Server) GetTornjakServerInfo(inp GetTornjakServerInfoRequest) (*GetTornjakServerInfoResponse, error)
func (*Server) HandleRequests ¶
func (s *Server) HandleRequests()
HandleRequests connects api links with respective functions Functions currently handle the api calls all as post-requests
func (*Server) ListAgentMetadata ¶
func (s *Server) ListAgentMetadata(inp ListAgentMetadataRequest) (*ListAgentMetadataResponse, error)
ListAgentMetadata takes in list of agent spiffeids and returns list of those agents from the local DB with following info spiffeid string plugin string cluster string if no metadata found, no row is included if no spiffeids are specified, all agent metadata is returned
func (*Server) ListAgents ¶
func (s *Server) ListAgents(inp ListAgentsRequest) (*ListAgentsResponse, error)
func (*Server) ListClusters ¶
func (s *Server) ListClusters(inp ListClustersRequest) (*ListClustersResponse, error)
ListClusters returns list of clusters from the local DB with the following info name string details json
func (*Server) ListEntries ¶
func (s *Server) ListEntries(inp ListEntriesRequest) (*ListEntriesResponse, error)
func (*Server) ListSelectors ¶
func (s *Server) ListSelectors(inp ListSelectorsRequest) (*ListSelectorsResponse, error)
ListSelectors returns list of agents from the local DB with the following info spiffeid string plugin string
func (*Server) SPIREHealthcheck ¶
func (s *Server) SPIREHealthcheck(inp HealthcheckRequest) (*HealthcheckResponse, error)
func (*Server) VerifyConfiguration ¶
type TornjakConfig ¶
type TornjakSpireServerInfo ¶
type TornjakSpireServerInfo struct { // Plugins is a map from plugin types to respective names of plugins configured Plugins map[string][]string `json:"plugins"` // TrustDomain specifies the trust domain of the SPIRE server configured with tornjak TrustDomain string `json:"trustDomain"` // Verbose config contains unstructure information on the config on the agent VerboseConfig string `json:"verboseConfig"` }
TornjakServerInfo provides insight into the configuration of the SPIRE server where the Tornjak Agent resides