Documentation
¶
Index ¶
- func Export(path string, pemData []byte) error
- func ParseCA(pemData []byte) (*x509.Certificate, string, error)
- func RemoveOwned(ctx context.Context, stateDir string) (int, error)
- func UntrackedCandidates(stateDir string) ([]string, error)
- type AnchorRecord
- type Backend
- type RecordedStatus
- type RemovalResult
- type State
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UntrackedCandidates ¶ added in v0.4.24
UntrackedCandidates reports BaseHarbor-named anchors which lack verified ownership evidence. Their names do NOT imply ownership and they are never eligible for automatic deletion.
Types ¶
type AnchorRecord ¶
type AnchorRecord struct {
Fingerprint string `json:"fingerprint"`
IssuerReference string `json:"issuer_reference,omitempty"`
Backend string `json:"backend"`
Path string `json:"path"`
InstalledAt time.Time `json:"installed_at"`
}
func StateRecords ¶
func StateRecords(stateDir string) ([]AnchorRecord, error)
type Backend ¶
type Backend interface {
Name() string
AnchorPath(fingerprint string) (string, error)
Install(context.Context, string, string) error
Remove(context.Context, string) error
}
func DetectSystemBackend ¶
type RecordedStatus ¶ added in v0.4.24
type RecordedStatus struct {
Fingerprint string `json:"fingerprint"`
Backend string `json:"backend"`
State string `json:"state"`
Trusted bool `json:"trusted"`
}
InspectRecorded observes retained host anchors without requiring a live issuer. Ownership records alone never prove that a certificate still exists or matches.
func InspectRecorded ¶ added in v0.4.24
func InspectRecorded(stateDir string) ([]RecordedStatus, error)
type RemovalResult ¶ added in v0.4.24
type RemovalResult struct {
Removed []AnchorRecord `json:"removed,omitempty"`
Preserved []AnchorRecord `json:"preserved,omitempty"`
Untracked []string `json:"preserved_untracked,omitempty"`
}
RemovalResult retains explicit evidence for every owned, preserved or refused CA.
func RemoveOwnedDetailed ¶ added in v0.4.24
func RemoveOwnedDetailed(ctx context.Context, stateDir string) (RemovalResult, error)
type State ¶
type State struct {
Version int `json:"version"`
Anchors []AnchorRecord `json:"anchors,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.