Documentation ¶
Index ¶
- func NewAgentsDB(dbPlugin *ast.ObjectItem) (agentdb.AgentDB, error)
- func NewAuthenticator(authenticatorPlugin *ast.ObjectItem) (authenticator.Authenticator, error)
- func NewAuthorizer(authorizerPlugin *ast.ObjectItem) (authorization.Authorizer, error)
- type APIRoleMapping
- type APIv1RoleMapping
- type AuthRole
- type BanAgentRequest
- type BatchCreateEntryRequest
- type BatchCreateEntryResponse
- type BatchDeleteEntryRequest
- type BatchDeleteEntryResponse
- type CreateFederatedBundleRequest
- type CreateFederatedBundleResponse
- type CreateFederationRelationshipRequest
- type CreateFederationRelationshipResponse
- type CreateJoinTokenRequest
- type CreateJoinTokenResponse
- type DebugServerRequest
- type DebugServerResponse
- type DeleteAgentRequest
- type DeleteClusterRequest
- type DeleteFederatedBundleRequest
- type DeleteFederatedBundleResponse
- type DeleteFederationRelationshipRequest
- type DeleteFederationRelationshipResponse
- type EditClusterRequest
- type GetBundleRequest
- type GetBundleResponse
- 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 ListFederatedBundlesRequest
- type ListFederatedBundlesResponse
- type ListFederationRelationshipsRequest
- type ListFederationRelationshipsResponse
- type ListSelectorsRequest
- type ListSelectorsResponse
- type RegisterClusterRequest
- type RegisterSelectorRequest
- type SPIREConfig
- 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) CreateFederatedBundle(inp CreateFederatedBundleRequest) (*CreateFederatedBundleResponse, error)
- func (s *Server) CreateFederationRelationship(inp CreateFederationRelationshipRequest) (*CreateFederationRelationshipResponse, 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) DeleteFederatedBundle(inp DeleteFederatedBundleRequest) (*DeleteFederatedBundleResponse, error)
- func (s *Server) DeleteFederationRelationship(inp DeleteFederationRelationshipRequest) (*DeleteFederationRelationshipResponse, error)
- func (s *Server) EditCluster(inp EditClusterRequest) error
- func (s *Server) GetBundle(inp GetBundleRequest) (*GetBundleResponse, 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) ListFederatedBundles(inp ListFederatedBundlesRequest) (*ListFederatedBundlesResponse, error)
- func (s *Server) ListFederationRelationships(inp ListFederationRelationshipsRequest) (*ListFederationRelationshipsResponse, error)
- func (s *Server) ListSelectors(inp ListSelectorsRequest) (*ListSelectorsResponse, error)
- func (s *Server) SPIREHealthcheck(inp HealthcheckRequest) (*HealthcheckResponse, error)
- func (s *Server) UpdateFederatedBundle(inp UpdateFederatedBundleRequest) (*UpdateFederatedBundleResponse, error)
- func (s *Server) UpdateFederationRelationship(inp UpdateFederationRelationshipRequest) (*UpdateFederationRelationshipResponse, error)
- func (s *Server) VerifyConfiguration() error
- type SpireServerConfig
- type TornjakConfig
- type TornjakSpireServerInfo
- type UpdateFederatedBundleRequest
- type UpdateFederatedBundleResponse
- type UpdateFederationRelationshipRequest
- type UpdateFederationRelationshipResponse
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
func NewAuthenticator ¶ added in v1.7.0
func NewAuthenticator(authenticatorPlugin *ast.ObjectItem) (authenticator.Authenticator, error)
NewAuthenticator returns a new Authenticator
func NewAuthorizer ¶ added in v1.7.0
func NewAuthorizer(authorizerPlugin *ast.ObjectItem) (authorization.Authorizer, error)
NewAuthorizer returns a new Authorizer
Types ¶
type APIRoleMapping ¶ added in v1.7.0
type APIv1RoleMapping ¶ added in v1.8.0
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 CreateFederatedBundleRequest ¶ added in v1.8.0
type CreateFederatedBundleRequest bundle.BatchCreateFederatedBundleRequest
type CreateFederatedBundleResponse ¶ added in v1.8.0
type CreateFederatedBundleResponse bundle.BatchCreateFederatedBundleResponse
type CreateFederationRelationshipRequest ¶ added in v1.8.0
type CreateFederationRelationshipRequest trustdomain.BatchCreateFederationRelationshipRequest
type CreateFederationRelationshipResponse ¶ added in v1.8.0
type CreateFederationRelationshipResponse trustdomain.BatchCreateFederationRelationshipResponse
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 DeleteFederatedBundleRequest ¶ added in v1.8.0
type DeleteFederatedBundleRequest bundle.BatchDeleteFederatedBundleRequest
type DeleteFederatedBundleResponse ¶ added in v1.8.0
type DeleteFederatedBundleResponse bundle.BatchDeleteFederatedBundleResponse
type DeleteFederationRelationshipRequest ¶ added in v1.8.0
type DeleteFederationRelationshipRequest trustdomain.BatchDeleteFederationRelationshipRequest
type DeleteFederationRelationshipResponse ¶ added in v1.8.0
type DeleteFederationRelationshipResponse trustdomain.BatchDeleteFederationRelationshipResponse
type EditClusterRequest ¶
type EditClusterRequest tornjakTypes.ClusterInput
type GetBundleResponse ¶ added in v1.8.0
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 ListFederatedBundlesRequest ¶ added in v1.8.0
type ListFederatedBundlesRequest bundle.ListFederatedBundlesRequest
type ListFederatedBundlesResponse ¶ added in v1.8.0
type ListFederatedBundlesResponse bundle.ListFederatedBundlesResponse
type ListFederationRelationshipsRequest ¶ added in v1.8.0
type ListFederationRelationshipsRequest trustdomain.ListFederationRelationshipsRequest
Federation APIs
type ListFederationRelationshipsResponse ¶ added in v1.8.0
type ListFederationRelationshipsResponse trustdomain.ListFederationRelationshipsResponse
type ListSelectorsRequest ¶
type ListSelectorsRequest struct{}
type ListSelectorsResponse ¶
type ListSelectorsResponse tornjakTypes.AgentInfoList
type RegisterClusterRequest ¶
type RegisterClusterRequest tornjakTypes.ClusterInput
type RegisterSelectorRequest ¶
type RegisterSelectorRequest tornjakTypes.AgentInfo
type SPIREConfig ¶ added in v1.5.0
type SPIREConfig struct { Server *SpireServerConfig `hcl:"server"` Plugins ast.Node `hcl:"plugins"` }
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 Authenticator authenticator.Authenticator Authorizer authorization.Authorizer }
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) CreateFederatedBundle ¶ added in v1.8.0
func (s *Server) CreateFederatedBundle(inp CreateFederatedBundleRequest) (*CreateFederatedBundleResponse, error)
func (*Server) CreateFederationRelationship ¶ added in v1.8.0
func (s *Server) CreateFederationRelationship(inp CreateFederationRelationshipRequest) (*CreateFederationRelationshipResponse, error)
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) DeleteFederatedBundle ¶ added in v1.8.0
func (s *Server) DeleteFederatedBundle(inp DeleteFederatedBundleRequest) (*DeleteFederatedBundleResponse, error)
func (*Server) DeleteFederationRelationship ¶ added in v1.8.0
func (s *Server) DeleteFederationRelationship(inp DeleteFederationRelationshipRequest) (*DeleteFederationRelationshipResponse, error)
func (*Server) EditCluster ¶
func (s *Server) EditCluster(inp EditClusterRequest) error
EditCluster registers cluster to local DB
func (*Server) GetBundle ¶ added in v1.8.0
func (s *Server) GetBundle(inp GetBundleRequest) (*GetBundleResponse, error)
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) ListFederatedBundles ¶ added in v1.8.0
func (s *Server) ListFederatedBundles(inp ListFederatedBundlesRequest) (*ListFederatedBundlesResponse, error)
func (*Server) ListFederationRelationships ¶ added in v1.8.0
func (s *Server) ListFederationRelationships(inp ListFederationRelationshipsRequest) (*ListFederationRelationshipsResponse, 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) UpdateFederatedBundle ¶ added in v1.8.0
func (s *Server) UpdateFederatedBundle(inp UpdateFederatedBundleRequest) (*UpdateFederatedBundleResponse, error)
func (*Server) UpdateFederationRelationship ¶ added in v1.8.0
func (s *Server) UpdateFederationRelationship(inp UpdateFederationRelationshipRequest) (*UpdateFederationRelationshipResponse, error)
func (*Server) VerifyConfiguration ¶
type SpireServerConfig ¶ added in v1.5.0
type SpireServerConfig struct {
TrustDomain string `hcl:"trust_domain"`
}
pared down version of full Server Config type spire/cmd/spire-server/cli/run we curently need only extract the trust domain
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
type UpdateFederatedBundleRequest ¶ added in v1.8.0
type UpdateFederatedBundleRequest bundle.BatchUpdateFederatedBundleRequest
type UpdateFederatedBundleResponse ¶ added in v1.8.0
type UpdateFederatedBundleResponse bundle.BatchUpdateFederatedBundleResponse
type UpdateFederationRelationshipRequest ¶ added in v1.8.0
type UpdateFederationRelationshipRequest trustdomain.BatchUpdateFederationRelationshipRequest
type UpdateFederationRelationshipResponse ¶ added in v1.8.0
type UpdateFederationRelationshipResponse trustdomain.BatchUpdateFederationRelationshipResponse