Enable session recording with S3-compatible storage
Boundary supports session recording using the MinIO storage backend. This support enables users who want to integrate an S3-compatible storage backend for monitoring Boundary session activity. Session recording is available for HCP Boundary Standard tier and Boundary Enterprise users, and provides insight into user actions over remote SSH and RDP sessions to meet regulatory requirements for organizations and prevent malicious behavior. Administrators can enable session recording on SSH and RDP targets in their Boundary environment and replay recordings back within the Boundary admin UI.
The MinIO plugin is S3 compatible and enables session recording for other Amazon S3 compatible storage providers, such as Hitachi Object Storage.
This tutorial demonstrates enabling SSH and RDP session recording using MinIO as the storage backend and Boundary's native credential management features.
Tutorial overview
- Prerequisites
- Background
- Get setup
- Deploy a target and worker
- Set up MinIO
- Set up Boundary
- Enable session recording
- Verify and play back recordings
Prerequisites
To show how session recording works, this tutorial provides two types of targets:
- Linux target for SSH
- Windows target for RDP
You will set up the SSH target (and Boundary worker) using Docker.
You can configure the Windows target using Vagrant and VirtualBox, or using AWS. If you only want to test SSH session recording, you can skip the RDP session recording prerequisites listed below.
This tutorial recommends completing the HCP Boundary administration tutorials first. The learner should have a working Boundary cluster and org running on HCP, or a licensed Boundary Enterprise cluster.
Docker is installed (Note: Learners may also bring their own target, instead of using Docker)
A Boundary binary version 1.0.0 or later in your
PATHTerraform 0.14.9 or greater provides an optional workflow to complete the lab. The binary must be available in your
PATH.The
jqutility is recommended to simplify the CLI workflow. It should be installed and in yourPATH.The MinIO Client (
mc) is required to configure the MinIO storage bucket and access key used in this tutorial. Install it withbrew install minio-mcon macOS, or download a binary for your platform from the releases page. It should be installed and in yourPATH.Installing the Boundary Desktop App provides an optional workflow for this tutorial. The 2.0.0 version or above is recommended.
RDP session recording prerequisites
If you want to test RDP session recording, you will need the following:
- Installing an RDP client enables you to connect to the RDP targets in this tutorial. You could use the Windows App on Windows on macOS systems, or any other RDP client you prefer.
This tutorial provides two ways to set up a Windows environment for testing session recording:
Vagrant and VirtualBox
- Vagrant 2.2 or later and VirtualBox version 7.2 or later are required if you want to test RDP session recording with local resources. Refer to Deploy an RDP target for setup details. Skip this prerequisite if you only want to test SSH session recording, or if you want to use an AWS instance to test RDP instead.
OR
Amazon Web Services (AWS) EC2
An Amazon Web Services test account is only needed if you want to test RDP session recording with AWS instead of using Vagrant and VirtualBox.
Installing the AWS CLI is optional if you want to set up a Windows instance using AWS. You can use the AWS CLI or AWS Management Console to set up the Windows instance. If you use the AWS CLI, the binary should be available within your
PATH.
Session recording background
Highly regulated environments commonly need a system of record that archives actions taken on the network so that organizations can improve their security posture and enhance compliance.
Session recording allows administrators to get insight into user actions over remote SSH and RDP sessions to meet regulatory requirements for organizations and prevent malicious behavior. Administrators can enable session recording on SSH and RDP targets in their Boundary environment, store signed recordings in their storage bucket, and replay recordings back within the Boundary admin UI.
Recorded sessions get converted into a Boundary session recording (BSR) file, a binary file format and specification created to define the structure of Boundary recording files.
BSR files are designed to:
- Support the recording of both multiplexed and non-multiplexed protocols
- Allow independent byte streams in a session to write in parallel
- Support an optimal user experience during playback
- Be extensible to support more protocols in the future
BSR contains all the data transmitted between a user and a target during a session and is available within your storage bucket. These files are signed to ensure they are tamper-proof.
SSH and RDP session recording is available as a part of the Standard tier in both HCP Boundary and Boundary Enterprise.
Get set up
You will configure the following components for this tutorial:
- HCP Boundary Standard tier or Boundary Enterprise cluster
- MinIO storage bucket
- SSH host
- RDP host
- A worker instance to proxy and record your SSH and RDP sessions
Deploy an HCP Boundary Standard cluster
Session recording, credential injection, and SSH and RDP targets are features available in HCP Boundary Standard tier.
First, deploy an HCP Boundary cluster with the HCP Standard sku selected.
Launch the HCP Portal and log in.
Select your organization and project. From within that project, select Boundary from the Services menu in the left navigation.
Click Deploy Boundary.

In the Instance Name text box, provide a name for your Boundary instance.
Under Choose a tier, select the Standard option to enable session recording.
Under the Create an administrator account section, enter the Username and Password for the initial Boundary administrator account.
Click Deploy. Wait for the instance to initialize before proceeding.

You will need the following values later. Copy the Boundary Cluster URL from the HCP Boundary portal.
- Boundary address: the
BOUNDARY_ADDRvariable - Boundary Cluster ID: the
BOUNDARY_CLUSTER_IDvariable - Boundary admin username: the
BOUNDARY_USERNAMEvariable - Boundary admin password: the
BOUNDARY_PASSWORDvariable
Store these values in a safe location.
Next, click Open Admin UI.
Log in to Boundary using your admin credentials used to launch the cluster.
Navigate to the Auth Methods page using the left navigation panel. Locate the
password auth method, and copy its ID (such as ampw_AQSr776Hnm).
If you follow the Terraform workflow, you will use this value later on:
- Boundary auth method ID: the
BOUNDARY_AUTH_METHOD_IDvariable
Deploy targets and a Boundary worker
Deploy an openssh-server container as an SSH target for Boundary.
Ensure Docker is running, and then create a Docker network for the containers you deploy in this tutorial. Deploying the SSH target, MinIO, and the Boundary worker onto a shared network lets the worker reach the other containers by name, instead of relying on published host ports.
$ docker network create boundary-local
Deploy an openssh container to use as a target.
$ docker run -d \
--name openssh-server \
--network boundary-local \
-e USER_NAME=ssh-admin \
-e PASSWORD_ACCESS=true \
-e USER_PASSWORD=password \
-p 2222:2222 \
lscr.io/linuxserver/openssh-server:latest
Note that the username for the openssh server is ssh-admin, the password is password, and the target is available on your localhost at port 2222 (127.0.0.1:2222). Later in this tutorial, you create a Boundary target that reaches this container over boundary-local using its container name, openssh-server, instead.
Export the openssh container password as an environment variable.
$ export OPENSSH_PASSWORD=password
Check that the container is running.
$ docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Image}}\t{{.Status}}"
CONTAINER ID NAMES IMAGE STATUS
6e63f8178576 openssh-server lscr.io/linuxserver/openssh-server:latest Up 20 seconds
Deploy a worker
Session recording requires HCP Boundary or Boundary Enterprise. This tutorial uses Docker to deploy a Boundary worker to provide access to the target containers.
When using the boundary-enterprise image as a worker with HCP Boundary or Boundary Enterprise, you do not need to provide the license using an environment variable or config, but the worker must connect with a licensed controller.
Create a new file in your working directory called config.hcl. Supply the hcp_boundary_cluster_id, which is the UUID in the HCP Boundary cluster URL.
config.hcl
hcp_boundary_cluster_id = "<YOUR_HCP_CLUSTER_ID>"
listener "tcp" {
address = "0.0.0.0:9202"
purpose = "proxy"
}
worker {
public_addr = "minio-worker"
auth_storage_path = "/boundary/minio-worker"
recording_storage_path = "/tmp/boundary/worker-recordings"
tags {
type = ["minio", "openssh", "rdp"]
}
}
Save the config file.
Build a custom worker image
RDP session recording requires ffmpeg on the worker to process the recording. The published hashicorp/boundary-enterprise image does not include ffmpeg.
If you want to test RDP session recording, you should build a small custom Docker image that adds ffmpeg before deploying the worker.
Create a new file named Dockerfile in the same working directory as config.hcl.
Dockerfile
FROM hashicorp/boundary-enterprise
USER root
RUN apk add --no-cache ffmpeg
USER boundary
Build the image and tag it boundary-enterprise-ffmpeg.
$ docker build -t boundary-enterprise-ffmpeg .
Start and register the worker
Open a new terminal and switch to the directory with the config.hcl file, then deploy the worker container.
$ docker run \
--name boundary-worker \
--detach \
--network boundary-local \
-p 9202:9202 \
--hostname=minio-worker \
--add-host=host.docker.internal:host-gateway \
-v "$(pwd)":/boundary/ \
boundary-enterprise-ffmpeg
When the worker starts it attempts to connect to the controller.
Retrieve the worker registration code from the container logs.
$ docker logs boundary-worker 2>&1 | grep "Worker Auth Registration Request:"
Worker Auth Registration Request: Gzusqck...EXAMPLESTRING...HpyLn8GkcKqmj
Copy the Worker Auth Registration Request value.
You can register the worker using the Admin Console Web UI or the CLI.
Authenticate to HCP Boundary as the admin user.
Log in to the HCP portal.
From the HCP Portal's Boundary page, click on Open Admin UI to open the management console in a new page.
Enter the admin username and password you created when you deployed the new instance and click Authenticate.
Once logged in, navigate to the Workers page.
Notice that only HCP workers are listed.
Click New.
The new workers page can be used to construct the contents of the
worker.hcl file.
Do not fill in any of the worker fields.
Providing the following details will construct the worker config file contents for you:
- Boundary Cluster ID
- Worker Public Address
- Config file path
- Worker Tags
The instructions on this page provide details for installing the Boundary Enterprise binary and deploying the constructed config file.
Because the worker has already been deployed, only the Worker Auth Registration Request key needs to be provided on this page.
Scroll down to the bottom of the New Worker page and paste the Worker Auth Registration Request key you copied earlier.
Click Register Worker.

Click Done and notice the new worker on the Workers page.

Set up MinIO
This tutorial deploys MinIO using Docker. Alternatively, a MinIO server can be deployed locally on Linux, macOS, or Windows.
Deploy MinIO
Open a new terminal session and create a local config directory for MinIO.
$ mkdir -p ${HOME}/minio/data
Next, deploy a MinIO container using Docker.
$ docker run \
-p 9000:9000 \
--name minio \
--network boundary-local \
-e "MINIO_ROOT_USER=ROOTUSER" \
-e "MINIO_ROOT_PASSWORD=CHANGEME123" \
-v ${HOME}/minio/data:/data \
quay.io/minio/minio:RELEASE.2025-09-07T16-13-09Z server /data
Open a new terminal session and verify that all three containers are running.
$ docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Image}}\t{{.Status}}"
CONTAINER ID NAMES IMAGE STATUS
3af7a93654d3 minio quay.io/minio/minio Up 3 minutes
49f1ec39b3d8 boundary-worker boundary-enterprise-ffmpeg Up 11 minutes
6e63f8178576 openssh-server lscr.io/linuxserver/openssh-server:latest Up 17 minutes
Configure a MinIO storage bucket
Configure an mc alias pointing to your local MinIO server. Credentials are case sensitive.
$ mc alias set myminio http://127.0.0.1:9000 ROOTUSER CHANGEME123
Added `myminio` successfully.
Complete the following steps to configure a storage bucket:
Create a bucket named
boundary-recordings.$ mc mb myminio/boundary-recordings Bucket created successfully `myminio/boundary-recordings`.Export the bucket name as a variable in your terminal session.
$ export MINIO_BUCKET_NAME=boundary-recordingsWrite an IAM policy that scopes access to just this bucket.
boundary-recordings-policy.json
{ "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:PutObject", "s3:GetObject", "s3:GetObjectAttributes", "s3:DeleteObject" ], "Effect": "Allow", "Resource": "arn:aws:s3:::boundary-recordings/*" }, { "Action": "s3:ListBucket", "Effect": "Allow", "Resource": "arn:aws:s3:::boundary-recordings" } ] }Ensure that lines 12 and 17 contain the correct name of your bucket, such as
boundary-recordings.Create an access key scoped to the policy file. This single command replaces the old Console flow of creating an access key and pasting in a custom policy.
$ mc admin accesskey create myminio/ --name boundary-admin --policy boundary-recordings-policy.jsonExample output:
$ mc admin accesskey create myminio/ --name boundary-admin --policy boundary-recordings-policy.json Access Key: LJMRXGEWK7UD6H9QA363 Secret Key: BCx+JOIrrMlYiUvsSwKquthwc+etomFAVv8ejrgS Expiration: NONE Name: boundary-admin Description:Export the access key and secret key as variables in your terminal session.
$ export MINIO_ACCESS_KEY_ID=<your-copied-minio-access-key-id> $ export MINIO_SECRET_ACCESS_KEY=<your-copied-minio-secret-access-key>
Set up Boundary
The following resources are used in Boundary to enable session recording for SSH and RDP targets:
- A credential store
- A credential library
- A Boundary storage bucket
- An SSH or RDP target type with credential injection enabled
These resources can be configured using the Admin Console UI, the CLI, or Terraform. Select a workflow below to continue setting up Boundary.
Start by logging in to the HCP Boundary Admin UI.
Log in to the HCP portal.
From the HCP Portal's Boundary page, click Open Admin UI - a new page will open.
Enter the admin username and password you created when you deployed the new instance and click Authenticate.
Next, set up a new testing org and project scope.
Navigate to the Orgs page and click New Org.
Fill out the new org form with a Name of
recording-test-organd Description ofSession recording test org. Click Save.From within the new org, click New Project.
Fill out the new project form with a Name of
recording-test-projectand Description ofProject for session recording targets. Click Save.
Create a credential store
Credential injection is required to enable session recording. You manage credentials using a Boundary credential store.
Navigate back to the
recording-test-org, and select therecording-test-project.Select the Credential Stores page, and click New.
Enter the Name
SSH and RDP Credentials.Select the type Static, and click Save.
Click the Credentials tab in the new credential store. Click New.
Under the New Credential page, enter the following details for the SSH target credential:
- Name:
openssh-creds - Type:
Username & Password - Username:
ssh-admin - Password:
password
Click Save.
- Name:
Enable session recording
To finish setting up session recording you need to:
- Set up a Boundary storage bucket
- Create an SSH target
- Create an RDP target
The SSH and RDP targets require injected application credentials (supplied from the static credential store), and the Boundary storage bucket they should associate recordings with.
Create a storage bucket
Within Boundary, a storage bucket resource is used to store the recorded sessions. A storage bucket represents a bucket in an external store, in this case, MinIO. You must create a Boundary storage bucket associated with an external store before enabling session recording.
Navigate to the Global scope, and then the Storage Buckets page.
Click New Storage Bucket. Fill out the following details:
- Name:
boundary-recording-bucket - Scope:
recording-test-org - Provider:
MinIO - Endpoint URL:
http://minio:9000 - Bucket name:
boundary-recordingsNote: this must match the name of the bucket in MinIO. - Access key ID:
YOUR_MINIO_ACCESS_KEY_ID - Secret access key:
YOUR_MINIO_SECRET_ACCESS_KEY - Worker filter:
"minio" in "/tags/type"
You copied the
YOUR_MINIO_ACCESS_KEY_IDandYOUR_MINIO_SECRET_ACCESS_KEYvalues from themc admin accesskey createoutput.For the Worker Filter, specify a worker with access to the MinIO storage bucket. For this tutorial, the minio-worker was deployed locally using Docker to access the MinIO server, which is running in a separate container.
Select the worker tagged with
"type" = ["minio", "openssh", "rdp"], which provides access to MinIO. The following filter will select this worker:"minio" in "/tags/type"Lastly, check the box next to Disable credential rotation.
- Name:
Click Save.
If there are errors, double-check the Endpoint URL, Bucket name, Access keys, and Worker filter. If there are still problems, check the Access Key Policy for the MinIO bucket, and ensure the bucket name matches the Resource ARN.
To finish setting up recordings, create a target for the openssh-server container.
Navigate to the recording-test-org scope, and select the
recording-test-projectproject.Select the Targets page and click New.
Fill out the New Target form. Select a Type of SSH.
- Name:
ssh-target - Type:
SSH - Target Address:
openssh-server - Default Port:
2222 - Maximum Connections:
-1 - Aliases:
ssh.target
Click Save.
- Name:
Click the Workers tab. Click Edit worker filter for Egress workers.
An egress worker filter specifies which worker has access to the target, such as a worker deployed in the same network as the target. An ingress worker specifies how to route a Boundary client to the target network, and is not used in this example.
Recall the tags associated with the
minio-worker, which provides access to theopenssh-servercontainer:Tags: Configuration: type: ["minio" "openssh" "rdp"] Canonical: type: ["minio" "openssh" "rdp"]The tags for this worker are:
"type" = ["minio", "openssh", "rdp"]An appropriate filter to select this worker is:
"openssh" in "/tags/type"- Egress worker filter:
"openssh" in "/tags/type"
Paste in the filter expression and click Save.
- Egress worker filter:
Next, add credential injection for the target.
Select the Injected Application Credentials tab for
ssh-target.Click +Add Injected Application Credentials.
Check the box next to the credential named openssh-creds, then click Add Injected Application Credentials.
Enable session recording
To enable session recording for the ssh-target:
Navigate back to the
ssh-targetDetails page.Under Session Recording, click Enable recording.
On the Enable Session Recording for Target page, toggle the switch next to Record sessions for this target.
For the Storage buckets, select the
boundary-recording-bucket.Click Save.
Under the ssh-target Details page, the boundary-recording-bucket should
now be listed under Session Recording.
Record a session
Now you are ready to test session recording for the ssh-target and rdp-target.
To log in to Boundary using the Desktop app, you must gather the BOUNDARY_ADDR
values from the HCP Boundary Admin Console.
Check the value of BOUNDARY_ADDR in the terminal session where Terraform was
applied.
$ echo $BOUNDARY_ADDR
https://d2a6e010-ba05-431a-b7f2-5cbc4e1e9f06.boundary.hashicorp.cloud
Open the Boundary Desktop app.
Enter the Boundary cluster URL (for example,
https://d2a6e010-ba05-431a-b7f2-5cbc4e1e9f06.boundary.hashicorp.cloud) and
click Submit.
Authenticate using your HCP Boundary admin credentials.

On the Targets page, notice the target details for ssh-target.

Click Connect to initiate a session.
The Successfully Connected page displays the target ID (Target Connection details) and Proxy URL.
To start a session, click the Shell tab, or open your terminal or SSH client of choice. You can start a session using SSH and the Proxy URL from the Boundary Desktop app.
If you use your own client, connect on 127.0.0.1 and provide the proxy port using the -p option. Enter yes when prompted to establish a connection.
$ ssh 127.0.0.1 -p 53361 -o NoHostAuthenticationForLocalhost=yes
~ % ssh 127.0.0.1 -p 53361 -o NoHostAuthenticationForLocalhost=yes
Welcome to OpenSSH Server
a7f717a4cee9:~
Type some simple commands you will recognize when playing back the recording, like pwd or whoami. When finished, you can close the connection to the server by entering exit, or you can cancel the session directly from the Boundary Desktop app under the Sessions view.
To test RDP session recording, find the rdp-target on the Targets page and click Connect. The Desktop app displays a proxy port, and may launch your RDP client and connect automatically. You may be prompted to accept a certificate.
If your RDP client doesn't automatically launch, open your RDP client manually (such as Windows App) and connect to 127.0.0.1 using the displayed proxy port. Leave the credentials blank, since Boundary injects them directly into the session.
Perform some actions in the RDP session, then close the RDP client. Then open the Boundary Desktop Client and click the Cancel Session.
View the recordings
You can view a list of all recorded sessions, or if you know the ID of a specific recorded session, you can find any channels associated with that recording.
To play back a session, open the Admin Console Web UI, and re-authenticate as the admin user if necessary.
From the global scope, navigate to the Session Recordings page.
Note that the following details are listed for each recording:
- Time
- Status
- User
- Target
- Duration
Click View next to the recording.
Within the Session Playback page, click Play for Channel 1.
After the recording loads, hover your mouse on the video player and click the play button to start playback.
Note the Channel details on the right, which display the duration and bytes up / bytes down.
Validate the recording (optional)
A session recording represents a directory structure of files in an external object store that together are the recording of a single session between a user and a target.
To validate a session recording and download it, you can use the CLI.
First, set the BOUNDARY_ADDR and BOUNDARY_AUTH_METHOD_ID environment variables in your shell session. Replace the example address and auth method ID with the values for your cluster.
$ export BOUNDARY_ADDR="https://c3a7a20a-f663-40f3-a8e3-1b2f69b36254.boundary.hashicorp.cloud"
$ export BOUNDARY_AUTH_METHOD_ID="ampw_KfLAjMS2CG"
Log in to the CLI as the admin user, providing the admin login name and admin password when prompted.
$ boundary authenticate
Please enter the login name (it will be hidden):
Please enter the password (it will be hidden):
Authentication information:
Account ID: acctpw_kYOiyf8bmM
Auth Method ID: ampw_Vm9CQotObN
Expiration Time: Tue, 11 Aug 2026 16:05:57 MDT
User ID: u_aa6IHWzDZW
The token name "default" was successfully stored in the chosen keyring and is not displayed here.
Verify that the recording exists.
$ boundary session-recordings list -scope-id $ORG_ID
Session Recording information:
ID: sr_mWiWIMI31a
Session ID: s_xZxmb35J2O
Storage Bucket ID: sb_kpUzRj9J4p
Created Time: Wed, 05 Aug 2026 11:39:03 MDT
Updated Time: Wed, 05 Aug 2026 11:39:07 MDT
Start Time: Wed, 05 Aug 2026 11:39:03 MDT
End Time: Wed, 05 Aug 2026 11:39:07 MDT
Type: ssh
State: available
Availability: available
Storage State: synced
Retain Until: Forever
Authorized Actions:
no-op
read
download
delete
reapply-storage-policy
export
export:cancel
Read the recording's details.
$ boundary session-recordings read -id sr_mWiWIMI31a
Session Recording information:
Availability: available
Bytes Down: 92
Bytes Up: 12
Created Time: Wed, 05 Aug 2026 11:39:03 MDT
Duration (Seconds): 3.625892
Endpoint: ssh://openssh-server:2222
ID: sr_mWiWIMI31a
Retain Until: Forever
Scope ID: o_IcIMOX3itH
Session ID: s_xZxmb35J2O
Start Time: Wed, 05 Aug 2026 11:39:03 MDT
State: available
Storage Bucket ID: sb_kpUzRj9J4p
Type: ssh
Updated Time: Wed, 05 Aug 2026 11:39:07 MDT
Recording State:
Storage State: synced
Scope:
ID: o_IcIMOX3itH
Name: recording-test-org
Parent Scope ID: global
Type: org
Authorized Actions:
reapply-storage-policy
no-op
read
download
delete
export
export:cancel
User Info:
Description: Global admin user
ID: u_aa6IHWzDZW
Name: admin
Scope:
ID: global
Name: global
Type: global
Target Info:
Default Port: 2222
Egress Worker Filter: "openssh" in "/tags/type"
ID: tssh_DAg4AkKKmD
Name: ssh-target
Session Connection Limit: -1
Session Max Seconds: 28800
Target Type: ssh
Scope:
ID: p_ZLeNx8ftbC
Name: recording-test-project
Parent Scope ID: o_IcIMOX3itH
Type: project
Credentials:
ID: credup_kSvc0NY2rF
Name: openssh credentials
Purpose: injected_application
Type: username_password
Username: ssh-admin
Credential Store:
ID: csst_jlmy9TT7v9
Name: SSH and RDP Credentials
Scope ID: p_ZLeNx8ftbC
Type: static
Connection Recordings:
Bytes Down: 92
Bytes Up: 12
Created Time: Wed, 05 Aug 2026 11:39:03 MDT
Duration (Seconds): 1.787606
End Time: Wed, 05 Aug 2026 11:39:05 MDT
ID: cr_owFOPmttPM
Start Time: Wed, 05 Aug 2026 11:39:03 MDT
Updated Time: Wed, 05 Aug 2026 11:39:07 MDT
Recording State:
Storage State: synced
Channel Recordings:
Bytes Down: 92
Bytes Up: 12
Created Time: Wed, 05 Aug 2026 11:39:05 MDT
Duration (Seconds): 1.327164
End Time: Wed, 05 Aug 2026 11:39:05 MDT
ID: chr_yhDsU1xJa8
Mime Types: application/x-asciicast
Start Time: Wed, 05 Aug 2026 11:39:04 MDT
Updated Time: Wed, 05 Aug 2026 11:39:07 MDT
Recording State:
Storage State: synced
Note the Channel Recordings, labeled Mime Types: application/x-asciicast (ID chr_yhDsU1xJa8 in this example). Downloading this recording produces a .cast file, which can be played back locally using asciinema.
If you want to download this file, execute the following command:
$ boundary session-recordings download -id chr_yhDsU1xJa8
This command does not print any output. Instead, it writes the recording to a file in the current directory named after the recording ID with a .cast or .webm extension, such as chr_yhDsU1xJa8.cast. Use the -output flag (aliased as -o) to specify a different file, or -output - to write to standard output instead.
BSR files
The Boundary Session Recording (BSR) file defines a hierarchical directory structure of files and a binary file format. It contains all the data transmitted between a user and a target during a single session.
Boundary stores the recordings within the external storage bucket as BSR files.
A BSR connections directory contains a summary of connections, as well as inbound and outbound requests. If you use a multiplexed protocol, there are subdirectories for the channels.
The asciicast format is well suited for the playback of interactive shell activity, but some aspects of the recording cannot be translated into asciicast. For example, if an SSH session uses the RemoteCommand option, or is used to exec a command, the command is not displayed in the asciicast. The output of the command may be displayed, though.
If you use SSH for something other than an interactive shell, such as for file transfer, X11 forwarding, or port forwarding, Boundary does not attempt to create an asciicast.
In all cases, the SSH session is still recorded in the BSR file and you can view the BSR file in the external storage bucket.
Cleanup and teardown
Stop the openssh-server, minio, and boundary-enterprise worker containers.
Open the Docker Desktop app and locate the containers used in this tutorial. These include:
- openssh-server
- minio
- boundary-enterprise-ffmpeg
Click the trash icon next to each, and confirm to stop and remove them.
Alternatively, open a shell session and destroy each container individually:
$ docker rm -f openssh-server minio boundary-workerIf you completed the RDP steps in this tutorial, tear down the Windows RDP target.
Destroy the Vagrant-managed Windows VM. From the directory containing your
Vagrantfile:$ vagrant destroyDestroy the Boundary resources.
From the Admin Console Web UI, destroy the following resources:
- Session recordings
- SSH and RDP targets
- Storage bucket
- Org (also deletes credential store)
- Boundary worker
Orgs cannot be deleted until the session recordings they contain are deleted.
To delete a recording, it must have a storage policy applied that allows deletion. By default, a recording has its retention policy set to
Forever.Create a new session recording retention policy that allows for deletion.
Select the recording-test-org org from the top navigation bar.
Select Storage Policies from the left navigation panel. Click Create a new storage policy.
Fill in the form details:
- Name:
do-not-retain - Description:
delete after 1 day - Retention Policy:
Do not protect, allow deletion at any time - Deletion Policy:
Custom - Delete after:
1days
Click Save.
- Name:
Add the storage policy to the org.
From the left navigation panel, select Org Settings.
Click Add Storage Policy.
From the Add Storage Policy page, select the do-not-retain policy. Click Save.
Re-apply the storage policy to the session recording.
Navigate back to the Global scope and select Session Recordings from the left navigation panel.
Open a recording by clicking on View next to the recording. Under the Manage dropdown, select Re-apply storage policy.
Delete the session recording.
Click the Manage dropdown again, then select Delete recording and confirm the operation by clicking OK.
Follow this process for any remaining recordings.
Delete the SSH and RDP target resources, or disable session recording for them. A storage bucket cannot be deleted if a target is configured to save sessions to it.
Delete the storage bucket.
Navigate to Storage Buckets in the Global scope. Select the test bucket and click the Manage dropdown again, then select Delete and confirm the operation by clicking OK.
Continue deleting the other resources.
Unset the environment variables used in any active terminal windows for this tutorial.
$ unset BOUNDARY_ADDR; \
unset BOUNDARY_AUTH_METHOD_ID; \
unset BOUNDARY_USERNAME; \
unset BOUNDARY_PASSWORD; \
unset MINIO_ADDR; \
unset MINIO_BUCKET_NAME; \
unset MINIO_ACCESS_KEY_ID; \
unset MINIO_SECRET_ACCESS_KEY; \
unset OPENSSH_PASSWORD; \
unset RDP_PASSWORD