Documentation
¶
Index ¶
- Variables
- type ACMEService
- type AttestRequest
- type AttestResponse
- type CreateChallengeRequest
- type CreateChallengeResponse
- type DeviceService
- func (s *DeviceService) CleanupPending()
- func (s *DeviceService) CompleteEnrollment(ctx context.Context, req AttestRequest, verifier tpm.Verifier, ...) (*AttestResponse, error)
- func (s *DeviceService) SetCustomHostname(ctx context.Context, deviceID uuid.UUID, hostname string) error
- func (s *DeviceService) StartEnrollment(ctx context.Context, req EnrollRequest, verifier tpm.Verifier) (*EnrollResponse, error)
- type EnrollRequest
- type EnrollResponse
- type ErrValidation
- type IssueTokenRequest
- type NexusService
- type PendingEnrollment
- type RegisterNexusRequest
- type RegisterNexusResponse
- type TokenService
- type VerifyResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEnrollmentCapacity = errors.New("enrollment capacity reached") ErrPendingNotFound = errors.New("pending enrollment not found or expired") ErrSecretMismatch = errors.New("credential secret mismatch") ErrDeviceAlreadyExists = errors.New("device with this EK already exists") ErrQuoteVerification = errors.New("quote verification failed") )
Functions ¶
This section is empty.
Types ¶
type ACMEService ¶
type ACMEService struct {
// contains filtered or unexported fields
}
func NewACMEService ¶
func NewACMEService(acmeStore *store.ACMEStore, deviceStore *store.DeviceStore, pdns *dns.PowerDNSClient, cfg *config.Config, logger *slog.Logger) *ACMEService
func (*ACMEService) CleanupLoop ¶
func (s *ACMEService) CleanupLoop(ctx context.Context)
CleanupLoop removes expired ACME challenges.
func (*ACMEService) CreateChallenge ¶
func (s *ACMEService) CreateChallenge(ctx context.Context, req CreateChallengeRequest) (*CreateChallengeResponse, error)
func (*ACMEService) DeleteChallenge ¶
type AttestRequest ¶
type AttestResponse ¶
type CreateChallengeRequest ¶
type CreateChallengeResponse ¶
type DeviceService ¶
type DeviceService struct {
// contains filtered or unexported fields
}
func NewDeviceService ¶
func NewDeviceService(deviceStore *store.DeviceStore, auditStore *store.AuditStore, cfg *config.Config, logger *slog.Logger) *DeviceService
func (*DeviceService) CleanupPending ¶
func (s *DeviceService) CleanupPending()
CleanupPending removes expired pending enrollments.
func (*DeviceService) CompleteEnrollment ¶
func (s *DeviceService) CompleteEnrollment(ctx context.Context, req AttestRequest, verifier tpm.Verifier, nexusEndpoints []string) (*AttestResponse, error)
func (*DeviceService) SetCustomHostname ¶
func (*DeviceService) StartEnrollment ¶
func (s *DeviceService) StartEnrollment(ctx context.Context, req EnrollRequest, verifier tpm.Verifier) (*EnrollResponse, error)
type EnrollResponse ¶
type ErrValidation ¶
type ErrValidation struct {
Message string
}
ErrValidation is a typed error for validation failures safe to return to clients.
func (*ErrValidation) Error ¶
func (e *ErrValidation) Error() string
type IssueTokenRequest ¶
type NexusService ¶
type NexusService struct {
// contains filtered or unexported fields
}
func NewNexusService ¶
func NewNexusService(nexusStore *store.NexusStore, auditStore *store.AuditStore, pdns *dns.PowerDNSClient, cfg *config.Config, logger *slog.Logger) *NexusService
func (*NexusService) GetActiveEndpoints ¶
func (s *NexusService) GetActiveEndpoints(ctx context.Context) ([]string, error)
GetActiveEndpoints returns WebSocket URLs for all active Nexus instances.
func (*NexusService) HealthCheckLoop ¶
func (s *NexusService) HealthCheckLoop(ctx context.Context)
HealthCheckLoop periodically checks for inactive Nexus instances.
func (*NexusService) Register ¶
func (s *NexusService) Register(ctx context.Context, req RegisterNexusRequest) (*RegisterNexusResponse, error)
type PendingEnrollment ¶
type RegisterNexusRequest ¶
type RegisterNexusResponse ¶
type RegisterNexusResponse struct {
HeartbeatInterval int `json:"heartbeat_interval"`
}
type TokenService ¶
type TokenService struct {
// contains filtered or unexported fields
}
func NewTokenService ¶
func NewTokenService(deviceStore *store.DeviceStore, issuer *token.Issuer, cfg *config.Config, logger *slog.Logger) *TokenService
func (*TokenService) IssueNexusToken ¶
func (s *TokenService) IssueNexusToken(ctx context.Context, req IssueTokenRequest) (string, error)
func (*TokenService) VerifyToken ¶
func (s *TokenService) VerifyToken(tokenString string) *VerifyResult
type VerifyResult ¶
type VerifyResult struct {
Valid bool `json:"valid"`
Claims *token.NexusClaims `json:"claims"`
Error string `json:"error"`
}
Click to show internal directories.
Click to hide internal directories.