Session recording
Session recording is disabled by default. Configure it under a selected audit log to capture one signed asciicast v3 for each SSH or browser shell or exec task, alongside the audit journal.
Properties
enabled
bool = false
Enables session recording for flows that select this audit log. The journal is already active for a selected logger; this flag adds the Recording repository and signed output artifacts.
directory
File Path = "<os specific>"
Local recording repository. Keep it on an access-controlled filesystem, separate from session storage, audit journals and key files. Bifröst manages it exclusively; do not modify it or rotate its files externally.
The default depends on the operating system:
- Linux:
/var/lib/engity/bifroest/recordings - macOS:
/Library/Application Support/Engity/Bifroest/recordings - Windows:
C:\ProgramData\Engity\Bifroest\recordings
The local filesystem is trusted; repository signatures do not protect against an operator or attacker who can alter managed paths concurrently.
compression
Compression profile for recorded event chunks.
chunkSizeBytes
uint64 = 262144
Target chunk size before compression, from 1 to 1048577 bytes. An indivisible event group can exceed this target.
flushInterval
Duration = "2s"
Maximum time between checkpoints while content is pending; must be positive.
flushSizeBytes
uint64 = 1048576
Pending output threshold for a checkpoint; must be positive.
maximumSpoolBytes
uint64 = 107374182400
Maximum local spool, including active and sealed recordings, receipts, and recovery work (default 100 GiB). Must be at least chunkSizeBytes and flushSizeBytes. If the spool is full, recording fails closed; startup never deletes evidence just to fit the limit.
retainFor
Duration = "720h"
How long an eligible sealed recording remains locally (default 30 days). 0s stops new automatic deletions but not one already begun. See retention.
notice
String = ""
Optional notice before an interactive PTY shell. It can use {{.recording.id}} and {{.recording.startedAt}}; Bifröst adds no newline. The notice becomes recorded output and does not appear for exec or non-PTY tasks. Do not rely on it as the only notice where policy requires one for those tasks.
targets
[]Remote target = "inherit"
Selects remote destinations for sealed recordings:
inherituses every target configured in the parent audit log.falsedisables remote recording delivery while leaving audit-log target delivery unchanged.- A nonempty list defines independent recording targets using the same S3, SFTP, and WebDAV schemas as the audit log.
Every selected target is required. Settle outstanding delivery before changing destinations or disabling Recording; otherwise pending artifacts remain in the local spool. See remote target behavior.
Compression
level
string = "default"
Compression profile for chunked Zstandard encoding. default is currently the only supported value.
Captured data and privacy
- PTY tasks capture terminal output and resize events; non-PTY tasks capture stdout and stderr. SFTP and forwarding payloads are not recorded. A forced command is recorded as an exec task.
- Raw keyboard input is not captured. Echoed commands and secrets printed by programs can still appear in the output. Treat recordings and exported Casts as sensitive; encrypted containers also expose public metadata.
- Recording is terminal playback, not a byte-for-byte SSH capture. With the default
failurePolicy: strict, a local recording failure aborts the affected task. WithbestEffort, Bifröst disables the audit log and recording until restart. See failure policy.
Formats and keys
Recording inherits its signing identity and optional age recipient from the parent audit log. These keys may be shared across audit logs; each Recording repository must still have its own directory. See the audit-log key configuration.
- Without
encryptionPublicKeyorencryptionPublicKeyFile, Bifröst stores signed, compressed native.bcastartifacts. - With an encryption recipient, Bifröst stores signed CBOR
.becastartifacts whose compressed event groups are independently encrypted with age.
Encrypted inspection or verification without the private age key checks only the signed outer envelope, not decrypted content or claimed status. recording verify with a matching key checks the full content without exporting a Cast; --require-full fails rather than accepting outer-only verification. Full export also verifies the content. Even encrypted artifacts expose metadata such as recording ID and timing; protect them. See the native format and test vectors for wire details.
Switching between .bcast and .becast requires a new empty Recording directory. Changing the audit recipient also requires a new empty audit-log directory. Older recording-only repositories cannot switch to audited recording in place: use a new empty Recording directory. Preserve old evidence and decryption keys. If the signing key is lost, Bifröst refuses to regenerate it over existing history.
Storage and recovery
active/holds in-progress recordings;sealed/holds immutable.bcastor.becastfiles. Startup seals interrupted recordings asincomplete. Integrity failures in accepted evidence fail closed; there is no manual repair command.quarantine/and.bifroest-work/hold rejected and in-progress recovery work. Do not manually move these files intosealed/..delivery/holds signed receipts. Itsreceipt.lifecycleoutbox holds signed, unencrypted flow names, correlation IDs and digests until the event is recorded. Protect the entire repository and its backups with filesystem permissions/ACLs; signatures protect integrity, not confidentiality.
Recovery replays pending terminal audit events at least once; a crash after commit can produce an identical duplicate. See recording lifecycle events.
Remote delivery and retention
Signed receipts bind sealed bytes to selected remote targets. Delivery retries asynchronously; changing a target cannot redirect an outstanding artifact. See remote delivery.
With targets, retainFor begins after the last durable acknowledgement and requires success-audit markers. Without targets, it begins at sealing. Bifröst deletes only local recordings, not remote copies; set remote retention separately. retainFor: 0s stops new automatic deletions.
Export and playback
recording lsandrecording showread verified metadata from a configured repository locally or through the SSH management flow. Lists use bounded pages and stream verified entries by default.recording exportverifies the signature and content before writing a full, never redacted Cast;--with-sensitiveis required. Protectsession.castand open it with an asciicast v3 player.recording playverifies and replays captured terminal output directly, with--with-sensitiveand optional--speed.recording verifychecks a locally selected UUID against the configured signing identity, or an offline or downloaded original against an independently trusted producer ID, without outputting Cast content. It reports whether verification was outer or full.- The management client downloads signed originals for client-side verification, export and playback when the authorized flow grants
recordings.download. Remote delivery targets store sealed originals, not plaintext Casts. For offline metadata without export, userecording inspect; see the native format for verification details.
Examples
Clear recording
-
Add recording to the explicitly defined
defaultlogger. Flows use it unless they select another audit log:/etc/engity/bifroest/configuration.yaml 1 2 3 4
auditlogs: default: recording: enabled: true -
Start Bifröst and use a shell or exec task. After it ends, find
<recording-uuid>.bcastunderrecording.directory/sealed/. An optional recording notice shows the ID only for interactive PTY shells. The logger also writes audit events correlating the Recording with its session. -
On the running Bifröst host, export the already sealed
.bcastto a file outside the repository. The local signing identity is used automatically; no configuration path or producer ID needs to be repeated:1 2 3 4
bifroest recording export \ --with-sensitive \ --output session.cast \ default <recording-uuid>To verify it without a Cast export, run
bifroest recording verify default <recording-uuid>.
Encrypted recording
-
For new, empty audit and Recording directories, configure an offline age recipient on the parent entry. Bifröst then writes
.becastinstead of.bcastand an encrypted.beauditjournal:/etc/engity/bifroest/configuration.yaml 1 2 3 4 5
auditlogs: default: encryptionPublicKeyFile: /etc/engity/bifroest/audit-recipient.pub recording: enabled: true -
On the Bifröst host, get the signing producer ID from the local signing key and transfer it independently to the offline workstation. Copy the already sealed
.becastthere without stopping Bifröst; do not copy the signing private key:1 2
bifroest audit producer-id default # Independently retain this 64-hex ID; do not take it from the .becast file. -
On the offline workstation, decrypt and export the copied artifact. The recipient's private key stays offline:
1 2 3 4 5 6
bifroest recording export \ --expectedProducerId "<trusted-64-hex-producer-id>" \ --decryptionIdentityFile /srv/audit-keys/recipient-key \ --with-sensitive \ --output session.cast \ session.becastTo verify the encrypted original without creating a Cast, run
bifroest recording verify --expectedProducerId "<trusted-64-hex-producer-id>" --decryptionIdentityFile /srv/audit-keys/recipient-key --require-full session.becast. Without the private key, verification is outer-only unless--require-fullmakes it fail.