Documentation
¶
Overview ¶
Package dossier defines the self-contained, offline-verifiable Investigation dossier format. Integrity and signature verification do not imply current authorization, freshness, or continuing policy validity.
Index ¶
- Constants
- func CanonicalJSON(value any) ([]byte, error)
- func DigestValue(domain string, value any) (string, error)
- func ValidityStatement() string
- func VisibleUnitSetDigest(values []string) (string, error)
- type AuthorizationScope
- type Entry
- type EvidenceReference
- type Manifest
- type ObjectReference
- type Sealed
- type Signature
- type Validity
- type Verification
- type VerifyOptions
Constants ¶
View Source
const ( FormatVersion = "phebs-investigation-dossier-v1" HashAlgorithm = "sha256" MaxSealedBytes = 64 << 20 )
Variables ¶
This section is empty.
Functions ¶
func CanonicalJSON ¶
func ValidityStatement ¶
func ValidityStatement() string
func VisibleUnitSetDigest ¶
Types ¶
type AuthorizationScope ¶
type AuthorizationScope struct {
Principal string `json:"principal"`
VisibilityProjectionID string `json:"visibility_projection_id"`
VisibleUnitIDs []string `json:"visible_unit_ids"`
VisibleUnitSetDigest string `json:"visible_unit_set_digest"`
RedactionScope string `json:"redaction_scope"`
HandlingClassification string `json:"handling_classification"`
}
type Entry ¶
type Entry struct {
Path string `json:"path"`
MediaType string `json:"media_type"`
Content json.RawMessage `json:"content"`
Digest string `json:"digest"`
}
type EvidenceReference ¶
type EvidenceReference struct {
FactID string `json:"fact_id"`
FindingDigest string `json:"finding_digest"`
FindingEntryPath string `json:"finding_entry_path"`
Mode string `json:"mode"`
MaterialDigest string `json:"material_digest"`
AuthorizedLocator string `json:"authorized_locator,omitempty"`
EntryPath string `json:"entry_path,omitempty"`
}
type Manifest ¶
type Manifest struct {
FormatVersion string `json:"format_version"`
DossierID string `json:"dossier_id"`
Question string `json:"question"`
Investigation ObjectReference `json:"investigation"`
Revision ObjectReference `json:"revision"`
PrimaryArtifact ObjectReference `json:"primary_artifact"`
ConsumerSnapshot ObjectReference `json:"consumer_snapshot"`
ChangeBrief *ObjectReference `json:"change_brief,omitempty"`
Baseline *ObjectReference `json:"baseline,omitempty"`
Decision *ObjectReference `json:"decision,omitempty"`
SnapshotManifests []string `json:"snapshot_manifests"`
InputManifests []string `json:"input_manifests"`
PackCardIdentities []string `json:"pack_card_identities"`
Evidence []EvidenceReference `json:"evidence"`
Authorization AuthorizationScope `json:"authorization"`
Validity Validity `json:"validity"`
IssuedAt string `json:"issued_at"`
PredecessorID string `json:"predecessor_id,omitempty"`
VerificationKeyID string `json:"verification_key_id"`
}
type ObjectReference ¶
type Sealed ¶
type Sealed struct {
FormatVersion string `json:"format_version"`
HashAlgorithm string `json:"hash_algorithm"`
DossierID string `json:"dossier_id"`
Manifest Manifest `json:"manifest"`
ManifestDigest string `json:"manifest_digest"`
Entries []Entry `json:"entries"`
RootDigest string `json:"root_digest"`
Signature Signature `json:"signature"`
}
type Validity ¶
type Validity struct {
EligibilityResult string `json:"eligibility_result"`
SupportedClaims []string `json:"supported_claims"`
Blockers []string `json:"blockers"`
FreshnessState string `json:"freshness_state"`
ValidationState string `json:"validation_state"`
ReviewDueRule string `json:"review_due_rule"`
ExpiresAt string `json:"expires_at,omitempty"`
Statement string `json:"statement"`
}
type Verification ¶
type Verification struct {
DossierID string
RootDigest string
KeyID string
PublicKeySHA256 string
EntryCount int
}
func Verify ¶
func Verify(sealed Sealed, options VerifyOptions) (*Verification, error)
type VerifyOptions ¶
Click to show internal directories.
Click to hide internal directories.