Skip to content

Guardana Control 0.21.0

Latest

Choose a tag to compare

@github-actions github-actions released this 06 Dec 17:43
Immutable release. Only release title and notes can be modified.

Upgrade every binary together, starting with the collector. A 0.20 collector
refuses checkpoint records. If a request ID still has an open trail, the plane
refuses the call before writing and returns INDETERMINATE and
INVALID_FIELD_VALUE. The collector returns 400 for evidence records
carrying previews, redaction profiles, or bytes other than the plane's
encoding. The plane clears previews before writing evidence. Under
TRUST_INDEPENDENT, observe import walks egress and process input paths
from /. Directories writable by the group or others must be sticky, with
entries owned by root, the directory owner, or the importing account. observe import refuses input files with a second name. coverage refuses a process
path unless its name is an absolute, clean executable path. Its sources must
repeat that path and leave server_address unset. supervise reads run trees
of at most 190 runs. Before rolling back, close every held request or let it
expire. 0.20 refuses hold journal 1.1. 0.20 readers refuse observation logs
with process records and findings logs with egress reports. See upgrade a
plane from 0.20
.

Each evidence line links to the previous one with prev_event_digest. With a
checkpoint key and floor, the plane signs checkpoints over its trail. trail verify and a Python verifier check exports against those checkpoints. The
guarantee covers only events a checkpoint seals and excludes tampering by
whoever controls the plane host and its key. See sign a plane's
trail
. As a sensor independent of the
agent, observe import reads process starts from the agent's host. When an
egress proxy authenticates callers with runs check-token, supervise lists
a run's connections and coverage --runs counts them per run.
export.authorization_file reads the collector credential from a judged file.
The hook profile, qualified on two runtime releases, was not requalified.

Added

  • Event.prev_event_digest (field 31) holds the SHA-256 of the previous
    evidence line's exact bytes in the chain, excluding the newline. A filled
    link is sha256: followed by 64 lower-case hex digits. Each
    ACTION_PROPOSED starts a chain with an empty link, even when a request id
    is reused after its trail closes. prev_event_id keeps its meaning. The
    exporter sends the spooled line as the log record's body. The collector
    stores those bytes. Trail export copies them. If the plane cannot seal an
    event, it takes the refused append path and halts material calls.
    Pipeline.SealFailures, Pipeline.SealFailuresAfterEffect and
    Pipeline.SealFailuresAbandoned count total, after-effect and abandoned
    seal failures, respectively. The corresponding metrics are
    guardana_control_pipeline_seal_failures_total,
    guardana_control_pipeline_seal_failures_after_effect_total and
    guardana_control_pipeline_seal_failures_abandoned_total. The health keys
    are seal_failures, seal_failures_after_effect and
    seal_failures_abandoned. Sink failure counts exclude seal failures.
    Closing records lost to seal failures after the effect or to the spool
    count as lost closings for run's exit status. (ADR-0096)

  • observe import reads a log of processes started on the agent's host. A
    host-process-events source maps top-level members of each JSON line to
    time, process id, parent process id, executable and user. Time and
    executable are required. time_format accepts RFC 3339, Unix seconds or
    Unix milliseconds. Each accepted line becomes one process observation.
    Import reads only the mapped members, so it copies arguments, environment
    and working directory only if the mapping names them. Each line must be
    at most 64 KiB and parse as a JSON object with unique member names. It
    must include a readable time and an absolute, clean executable path of at
    most 4096 bytes. The import report counts refused lines by reason in
    refused_by. Import drops malformed process ids, parent process ids and
    users and counts them in strings_dropped. A source may declare
    TRUST_INDEPENDENT on an unsigned descriptor. With that trust setting,
    observe import refuses input writable by the group or others. Such a
    source names no run, and its refused lines cast doubt on no run. The
    importer keeps user as copyable text up to 64 bytes without = or
    blank runes, or as the digits of a plain-digit JSON number up to
    4294967295. It counts dropped values in strings_dropped and keeps the
    line. Log reads and writes reject lines with invalid user. Executable
    path elements cannot start with a mark, and may hold white space only
    inside an element and no other blank rune. Blank runes include U+303F,
    U+16FE4 and U+1D159
    (host process events,
    ADR-0095).

  • Source descriptor schema 0.3 carries the process mapping. Descriptors
    0.1 and 0.2 read as before. Observation record schema 0.4 carries a
    process observation or an import report of this kind. Version 0.20
    rejects logs containing a 0.4 line as damaged and 0.3 descriptors as
    unknown versions
    (ADR-0095).

  • coverage counts a process path as observed when a live
    host-process-events source named by the path holds a process
    observation of its executable. Each process source whose import refused
    a line gets its own row, as does each executable a process source saw
    that no process path declares. coverage prints up to 256 of those
    executables in byte order and reports how many it omitted. Either kind
    of row makes coverage exit with status 1. coverage also prints an
    unseen process by row and exits 1 for a process source never heard, past
    its heartbeat or heard in the future, even when no path names it
    (ADR-0095).

  • guardana-control runs check-token is a Squid basic authentication helper
    over a runs directory. It answers OK for an open, unexpired run matching
    the tenant, project and secret, and ERR for a refused token or a malformed
    or overlong line. It answers BH when it cannot judge because it cannot
    read the runs directory, a record, the roster or the floor, or because its
    account cannot write a directory the plane writes. For a signed directory,
    pass --roster, --root-key, --roster-id and --floor-dir. The helper
    answers BH if the roster id differs from --roster-id, the floor is
    unreadable or lacks a matching serial and digest for that id, or the serial
    is below the highest the helper process has taken. It writes nothing and prints no secret. Run
    it as the plane's account through a one-command wrapper; the
    egress proxy guide shows Squid's
    configuration.

  • export.authorization_file (GUARDANA_CONTROL_EXPORT_AUTHORIZATION_FILE)
    names a file holding the value of the Authorization header the plane sends
    its collector, which run and doctor read at start. The file must be
    regular, not a symbolic link, with one name, owned by root or the plane's
    account, with no group or others permission bit and no access control list,
    and hold one printable ASCII line that is not blank (at most 8 KiB; one
    trailing newline is taken off). run and doctor refuse a path starting
    with an authentication scheme such as Bearer , and the key beside an
    Authorization header from export.headers or its variable; dev refuses
    the key. It works under every approvals.authority. A signed plane, whose
    configuration is root's file of mode 0644 and whose environment sets no
    key, should move its credential here from export.headers and make a new
    one. doctor warns when the file is unset and the header is absent or holds
    only spaces, with the same verdict and exit status. At start, run warns on
    standard error of each export.headers key set by a configuration file its
    group or others may read, even when the environment sets it again, naming
    the key, the file and its mode. No refusal or warning holds the value.

  • The guardana.control.evidence.v1alpha1 checkpoint message, outside the v1
    promise, its signed envelope and checkpoint export 0.1.
    guardana-gateway trail verify reads chained evidence exports, a whole
    checkpoint export, each expected plane's public key, and the tenant and
    project. It reports altered, truncated, unsealed, filtered, pruned
    or verified per request and lists chain faults. It exits 0 with
    verified, pruned or filtered verdicts and no chain fault, 1 on
    altered, truncated, a chain fault or an output error, 3 when only
    unsealed remains, and 2 on a usage or input error. Adversarial fixtures are
    in testdata/trail-verify/. See trail
    verification
    and ADR-0096.

  • supervise reads up to four egress-access-log sources declaring
    CALLER_BASIS_AUTHENTICATED and TRUST_INDEPENDENT and mapping a status.
    Refused input exits 2 without printing. It joins by caller, tenant,
    project, status and the run's window, skipping 407 and other runs with
    readable records. Each admitted source gets an egress entry in input order,
    even with zero counts. It gives exact counts of attributed connections, those
    outside the window, those of unknown run and those naming no run. It lists up
    to six attributed connections with host and port, ordered by event time then
    observation id. Unknown or unnamed connections put the run in doubt. An
    unknown window puts every egress source in doubt. Output shows counts and
    connections, with pruning counts in source id order. With only counted
    connections, it writes to the findings log under the record's project and
    exits 1. Supervision,
    ADR-0094.

  • coverage --runs <dir> counts egress connections per run and source.
    For a signed runs directory, give --roster, --root-key, --tenant and
    --project. Like supervise, it joins egress-access-log sources that
    declare CALLER_BASIS_AUTHENTICATED and TRUST_INDEPENDENT and map a
    status. Each run row counts attributed connections, those outside the
    window and those of unknown run for one joined source. At most 256 run
    rows print, followed by a count of any rows cut. Each joined source then
    gets a row counting unattributed connections and those naming no run.
    Each other egress source gets a reason. Coverage exits 1 on a connection
    of unknown run, one naming no run, or a cut run row. Without --runs,
    coverage prints and exits as before. See
    coverage of runs and
    ADR-0094.

  • A second trail verifier, guardana_control.trail in clients/python/. Run
    python -m guardana_control.trail verify --export <file>... --checkpoints <file> --plane <id>=<public-key-file>... --tenant <id> --project <id>.
    It uses the standard library alone. Its output and exit statuses match
    guardana-gateway trail verify on every shared case. It checks only part
    of the event schema and accepts unknown event members that the Go verifier
    rejects. See trail verification.

  • The plane signs checkpoints when evidence.checkpoint_key, plane_id and
    evidence.checkpoint_floor_dir are set. Signing runs off the decision path
    after an event is written and evidence.checkpoint_interval has elapsed,
    and at a clean stop. The interval defaults to 1m and ranges from 1s
    to 1h. A checkpoint covers up to 255 seals. The plane appends it durably
    to its checkpoints log under the evidence directory, then raises its
    floor. If the log already holds a different checkpoint for that sequence,
    the plane refuses the append and reports append_failed. After a restart
    the plane resumes from the highest sequence the log holds. The health
    member checkpoints reports off, known or unknown, with causes
    key_unreadable, key_trust_failed, floor_unreadable, sign_failed,
    append_failed, collector_refused and export_stalled. The plane keeps
    serving calls with status degraded while integrity is unknown.
    guardana_control_checkpoint_signing reads 1 when the plane has read the
    key and floor, the trust check passes and no integrity cause is set.
    guardana_control_checkpoint_integrity_unknown reads 0 while integrity is
    known and 1 for each active cause while it is unknown. See
    Sign a plane's trail and ADR-0096.

  • guardana-control policy keygen --checkpoint --out <dir> writes
    checkpoint.key (mode 0600) for evidence.checkpoint_key and
    checkpoint.pub for trail verify --plane. It refuses an existing path
    and prints the key id. guardana-control policy state init --kind checkpoint --plane-id <id> --tenant <id> --project <id> <dir> makes the floor. It
    refuses a plane id the configuration's plane_id rule refuses. The plane
    never makes its own floor.

  • The exporter sends checkpoints at least once as a separate record type.
    It writes its position to a complete checkpoints.cursor.tmp file in the
    spool directory, then renames it to checkpoints.cursor. It refuses a
    cursor file with more than one name. After three refusals it quarantines a
    checkpoint and reports collector_refused until a later checkpoint is
    accepted. Consecutive checkpoint log read failures, network failures,
    timeouts or 5xx responses set export_stalled. The cause clears on the
    next accepted send or when nothing is left to send. A 0.20 collector
    refuses checkpoint records. A clean stop keeps its checkpoint in the
    plane's log. The checkpoint reaches the collector before exit if its send
    finishes in time. Otherwise the exporter retries it at the next start.

    The collector keeps checkpoint bytes in a separate log beside the trail.
    A resend with the same decoded payload type, payload, key id and signature
    is accepted without another write. The collector keeps the first line
    byte for byte and logs checkpoint_duplicates=N. It keeps a fork when the
    payload or signature differs for a plane and sequence it already holds and
    warns with checkpoint_forks=N. Both counts restart at zero when the
    collector restarts. Before pruning, guardana-gateway prune records the
    highest sequence it will remove per plane in side.json beside
    segments.json. The collector accepts resends at or below that mark that
    the log no longer holds, including forks, without writing them and warns
    with checkpoint_pruned_resends=N. log backup and log restore copy a
    checkpoint log's side.json. A plane's own checkpoint log refuses to write
    its own sequences at or below the prune mark, and the plane reports
    append_failed.

    guardana-gateway trail checkpoints [--after <n>] [--limit <n>] <dir>
    writes checkpoint export 0.1 from either log. If the plane never starts
    again, trail checkpoints can export the final checkpoint from the plane's
    own log. The export header records after (0 by default), and the trailer
    records end_reached and next. Readers refuse a missing trailer or data
    after it. trail checkpoints exits 1 when more follow. trail verify and
    the Python verifier exit 2 unless after is 0 and end_reached is true.
    Logs with more than 100000 checkpoints cannot be verified whole.

  • Anyone with the plane's public key can detect alteration, deletion or
    reordering of an event a signed checkpoint seals, within a claim that
    excludes events the plane never wrote or wrote falsely, events after the
    newest checkpoint (unsealed), tampering by whoever controls the plane
    host and its key, and, in the absence of an outside anchor, removal of the
    newest checkpoints together with the events after them.

Changed

  • The plane refuses calls under open request ids immediately, before
    writing, with INDETERMINATE and reason INVALID_FIELD_VALUE. Ids stay
    open from first event to closing record. Chains under one id never
    interleave. Calls that never held always release ids when the closing
    append returns. Unclosed held trails reserve ids until the plane stops,
    keep entries for the next start to report, and count in
    held_trails_left_open. Refused closing records also count as sink failures.

  • The collector returns 400 for log records with argument or result previews
    or redaction profiles. It used to clear those fields. Clearing would change
    the bytes the link covers. It also refuses JSON null, lines with a
    carriage return or a raw rune the encoder escapes, and lines whose bytes
    differ from the plane's encoding of the decoded event.
    testdata/evidence/lines.jsonl pins that spelling. Refusals quote no
    content. The plane retries the record, then quarantines and counts it. The
    next event links to the missing line. (ADR-0096)

  • Hold journal 1.1 stores the last line's digest beside its event id. After
    a restart, the next event links to that line. A 1.0 entry holds no digest.
    The first event after resumption has an empty link, as do that request's
    earlier events. On rollback to 0.20, the plane refuses 1.1 entries. Their
    requests stay at APPROVAL_REQUESTED. The lost-hold close leaves them open,
    and they never run. Before rolling back, close every held request or let it
    expire. (ADR-0096)

  • Under TRUST_INDEPENDENT, observe import now walks egress and process
    input paths from /, following symbolic links and checking each directory.
    Group- or other-writable directories like a group-writable /var/log must
    be sticky. Standard error names the resolved directory and mode on failure.
    Each entry there must belong to root, the directory's owner or the importing
    account. Ownership refusals name both owner ids. An input file there with a
    second name is refused. The sticky bit stops another account replacing a
    name, not creating it first. Mode-bit and owner-id checks ignore access
    control lists. The importer refuses symbolic links at input names and
    rejects trailing separators and final . or .. elements before opening
    anything
    (ADR-0095).

  • coverage requires a process path's name to be an absolute, clean
    path of an executable. Each of its sources must name that executable and
    omit server_address. coverage refuses inventories that fail these
    checks. Tool observations no longer count toward process path coverage.
    coverage refuses a log containing a process source's records unless
    that source's descriptor is supplied with the log
    (ADR-0095).

  • A SuperviseReport carrying egress is schema 0.3. The findings log
    refuses invalid source ids, hosts or ports, excess entries or connections,
    missing required members, duplicates, misordered connections and list lengths
    other than the lesser of attributed and six. The 0.20 readers (react,
    notify, findings export) refuse logs carrying 0.3 as damaged. A shared
    doubt line names the least id and counts the others. A folded pruning line
    gives a count only for one source.

Fixed

  • policy renew runs sharing --out under different signer floor directories
    check --out again after a refused write for as long as the file there
    changes between checks. Before, a run gave up after three checks, and putting
    the old file back after a refused write could use them up with no newer
    statement there. A second refusal of an unchanged file ends the run with that
    refusal. When the ten-second wait for the signer floor directory runs out,
    the run exits 1, saying it wrote nothing at --out and raised the signer
    floor to its statement, and naming its last refusal. It keeps a newer
    statement and replaces an older one.

  • Under inherit, a tree of 400 runs with every source in doubt could exceed
    the findings log's 64 KiB line bound, so the log refused the write. The limit
    is now 190 runs. The test fills every doubt line and count to its maximum.
    The report is 56480 bytes at 190 runs, within 7/8 of the line bound. At 200
    runs the largest report exceeds 7/8.

Security

  • guardana-gateway no longer passes environment variables whose names start
    with GUARDANA_CONTROL_, in any letter case, to the guardana-control
    binary scenario runs or the approval page dev serves. Before, scenario
    passed its whole environment, including
    GUARDANA_CONTROL_EXPORT_HEADERS_AUTHORIZATION when it was set. An MCP
    server the plane starts over stdio already received only the environment its
    configuration gives it.

Image: ghcr.io/guardana/control-gateway@sha256:6bce71a3c4a048ec68ee25a96daf41ff1e1aa8303c8eedaacec986258f0195f7