Documentation
¶
Overview ¶
Package audit carries the files this repository publishes as data: the framework presets, the meta-schemas that govern catalogues and presets, and the common catalogue of the component's own events.
They are embedded so that a deployment gets them from the binary it already runs, rather than from files it has to ship and keep in step.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Catalogue embed.FS
Catalogue is the common catalogue: the component's own meta-events, which every deployment carries.
var Generated embed.FS
Generated holds what this build published for readers outside Go: the record's JSON Schema, with the proto's comments carried as descriptions. The writer puts a copy of it in the archive beside the records it describes.
var Presets embed.FS
Presets are the framework presets under presets/.
var Proto embed.FS
Proto is the schema of record itself. The writer copies the proto of a record's major beside the record's JSON Schema on first use, so the archive keeps the meaning of every field and not only its shape.
var Schemas embed.FS
Schemas are the meta-schemas under schemas/: catalogue, preset, extension.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package auth is where a deployment plugs in who is asking and what they may see.
|
Package auth is where a deployment plugs in who is asking and what they may see. |
|
Package catalogue reads and validates the action catalogues that describe what a source emits.
|
Package catalogue reads and validates the action catalogues that describe what a source emits. |
|
cmd
|
|
|
audit
command
Command audit is the tool that holds a deployment to the contracts this repository publishes: it validates catalogues and presets, explains what a profile keeps, and checks that the code and the catalogue still agree.
|
Command audit is the tool that holds a deployment to the contracts this repository publishes: it validates catalogues and presets, explains what a profile keeps, and checks that the code and the catalogue still agree. |
|
audit-query
command
Command audit-query answers questions about what was written.
|
Command audit-query answers questions about what was written. |
|
audit-writer
command
Command audit-writer is an installation's front door and its write path, which are one process in a small installation and two in a busy one.
|
Command audit-writer is an installation's front door and its write path, which are one process in a small installation and two in a busy one. |
|
protoc-gen-audit-jsonschema
command
Command protoc-gen-audit-jsonschema is the buf plugin that writes the record's JSON Schema.
|
Command protoc-gen-audit-jsonschema is the buf plugin that writes the record's JSON Schema. |
|
deploy
|
|
|
pulumi
module
|
|
|
e2e
|
|
|
fixture
Package fixture stands in for the platform on the local kind box (see truvity/policy's hack/kind/README.md and docs/decisions/0005-kind-is-the-gate.md there): a Postgres database and its two roles, a JetStream stream, an S3 bucket and the two signing keys the digest and verify jobs need — the things a real deployment's platform would already have provisioned before `helm install audit` ever runs.
|
Package fixture stands in for the platform on the local kind box (see truvity/policy's hack/kind/README.md and docs/decisions/0005-kind-is-the-gate.md there): a Postgres database and its two roles, a JetStream stream, an S3 bucket and the two signing keys the digest and verify jobs need — the things a real deployment's platform would already have provisioned before `helm install audit` ever runs. |
|
fixture/cmd/resolve
command
Command resolve prints e2e/fixture's names as shell variable assignments, so apply.sh and every hack script that installs onto the same names can `eval` this rather than repeating them.
|
Command resolve prints e2e/fixture's names as shell variable assignments, so apply.sh and every hack script that installs onto the same names can `eval` this rather than repeating them. |
|
Package emit is what an application imports to record what it did.
|
Package emit is what an application imports to record what it did. |
|
examples
|
|
|
emit
command
Command emit is an example application that records what it does into the audit trail.
|
Command emit is an example application that records what it does into the audit trail. |
|
read
command
Command read is an example of reading the audit trail from Go: a search, paged to the end with its cursor, and one record read with where it came from.
|
Command read is an example of reading the audit trail from Go: a search, paged to the end with its cursor, and one record read with where it came from. |
|
gen
|
|
|
hack
|
|
|
goreleaser-snapshot-config
command
Command goreleaser-snapshot-config derives a single-architecture copy of .goreleaser.yaml for the local and CI loops that build straight into the kind box's own registry (see hack/example-snapshot.sh).
|
Command goreleaser-snapshot-config derives a single-architecture copy of .goreleaser.yaml for the local and CI loops that build straight into the kind box's own registry (see hack/example-snapshot.sh). |
|
Package index is the projection a search reads.
|
Package index is the projection a search reads. |
|
indextest
Package indextest is the one corpus every searcher is asked about.
|
Package indextest is the one corpus every searcher is asked about. |
|
postgres
Package postgres is the default index and the shared deduplication store.
|
Package postgres is the default index and the shared deduplication store. |
|
s3scan
Package s3scan answers queries by reading the archive, with no index at all.
|
Package s3scan answers queries by reading the archive, with no index at all. |
|
internal
|
|
|
authtest
Package authtest is an identity provider for tests: a discovery document and a key set served over a real listener, so the code under test runs its actual discovery and key fetch rather than being handed a key.
|
Package authtest is an identity provider for tests: a discovery document and a key set served over a real listener, so the code under test runs its actual discovery and key fetch rather than being handed a key. |
|
cli
Package cli is the implementation behind cmd/audit.
|
Package cli is the implementation behind cmd/audit. |
|
clock
Package clock measures how far this machine's clock is from UTC.
|
Package clock measures how far this machine's clock is from UTC. |
|
corpus
Package corpus reads the example records in testdata/records, for tests that hold a transport or an encoder to them.
|
Package corpus reads the example records in testdata/records, for tests that hold a transport or an encoder to them. |
|
digest
Package digest builds and checks the chain that makes the archive tamper-evident.
|
Package digest builds and checks the chain that makes the archive tamper-evident. |
|
hold
Package hold places and releases legal holds over the archive.
|
Package hold places and releases legal holds over the archive. |
|
identity
Package identity is the way back from a pseudonym to the person, for the cases the law requires and only for them.
|
Package identity is the way back from a pseudonym to the person, for the cases the law requires and only for them. |
|
metaschema
Package metaschema validates a document against one of the meta-schemas this repository publishes: the catalogue format, the preset format, and the constraints every extension-slot schema must satisfy.
|
Package metaschema validates a document against one of the meta-schemas this repository publishes: the catalogue format, the preset format, and the constraints every extension-slot schema must satisfy. |
|
pgtest
Package pgtest gives a test its own Postgres schema.
|
Package pgtest gives a test its own Postgres schema. |
|
query
Package query is the read service: it turns a request into a closed query, narrows it to what the caller was granted, asks a searcher, and records that the read happened.
|
Package query is the read service: it turns a request into a closed query, narrows it to what the caller was granted, asks a searcher, and records that the read happened. |
|
registry
Package registry holds the catalogues a deployment has registered.
|
Package registry holds the catalogues a deployment has registered. |
|
s3test
Package s3test gives a test a real S3 to walk.
|
Package s3test gives a test a real S3 to walk. |
|
schemagen
Package schemagen turns the record's protobuf descriptor into a JSON Schema of the form this project writes.
|
Package schemagen turns the record's protobuf descriptor into a JSON Schema of the form this project writes. |
|
telemetry
Package telemetry is the OpenTelemetry metrics this repository's processes publish.
|
Package telemetry is the OpenTelemetry metrics this repository's processes publish. |
|
writer
Package writer turns records into the copies the profiles keep, and puts those copies where they are kept.
|
Package writer turns records into the copies the profiles keep, and puts those copies where they are kept. |
|
Package keys holds the two kinds of key this system needs and the interfaces a deployment plugs its own behind.
|
Package keys holds the two kinds of key this system needs and the interfaces a deployment plugs its own behind. |
|
Package preset reads the framework presets and composes them into profiles.
|
Package preset reads the framework presets and composes them into profiles. |
|
Package query is the query service as a library: search, facets, get, export, tail and resolve over what the writer wrote, behind the grants a caller holds, with every read recorded in the trail it reads.
|
Package query is the query service as a library: search, facets, get, export, tail and resolve over what the writer wrote, behind the grants a caller holds, with every read recorded in the trail it reads. |
|
Package record is the canonical audit record: the generated protobuf type plus the rules the type alone cannot express — identifiers, bounds, the negative list, and the canonical JSON form that every hash is taken over.
|
Package record is the canonical audit record: the generated protobuf type plus the rules the type alone cannot express — identifiers, bounds, the negative list, and the canonical JSON form that every hash is taken over. |
|
sdk
module
|
|
|
Package sink is the write contract, and it is the same contract at every hop.
|
Package sink is the write contract, and it is the same contract at every hop. |
|
natssink
Package natssink publishes records to a NATS JetStream stream, and consumes them again on the other side.
|
Package natssink publishes records to a NATS JetStream stream, and consumes them again on the other side. |
|
Package store is the object store the archive lives in.
|
Package store is the object store the archive lives in. |
|
s3store
Package s3store keeps the archive in an S3 bucket.
|
Package s3store keeps the archive in an S3 bucket. |
|
storetest
Package storetest holds the store a test writes to.
|
Package storetest holds the store a test writes to. |
|
Package wire is how this repository's services speak JSON.
|
Package wire is how this repository's services speak JSON. |
|
Package writer is the audit writer as a library: the thing that takes records, splits them into the copies their profiles keep, pseudonymises, and puts them into the locked archive.
|
Package writer is the audit writer as a library: the thing that takes records, splits them into the copies their profiles keep, pseudonymises, and puts them into the locked archive. |