Session recording is a troubleshooting tool that enables you to capture the live traffic i.e. the HTTP requests and HTTP responses from a specified client IP address to an application configured on WAF-As-A-Service. This feature is useful to debug traffic related problems, especially with HTTPS applications.
When configured and started, the Barracuda WAF-as-a-Service enables session recording on all traffic processing instances (Barracuda managed containers or custom containers) that are active for the last 60 seconds and serving traffic to the backend server.
Steps to Configure Session Recording
- Go to the RESOURCES tab.
- In the left panel, scroll down and expand TROUBLESHOOTING.
- Select Session Recording.
- On the Session Recording page, specify values for the following:
- Application: Click the drop-down list and select the application for which you want to capture the sessions.
- Client-IP: Specify the client IP address for which you want to enable the requests/responses to be captured. The session recording captures the requests/responses coming from the specified client IP.
- Port: Specify the port number associated with the client IP.
- Recording Request: Select the checkbox to enable requests to the application to be captured. Set the maximum request size limit to be captured during a session.
Recording Response: Select the checkbox to enable responses to the application to be captured. Set the maximum response size limit to be captured during a session.
- Number of requests to record: Specify the maximum number of requests to be captured during a session.
- Content type to record: Specify the content types that needs to be captured in the requests and/or responses during a session.
- Click Start recording.
After the session recording is stopped, the captured files can be downloaded as follows:
- All files are collected in a ZIP file and the Download option is available in the web interface.
- Custom Container-based deployments: The files are copied to the storage location specified in the environment variables of the deployment definition YAML file.
Use a text editor or an XML parser to open the downloaded file and check the request(s) and response(s) from the client and the server respectively.
Session Recording in Custom Containers
For session recording to work with custom container deployments, storage location (AWS S3 or Azure blob) is a mandatory parameter to be specified as a part of the deployment definition YAML file.
- Follow the steps mentioned in Deploying WAF-as-a-Service Security Module as a Container on On-Premises Kubernetes Cluster to deploy the custom container.
- After Step 6. Download the YAML file, edit the YAML file to include the following:
- Specify the storage location of the custom container in the respective environment variables:
TROUBLESHOOTING_STORAGE_TYPE : "AWS"
TROUBLESHOOTING_AWS_ACCESS_KEY_ID : ""
TROUBLESHOOTING_AWS_SECRET_ACCESS_KEY : "
TROUBLESHOOTING_AWS_BUCKET : ""
TROUBLESHOOTING_STORAGE_TYPE : "AZURE"
TROUBLESHOOTING_AZURE_CONNECTION_STR : ""
TROUBLESHOOTING_AZURE_CONTAINER_NAME : ""
- Specify the storage location of the custom container in the respective environment variables:
- Save and deploy the container.
Storage Environment Variables
To add Azure storage details, specify values for the following environment variables:
TROUBLESHOOTING_STORAGE_TYPE: "AZURE"
- TROUBLESHOOTING_AZURE_CONNECTION_STR: Specify the connection string of the Azure blob storage account.
- TROUBLESHOOTING_AZURE_CONTAINER_NAME: Specify the name of the blob container where you want to upload the session recording files.
To add AWS storage details, specify values for the following environment variables:
TROUBLESHOOTING_STORAGE_TYPE: "AWS"
- TROUBLESHOOTING_AWS_ACCESS_KEY_ID: Specify the AWS access key associated with the Identity and Access Management (IAM) user.
- TROUBLESHOOTING_AWS_SECRET_ACCESS_KEY: Specify the AWS secret access key (password) associated with the access key.
- TROUBLESHOOTING_AWS_BUCKET: Specify the name of the S3 bucket on AWS.
Example for Azure Storage Type
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBhUBXi5ArPcc6YQopxY0lxFEMuJ+jT6p6mKKSdmNoOoHsjxCP8fh5vVl4KIKfpZCi
MM0jlX+5cYM+SyjzG5wwoDvBWRGWw+jFQBQ/VSECgYBLJdTV6lVMeELrwdUPFrPL
H9sqT5UU24Ky/Xzpwk7CGVXIqCP0yBXwG7V1j6wtm4kPzOOGxJZp4sPUL+InfbqW
-----END RSA PRIVATE KEY-----
#BARRACUDA_SERVER_CA: NONE
DEVICEHUB_AUTH_KEY : “secret_key”
TROUBLESHOOTING_STORAGE_TYPE : “AZURE”
TROUBLESHOOTING_AZURE_CONTAINER_NAME : “container1”
TROUBLESHOOTING_AZURE_CONNECTION_STR : “DefaultEndpointsProtocol=https;AccountName=containername;AccountKey=ABCD1234ghjk===/MS.net”
Example for AWS Storage Type
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBhUBXi5ArPcc6YQopxY0lxFEMuJ+jT6p6mKKSdmNoOoHsjxCP8fh5vVl4KIKfpZCi
MM0jlX+5cYM+SyjzG5wwoDvBWRGWw+jFQBQ/VSECgYBLJdTV6lVMeELrwdUPFrPL
H9sqT5UU24Ky/Xzpwk7CGVXIqCP0yBXwG7V1j6wtm4kPzOOGxJZp4sPUL+InfbqW
-----END RSA PRIVATE KEY-----
#BARRACUDA_SERVER_CA: NONE
DEVICEHUB_AUTH_KEY : “secret_key”
TROUBLESHOOTING_STORAGE_TYPE : “AWS”
TROUBLESHOOTING_AWS_ACCESS_KEY_ID : “DEFJKLOUYHGBGNMJ”
TROUBLESHOOTING_AWS_SECRET_ACCESS_KEY : “KLJYTR6OLPIJUxcd8ZSDEregM”
TROUBLESHOOTING_AWS_BUCKET : “bucket1”