physical.EvidenceMetatypeno test imports ittype EvidenceMeta = { readonly subject: string; readonly type: string; readonly mediaType: string; readonly observedAt: string; readonly producer?: string };What a store is told about bytes it is given.
The evidence store port (0006-grc-evidence): content-addressed storage of what was observed, with the grc.evidence document that describes each object. The registry holds stores by id; the stores are units of their own. Retention is decided by pure functions here, and a store never deletes by itself.
physical.EvidenceMetatypeno test imports ittype EvidenceMeta = { readonly subject: string; readonly type: string; readonly mediaType: string; readonly observedAt: string; readonly producer?: string };What a store is told about bytes it is given.
physical.StoreProblemtypeno test imports ittype StoreProblem = { readonly kind: "missing" | "tampered" | "failed"; readonly digest: string; readonly message: string };Why a store did not do what it was asked.
physical.EvidenceFiltertypeno test imports ittype EvidenceFilter = { readonly subject?: string; readonly type?: string };What list is asked for.
physical.EvidenceStoretypeno test imports ittype EvidenceStore = {
readonly id: string;
/** Keeps the bytes under their SHA-256 and gives the evidence that desc… (590 characters)type EvidenceStore = {
readonly id: string;
/** Keeps the bytes under their SHA-256 and gives the evidence that describes them; the same bytes twice are one object. */
put(bytes: Uint8Array, meta: EvidenceMeta): Promise<Result<Evidence, StoreProblem>>;
/** The bytes of a digest, verified: a missing digest, or bytes that do not match it, is a problem. */
get(digest: string): Promise<Result<Uint8Array, StoreProblem>>;
has(digest: string): Promise<boolean>;
/** The evidence, in the order of their digests. */
list(filter?: EvidenceFilter): Promise<readonly Evidence[]>;
};A store of evidence.
physical.Storestypeno test imports ittype Stores = Registry<EvidenceStore>;A registry of stores.
physical.createStoresfunctionno test imports itfunction createStores(): StoresA registry of stores, empty.
physical.evidenceOffunctionno test imports itfunction evidenceOf(bytes: Uint8Array<ArrayBufferLike>, meta: EvidenceMeta, store: string): Promise<Document & { readonly subject: string; readonly type: string; readonly digest: string; readonly mediaType: string; readonly size: number; readonly observedAt: string; } & { readonly store?: string | undefined; readonly producer?: string | undefined; }>The evidence document of bytes.
physical.verifiedfunctionno test imports itfunction verified(digest: string, bytes: Uint8Array<ArrayBufferLike>): Promise<Result<Uint8Array<ArrayBufferLike>, StoreProblem>>Bytes read back, held to their digest.
physical.retainedfunctionno test imports itfunction retained(e: Document & { readonly subject: string; readonly type: string; readonly digest: string; readonly med… (598 characters)function retained(e: Document & { readonly subject: string; readonly type: string; readonly digest: string; readonly mediaType: string; readonly size: number; readonly observedAt: string; } & { readonly store?: string | undefined; readonly producer?: string | undefined; }, policy: Document & { readonly counts: readonly ObjectOf<{ kinds: Decoder<readonly string[]>; maxAge: Decoder<string>; }, { producers: Decoder<readonly string[]>; }>[]; readonly retention: string; readonly attesters: readonly string[]; readonly custody: "file" | "hardware" | "managed" | "none"; } & {}, now: string): booleanWhether an item is still to be kept at now: its retention (from the evidence policy) has not passed since it was observed.
physical.expiredfunctionno test imports itfunction expired(items: readonly (Document & { readonly subject: string; readonly type: string; readonly digest: string;… (871 characters)function expired(items: readonly (Document & { readonly subject: string; readonly type: string; readonly digest: string; readonly mediaType: string; readonly size: number; readonly observedAt: string; } & { readonly store?: string | undefined; readonly producer?: string | undefined; })[], policy: Document & { readonly counts: readonly ObjectOf<{ kinds: Decoder<readonly string[]>; maxAge: Decoder<string>; }, { producers: Decoder<readonly string[]>; }>[]; readonly retention: string; readonly attesters: readonly string[]; readonly custody: "file" | "hardware" | "managed" | "none"; } & {}, now: string): readonly (Document & { readonly subject: string; readonly type: string; readonly digest: string; readonly mediaType: string; readonly size: number; readonly observedAt: string; } & { readonly store?: string | undefined; readonly producer?: string | undefined; })[]The items whose retention has passed: the caller decides whether to delete them.
EvidenceMetatypeno test imports ittype EvidenceMeta = { readonly subject: string; readonly type: string; readonly mediaType: string; readonly observedAt: string; readonly producer?: string };What a store is told about bytes it is given.
StoreProblemtypeno test imports ittype StoreProblem = { readonly kind: "missing" | "tampered" | "failed"; readonly digest: string; readonly message: string };Why a store did not do what it was asked.
EvidenceFiltertypeno test imports ittype EvidenceFilter = { readonly subject?: string; readonly type?: string };What list is asked for.
EvidenceStoretypetype EvidenceStore = {
readonly id: string;
/** Keeps the bytes under their SHA-256 and gives the evidence that desc… (590 characters)type EvidenceStore = {
readonly id: string;
/** Keeps the bytes under their SHA-256 and gives the evidence that describes them; the same bytes twice are one object. */
put(bytes: Uint8Array, meta: EvidenceMeta): Promise<Result<Evidence, StoreProblem>>;
/** The bytes of a digest, verified: a missing digest, or bytes that do not match it, is a problem. */
get(digest: string): Promise<Result<Uint8Array, StoreProblem>>;
has(digest: string): Promise<boolean>;
/** The evidence, in the order of their digests. */
list(filter?: EvidenceFilter): Promise<readonly Evidence[]>;
};A store of evidence.
Storestypeno test imports ittype Stores = Registry<EvidenceStore>;A registry of stores.
createStoresfunctionfunction createStores(): StoresA registry of stores, empty.
evidenceOffunctionfunction evidenceOf(bytes: Uint8Array<ArrayBufferLike>, meta: EvidenceMeta, store: string): Promise<Document & { readonly subject: string; readonly type: string; readonly digest: string; readonly mediaType: string; readonly size: number; readonly observedAt: string; } & { readonly store?: string | undefined; readonly producer?: string | undefined; }>The evidence document of bytes.
verifiedfunctionno test imports itfunction verified(digest: string, bytes: Uint8Array<ArrayBufferLike>): Promise<Result<Uint8Array<ArrayBufferLike>, StoreProblem>>Bytes read back, held to their digest.
retainedfunctionfunction retained(e: Document & { readonly subject: string; readonly type: string; readonly digest: string; readonly med… (598 characters)function retained(e: Document & { readonly subject: string; readonly type: string; readonly digest: string; readonly mediaType: string; readonly size: number; readonly observedAt: string; } & { readonly store?: string | undefined; readonly producer?: string | undefined; }, policy: Document & { readonly counts: readonly ObjectOf<{ kinds: Decoder<readonly string[]>; maxAge: Decoder<string>; }, { producers: Decoder<readonly string[]>; }>[]; readonly retention: string; readonly attesters: readonly string[]; readonly custody: "file" | "hardware" | "managed" | "none"; } & {}, now: string): booleanWhether an item is still to be kept at now: its retention (from the evidence policy) has not passed since it was observed.
expiredfunctionfunction expired(items: readonly (Document & { readonly subject: string; readonly type: string; readonly digest: string;… (871 characters)function expired(items: readonly (Document & { readonly subject: string; readonly type: string; readonly digest: string; readonly mediaType: string; readonly size: number; readonly observedAt: string; } & { readonly store?: string | undefined; readonly producer?: string | undefined; })[], policy: Document & { readonly counts: readonly ObjectOf<{ kinds: Decoder<readonly string[]>; maxAge: Decoder<string>; }, { producers: Decoder<readonly string[]>; }>[]; readonly retention: string; readonly attesters: readonly string[]; readonly custody: "file" | "hardware" | "managed" | "none"; } & {}, now: string): readonly (Document & { readonly subject: string; readonly type: string; readonly digest: string; readonly mediaType: string; readonly size: number; readonly observedAt: string; } & { readonly store?: string | undefined; readonly producer?: string | undefined; })[]The items whose retention has passed: the caller decides whether to delete them.