Getting Started
Overview
This integration pairs the Britive Access Broker with Apache Guacamole to deliver clientless, browser-based SSH and RDP sessions that are recorded to video. Britive curates each session — it’s short-lived and the credentials are rotated by the broker — so end users never install tools or copy credentials. Guacamole’s guacd daemon opens the actual RDP/SSH connection and streams it to the browser over WebSocket.
What you’ll accomplish:
- Stand up the Guacamole + broker stack with your chosen deployment method
- Wire the broker checkout routines that mint signed, encrypted Guacamole tokens
- Verify a recorded session end-to-end
How It Works
sequenceDiagram
actor User
participant Britive
participant Guacamole
participant guacd
participant Target as Target Host
participant S3 as Amazon S3
User->>Guacamole: Open web UI in browser
Britive->>Guacamole: Checkout mints signed+encrypted token (encrypt-token.sh)
Guacamole->>guacd: Pass connection params
guacd->>Target: Open RDP/SSH connection
guacd->>guacd: Encode session to WebSocket stream + record to disk
guacd-->>S3: Recording (.guac) optionally converted to .m4v and synced
The connection is made by guacd, not the browser — so guacd must have network access to the target host.
Before You Begin
- The Access Broker is deployed and connected (or use a deployment method below that bundles it)
- Docker, plus AWS CLI for the cloud options
- The
britive-broker-2.0.0.jarfile for the broker container - A Britive tenant subdomain and broker pool token
The Guacamole JSON auth uses a shared JSON_SECRET_KEY. Treat it like any other secret — generate it securely and keep it out of source control.
Choose a Deployment Method
| Method | Best for |
|---|---|
| Docker Compose | Local development, single-host setups |
| CloudFormation | AWS production via declarative IaC |
| ECS Fargate | AWS production via automated script |
The stack runs four services: broker (Access Broker + SSH server), guacd (protocol daemon), guacamole (web UI), and guacenc (converts .guac recordings to .m4v).
Generate a JSON secret key
echo -n "your-passphrase" | md5sum # Linux (use `md5` on macOS)Set the key in the compose file
guacamole:
environment:
JSON_SECRET_KEY: "<your-key>"Set broker config
Edit docker/broker/broker-config.yml with your tenant subdomain and broker token.
Build and start
cd docker/
mkdir -m a+rw recordings
docker build -t broker-docker .
docker compose up -dBroker Checkout Routines
The broker mints a signed, encrypted Guacamole token at checkout. Scripts live in session-recording/broker-scripts:
| Script | Purpose |
|---|---|
checkout-generic.sh | Generic token generator — accepts a full connection JSON |
ssh/checkout-ssh.sh | SSH checkout — creates user, key pair, and token |
rdp/checkout-rdp.ps1 / rdp/checkin-rdp.ps1 | RDP checkout/checkin — temporary local admin user |
ssh/checkout-ec2-ssh.sh / rdp/checkout-ec2-rdp.sh | EC2 variants — pull keys from Secrets Manager |
encrypt-token.sh signs (HMAC-SHA256) and encrypts (AES-128-CBC) the connection JSON into a URL-encoded token:
# Generate a JSON secret key
echo -n "britiveallthethings" | md5 # → fb57d11d533339aea1e37c2a5a1cb92c
# Encrypt a connection token
./encrypt-token.sh fb57d11d533339aea1e37c2a5a1cb92c example_user.json
# Browser opens: https://guacamole.example.com/guacamole?data=<token>A connection JSON sets the protocol, target, credentials, and recording path:
{
"username": "first.last@britive.com",
"expires": "1750000000000",
"connections": {
"my-ssh-session": {
"protocol": "ssh",
"parameters": {
"hostname": "1.2.3.4",
"port": "22",
"username": "ubuntu",
"private-key": "...",
"recording-path": "/recordings",
"recording-name": "${GUAC_DATE}-${GUAC_TIME}-${GUAC_USERNAME}-my-ssh-session"
}
}
}
}Verify
Check out the profile
In My Access, check out the session-recording profile. The response contains a Guacamole URL with a ?data=<token> parameter.
Open the session
Open the URL in a browser. The SSH/RDP session loads in-page — no plugin or client.
Confirm the recording
After the session ends, check the recordings location (/recordings, the EFS mount, or the S3 bucket if GuacSync is enabled). A .guac file (or converted .m4v) is present.
Troubleshoot
| Symptom | Cause | Fix |
|---|---|---|
| Token rejected / blank login | JSON_SECRET_KEY mismatch | The key used by encrypt-token.sh must match the Guacamole container’s JSON_SECRET_KEY |
| Session fails to connect | guacd can’t reach the target | Ensure guacd has network access to the target host’s RDP/SSH port |
| No recording produced | recording-path missing or not writable | Set recording-path in the connection JSON; ensure the directory exists and is writable |
.guac not converted to .m4v | GuacSync not deployed | Enable guacenc (Docker) or --enable-guacsync + --s3-bucket (Fargate) |
| Broker not connected | Bad tenant/token | Verify BRITIVE_TENANT (subdomain only) and BRITIVE_TOKEN |
Next Steps
- Deploy the Access Broker standalone if you aren’t using a bundled method
- Source: britive/onboarding — session-recording