Documentation
¶
Overview ¶
Package server runs the local SSLKnife web interface and REST API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsLoopback ¶
IsLoopback reports whether a listen address only accepts local connections.
Types ¶
type CertificateDetail ¶
type CertificateDetail struct {
Summary views.CertSummary `json:"summary"`
Details certificate.Info `json:"details"`
Chain []views.CertSummary `json:"chain"`
Issued []views.CertSummary `json:"issued"`
Notes []note `json:"notes"`
CT []views.CTObservation `json:"ct"`
History []scanEntry `json:"history"`
Findings []certificate.Finding `json:"findings"`
}
CertificateDetail is the /certificates/{id} response.
type Dashboard ¶
type Dashboard struct {
Counts inventory.Counts `json:"counts"`
CT ctCounts `json:"ct"`
Expiring []views.CertSummary `json:"expiring"`
RecentCerts []views.CertSummary `json:"recent_certificates"`
RecentScans []scanEntry `json:"recent_scans"`
CTDiscoveries []views.CTObservation `json:"ct_discoveries"`
WeakFindings []endpointFinding `json:"weak_findings"`
}
Dashboard is the /dashboard response.
type Options ¶
type Options struct {
Listen string
PlainHTTP bool // serve HTTP instead of HTTPS (loopback only unless AllowInsecure)
CertFile string // optional TLS certificate/key files
KeyFile string
Token string // access token; random when empty
AllowedHosts []string
Config *config.Config
Logger *slog.Logger
Dialer netdial.Dialer
CTProvider string
CTToken string
CTBaseURL string // alternative CT endpoint (self-hosted or test)
Version string
Jobs bool
Static fs.FS // web UI assets
// Sync, when set, syncs the inventory with the remote every SyncInterval.
Sync func(context.Context) error
SyncInterval time.Duration
}
Options configure the server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a running web interface bound to an unlocked vault.
func New ¶
New prepares a server. It binds the listener so that port errors are reported before the URL is printed.
func (*Server) Fingerprint ¶
Fingerprint is the SHA-256 of the server certificate (empty for HTTP).
Click to show internal directories.
Click to hide internal directories.