Skip to content

Record, find and replay a session

This Linux example adds audit logging and session recording to a local-account host. It generates real SSH command output, finds the sealed Recording through the CLI and replays it. Start with an installed Bifröst host and an allowed local account.

Examples

Configure a recorded local-account flow

  1. Add the auditlog and flow to the host configuration. This complete example uses the named default audit log:

    Bifröst host: /etc/engity/bifroest/configuration.yaml
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    auditlogs:
      default:
        recording:
          enabled: true
    
    flows:
      - name: local
        authorization:
          type: local
        environment:
          type: local
          name: "{{.authorization.user.name}}"
          portForwardingAllowed: false
    

    The flow selects the explicitly defined default logger automatically; recording.enabled: true adds output recording. Without a defined default or explicit logger selection, neither runs. The default strict failure policy stops an affected task if local persistence fails. See audit configuration and Recording configuration.

  2. Restart Bifröst using the host's service manager. For a fresh installation, the default signing key, audit journal and Recording repository are created when enabled.

  3. Run a command through the workload SSH connection and let it finish:

    Workload terminal
    1
    ssh alice@bifroest.example.org 'printf "recording-check\n"'
    

    Replace the account and host with your own. Bifröst records shell/command output; it does not capture raw keystrokes or SFTP and forwarding payloads. Forwarding is disabled in this example.

Find and verify the generated Recording

  1. On the Bifröst host, run inspection commands as the service user, with access to its configuration, signing key and repositories:

    Bifröst host
    1
    bifroest recording ls default --limit=20
    

    The default Linux repository is /var/lib/engity/bifroest/recordings; the CLI verifies selected sealed originals in its sealed/ directory. If there are several entries, use their start times to find the test session; listing order is by Recording ID.

  2. Replace RECORDING_UUID with its ID and inspect and verify it:

    Bifröst host
    1
    2
    3
    bifroest recording show default RECORDING_UUID --format=json
    bifroest recording verify default RECORDING_UUID --require-full
    bifroest audit verify default
    

    The configured signing identity supplies local producer trust. This clear Recording receives full verification without a decryption key.

Replay or export its terminal output

  1. Replay the Recording in the terminal:

    Bifröst host
    1
    bifroest recording play default RECORDING_UUID --with-sensitive --speed=2
    

    The verified playback includes recording-check from the generated command.

  2. To save an asciicast v3 file instead, choose an existing private output directory outside managed storage:

    Bifröst host
    1
    2
    3
    bifroest recording export default RECORDING_UUID \
      --with-sensitive \
      --output /srv/audit-evidence/session.cast
    

    Recording exports are complete, sensitive plaintext and are never redacted. Without an encryption recipient, signatures protect integrity but not confidentiality of the stored original either.

Browser alternative

The same settings capture output from browser shells. With a management flow granting access.recordings.read and access.recordings.download:

  1. Choose Audit logs, select default, then open Recordings.
  2. Choose Open recording. For encrypted content, select your local recipient key and enter its passphrase to unlock it. Opening a Recording does not itself verify its signatures.
  3. Use Verify with an independently obtained producer ID to check signatures, then choose Play. The player's help button lists playback controls.

Decryption and playback run locally; the private key is not uploaded. See encrypted evidence for trust setup and browser compatibility for supported Recording sizes.

Next steps