Boundary Enterprise RDP Session Recording Lab
This HashiCorp sandbox is designed to accompany the HashiConf at TechXchange hands-on lab. The sandbox is an interactive environments where you can experiment with HashiCorp products without installation or setup.
You can use the sandboxes to:
- Learn how products work in a real environment.
- Test configurations and commands without affecting your systems.
- Explore product features in a safe sandbox.
- Follow along with tutorials and documentation.
Lab overview
This lab walks you through enabling RDP session recording for a Windows Server target using Boundary Enterprise.
The sandbox ships with a working SSH session recording configuration you can use as a reference. Your job is to build the equivalent for RDP:
- Create a static credential for the Windows domain account.
- Create an RDP target that injects that credential and records the session.
- Connect to the target and play the recording back.
- Create a storage policy so the recording can be deleted.
A bonus exercise replaces the static credential with dynamic Active Directory credentials generated by Vault's LDAP secrets engine.
These exercises are also available in the sandbox's /home/learner/get-started/exercises/ directory.
Select an exercise tab to view each exercise.
Connect to a Boundary target
What is a Boundary target?
Targets are a Boundary resource that represent a networked service or host that a user can connect to. Targets provide an endpoint with an associated set of permissions for establishing a session. Targets need to be associated with a host to establish a connection.
For example, in the sandbox the following hosts exist:
ubuntu-host, at addressubuntu-hostwindows, at addresswindows-dc
Functionally, a host provides the address where a session should be attempted.
Targets provide further connection details, such as the protocol and port the connection should use. In this sandbox, two examples of targets are ubuntu-target-tcp and northwind-db. Both these targets are for services running on the ubuntu-host machine.
The database target connects on port 5432, while ubuntu-target-tcp sets port 22 as the default port to enable SSH connections.
Boundary Enterprise adds two more target types that support credential injection and session recording: ssh and rdp. The ssh-recording-target-priya target is a preconfigured example of the first. You will build an rdp target yourself in exercise 3.
The following Boundary users are preconfigured for SSH access on the ubuntu-host host:
Priya:
- username:
priya - password:
priya_password
- username:
Oliver:
- username:
oliver - password:
oliver_password
- username:
Khalid:
- username:
khalid - The password for this user is contained in a Vault credential
- username:
A postgres database is also configured on the ubuntu-host host and is available on port 5432:
- Database:
- name:
northwind - username:
postgres - password:
postgres
- name:
The windows-dc host is a Windows Server instance configured as an Active Directory domain controller for the instruqt.local domain. RDP is configured to allow password access for a static domain account:
- DomainUser:
- username:
DomainUser - password:
DomainP@ssw0rd!!! - domain:
instruqt.local
- username:
The domain controller also hosts a vault-users group that Vault's LDAP secrets engine uses to create and destroy short-lived domain accounts. You can review the domain configuration in the C:\ldif_examples directory on the Windows server.
Access the Boundary Admin UI
You can log in to the Boundary Admin UI in the Boundary Admin UI tab.
To log into the Boundary Admin UI, use the following credentials for the admin user:
- Username:
admin - Password:
password
Or log in as the unprivileged user:
- Username:
user - Password:
password
Within Boundary the following resources are configured:
Org:
sandbox orgProject:
sandbox projectHost Catalogs:
Host Sets:
Credential Stores:
ubuntu-host-creds(static)vault-credentials(Vault)
Targets:
boundary-db(Boundary's local database)northwind-db(on the ubuntu-host host)ubuntu-target-tcp(on the ubuntu-host host)ssh-recording-target-priya(on the ubuntu-host host)
Aliases:
Storage bucket:
recording-test-bucket, backed by the MinIO server
Notice that the windows-host-catalog and windows-host-set exist, but no RDP target uses them yet. That is the gap you will close in this lab.
You can access these targets from the Boundary workstation by configuring the CLI. Targets can also be accessed using the Boundary Desktop Client, which is installed on the workstation desktop.
CLI Access
The shell in the Workstation tab has the Boundary, Vault, and Terraform CLI tools installed.
The following environment variables have been set:
You can log into Boundary from the CLI using the admin credentials:
- Username:
admin - Password:
password
$ boundary authenticate
Please enter the login name (it will be hidden):
Please enter the password (it will be hidden):
Authentication information:
Account ID: acctpw_sC5a4GP9JA
Auth Method ID: ampw_CzkwJb5RRR
Expiration Time: Thu, 03 Apr 2025 01:36:55 UTC
User ID: u_UURrzGLCik
The token name "default" was successfully stored in the chosen keyring and is not displayed here.
Exercise:
Connect to a target using the CLI
After authentication, you can connect to targets using the boundary connect command.
Connect to the northwind database on the ubuntu-host host:
$ boundary connect postgres northwind
Credentials are being brokered but no -dbname parameter provided. psql may misinterpret another parameter as the database name.
psql (16.8 (Ubuntu 16.8-0ubuntu0.24.04.1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)
Type "help" for help.
postgres=#
When you connect to the ubuntu-target alias it will display the available brokered credentials for the oliver and priya users, and automatically select one of them to log you in as. Copy and paste or type the user's password to connect:
$ boundary connect ssh ubuntu-target
Credentials:
Credential Source Description: Credentials for oliver user on ubuntu-host host
Credential Source ID: credup_XuqoTfBGrj
Credential Source Name: oliver-creds
Credential Store ID: csst_iHuwhwzstA
Credential Store Type: static
Credential Type: username_password
Secret:
password: oliver_password
username: oliver
Credential Source Description: Credentials for priya user on ubuntu-host host
Credential Source ID: credup_po69wMQRNN
Credential Source Name: priya-creds
Credential Store ID: csst_iHuwhwzstA
Credential Store Type: static
Credential Type: username_password
Secret:
password: priya_password
username: priya
The authenticity of host 'hst_hi2n8ghvx8 ([127.0.0.1]:45223)' can't be established.
ED25519 key fingerprint is SHA256:kCPyzCG/O2ckQ5zvoxT1O9NTgNz+KNnTf+fDildd0QI.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'hst_hi2n8ghvx8' (ED25519) to the list of known hosts.
oliver@hst_hi2n8ghvx8's password:
oliver@ubuntu-host$
Select a user to authenticate as by passing additional login parameters to
boundary connect ssh:
$ boundary connect ssh ubuntu-target -username priya
priya@hst_hi2n8ghvx8's password:
priya@ubuntu-host$
Connect using the Boundary Desktop Client
The Boundary Desktop Client is installed on the workstation's desktop. You will use it later to open sessions to the RDP target you build, so it is worth getting familiar with it now.
Open the Workstation desktop tab. This tab serves an XFCE desktop running on the Boundary workstation, and hosts both the Boundary Desktop Client and the Remmina RDP client.
Launch the Boundary Desktop Client from the desktop.
Find your controller's public URL in the /home/learner/get-started/public-controller-address file on the workstation, then paste it into the Desktop Client when prompted.
Authenticate to Boundary using the admin user credentials:
- Username:
admin - Password:
password
Click the Connect button next to a target, such as ssh-recording-target-priya.
From the sessions page, click the Shell tab. This will automatically launch the built-in terminal and attempt to open a session.
You should find a running session on the Sessions page. Try terminating the session from here. Because session recording is enabled for ssh-recording-target-priya, verify that a recording was created on the Session Recordings page of the Admin UI.
Compare user permissions
Log out of the Boundary Desktop Client by clicking on the admin user dropdown and clicking Sign Out.
On the Sign In page, click the Choose a different scope dropdown and select sandbox org.
Log back in as the unprivileged user:
- Org:
sandbox org - Username:
user - Password:
password
What do you notice about this user's permissions? Do you have access to the same set of targets and hosts?
You can learn more about grants and permissions in Boundary in the Permissions in Boundary docs.
Resources
You can experiment with the Boundary Enterprise sandbox to learn in a practical way by following examples from tutorials and documentation.
Here are some suggestions for tutorials and documentation content you can explore with the Boundary Enterprise sandbox.
- Learn how to enable session recording with S3-compatible storage
- Learn how to enable session recording with AWS and Vault
- Review the session recording domain model
- Learn how to manage recorded sessions
- Discover how to integrate Vault with Boundary
- Learn about the Vault LDAP secrets engine
- Learn how to manage Self-managed Boundary resources
- Learn how to use Dynamic host catalogs on AWS
- Learn how to set up OIDC authentication with Auth0
- Learn how to manage workers
- Become familiar with the Boundary CLI commands
- Discover how to Troubleshoot Boundary: Common error messages