Skip to content

Verify encrypted evidence on a workstation

This example creates encrypted audit events and Recordings on a Linux Bifröst host, then verifies and exports them on an administrator's workstation. The server receives the recipient's public key. The private decryption key and plaintext exports stay on the workstation.

The management login uses a separate SSH identity and trusted host key as in the remote-management guide. Use a new, empty evidence journal and Recording directory for this example. Existing histories cannot switch encryption recipient in place.

Examples

Configure the recipient and server

  1. On the trusted verification workstation, prepare private directories /srv/audit-keys and /srv/audit-evidence, owned by the intended verification operator. Have the workstation administrator provision them if necessary. Create a dedicated recipient key pair as that operator:

    Verification workstation
    1
    2
    3
    bifroest key generate \
      --identityFile /srv/audit-keys/recipient-key \
      --publicFile /srv/audit-keys/recipient-key.pub
    
  2. Transfer only recipient-key.pub to the Bifröst host as /etc/engity/bifroest/evidence-recipient.pub. Provision the management login's public key in /etc/engity/bifroest/management_authorized_keys. Neither the recipient private key nor the management login private key belongs in this server configuration.

  3. Configure the evidence and administration flows:

    Bifröst host: /etc/engity/bifroest/configuration.yaml
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    auditlogs:
      evidence:
        identityFile: /etc/engity/bifroest/evidence-signing-key
        directory: /var/lib/engity/bifroest/evidence-audit
        encryptionPublicKeyFile: /etc/engity/bifroest/evidence-recipient.pub
        recording:
          enabled: true
          directory: /var/lib/engity/bifroest/evidence-recordings
    
      administration:
        identityFile: /etc/engity/bifroest/administration-signing-key
        directory: /var/lib/engity/bifroest/administration-audit
        recording:
          directory: /var/lib/engity/bifroest/administration-recordings
    
    flows:
      - name: administration
        auditlog: administration
        requirement:
          includedRequestingName: ^management$
        authorization:
          type: simple
          entries:
            - name: management
              authorizedKeysFile: /etc/engity/bifroest/management_authorized_keys
        environment:
          type: management
          access:
            auditlogs:
              read: true
              events: true
              verify: true
              download: true
            recordings: true
    
      - name: local
        auditlog: evidence
        requirement:
          excludedRequestingName: ^management$
        authorization:
          type: local
        environment:
          type: local
          name: "{{.authorization.user.name}}"
          portForwardingAllowed: false
    

    This access object grants audit and Recording operations, including original signed evidence, but no session control or configuration credentials. The CLI still requires --with-sensitive before displaying or exporting private content.

  4. Restart Bifröst using the host's service manager. The new evidence journal stores .beaudit; sealed Recordings use .becast. The separate administration journal in this example remains unencrypted.

  5. As the Bifröst service user, obtain the evidence producer ID from its signing identity:

    Bifröst host
    1
    bifroest audit producer-id evidence
    

    Transfer and retain this 64-hex value through an independently trusted channel. Keep the server's signing private key on the server; do not derive producer trust from downloaded evidence.

Configure the verification workstation

  1. Provision the trusted SSH host key and management login identity as in the management guide.
  2. Add the producer pin and local decryption paths. Replace PRODUCER_ID with the independently retained ID:

    Verification workstation: ~/.ssh/config
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    IgnoreUnknown X-*
    
    Host bifroest-admin
        HostName bifroest.example.org
        User management
        IdentityFile ~/.ssh/bifroest-management
        UserKnownHostsFile ~/.ssh/known_hosts
        X-ExpectedProducerId PRODUCER_ID
        X-AuditPrivateKey /srv/audit-keys/recipient-key
        X-RecordingPrivateKey /srv/audit-keys/recipient-key
    

    The SSH login key and recipient key have separate purposes. Both private-key paths refer to the workstation. This alias pins the producer of evidence; other audit logs with different signing identities need their own trusted ID or alias.

  3. Generate an actual Recording through the workload flow:

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

    Replace alice with an allowed local account.

Verify and export audit events

  1. On the workstation, verify the downloaded journal and decrypted event fields:

    Verification workstation
    1
    bifroest @bifroest-admin audit verify evidence --require-full --format=json
    

    A successful result has full scope. The recipient private key is read locally and is not transmitted to the server.

  2. Query a limited sensitive view, or export the journal to a protected, existing output directory:

    Verification workstation
    1
    2
    3
    4
    bifroest @bifroest-admin audit events evidence --with-sensitive --flow=local --limit=20
    bifroest @bifroest-admin audit export evidence \
      --with-sensitive \
      --output /srv/audit-evidence/events.jsonl
    

    The output JSONL is plaintext and unsigned. Preserve the original signed journal as evidence; an export is a derived view.

Verify, export and replay a Recording

  1. Find the sealed original:

    Verification workstation
    1
    2
    bifroest @bifroest-admin recording ls evidence --limit=20
    bifroest @bifroest-admin recording show evidence RECORDING_UUID
    

    Replace RECORDING_UUID with the selected ID. These metadata queries receive outer verification of encrypted Recordings and do not need to decrypt them.

  2. Download and fully verify that Recording:

    Verification workstation
    1
    bifroest @bifroest-admin recording verify evidence RECORDING_UUID --require-full
    

    The client checks the trusted producer and the requested Recording ID against the signed original.

  3. Export its verified Cast, then inspect the export independently:

    Verification workstation
    1
    2
    3
    4
    5
    6
    bifroest @bifroest-admin recording export evidence RECORDING_UUID \
      --with-sensitive \
      --output /srv/audit-evidence/session.cast
    bifroest recording inspect \
      --expectedProducerId PRODUCER_ID \
      /srv/audit-evidence/session.cast
    
  4. Or replay the selected original directly on the workstation:

    Verification workstation
    1
    bifroest @bifroest-admin recording play evidence RECORDING_UUID --with-sensitive --speed=2
    

    play outputs terminal content; export writes a signed asciicast file. Both fully verify the encrypted content before playback or export.

Browser alternative

Enable HTTPS as in Browser access, then publish the administration flow with discoverAsSlug: Admin and requirement.http.includedSlug: '^Admin$'. Keep its requesting-name requirement and the access object above.

  1. Open https://bifroest.example.org/#Admin and sign in through SSH key as management.
  2. Choose Audit logs, select evidence, then open Events or Recordings.
  3. Start local verification, select the recipient key and enter its passphrase. Enable signing-ID validation with your independently retained producer ID, not merely the suggested server value.

The decryption key stays in this management tab and is discarded when it closes. Browser code is served by the server; use the CLI workflow above when the verification tool must be independently trusted.

Offline alternatives

If the verification workstation is disconnected from the server, copy a complete audit journal or a sealed Recording and use local file selectors with the same independent producer ID and recipient key. Follow the encrypted audit-copy example or the file syntax on recording verify.

Next steps