handlers

package
v0.0.0-...-25e9f94 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVersion

func GetVersion(w http.ResponseWriter, r *http.Request)

GetVersion handles the version information endpoint

Types

type RegistrationHandler

type RegistrationHandler struct {
	// contains filtered or unexported fields
}

RegistrationHandler handles agent registration and API key distribution

func NewRegistrationHandler

func NewRegistrationHandler(agentService *services.AgentService, config *config.Config, tlsProvider tls.Provider) *RegistrationHandler

NewRegistrationHandler creates a new instance of RegistrationHandler

func (*RegistrationHandler) HandleRegistration

func (h *RegistrationHandler) HandleRegistration(w http.ResponseWriter, r *http.Request)

HandleRegistration handles agent registration requests

type RegistrationRequest

type RegistrationRequest struct {
	ClaimCode string `json:"claim_code"`
	Hostname  string `json:"hostname"`
	Version   string `json:"version,omitempty"` // Agent version (optional for backward compatibility)
}

RegistrationRequest represents the data sent by the agent during registration

type RegistrationResponse

type RegistrationResponse struct {
	AgentID       int               `json:"agent_id"`
	APIKey        string            `json:"api_key"`
	Endpoints     map[string]string `json:"endpoints"`
	Certificate   string            `json:"certificate"`    // PEM-encoded client certificate
	PrivateKey    string            `json:"private_key"`    // PEM-encoded private key
	CACertificate string            `json:"ca_certificate"` // PEM-encoded CA certificate
}

RegistrationResponse represents the data sent back to the agent after successful registration

Directories

Path Synopsis
bhupload
Package bhupload streams a multipart BloodHound-collection upload and ingests it into an in-memory bloodhound.Collector WITHOUT writing anything to disk.
Package bhupload streams a multipart BloodHound-collection upload and ingests it into an in-memory bloodhound.Collector WITHOUT writing anything to disk.
api
v1
api

Jump to

Keyboard shortcuts

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