Articles on: API Endpoints

How to setup Astra Proxy Service Integration

Here's how to configure Astra Proxy Service to capture the HTTP traffic for Postman/Burp/Curl. It also covers troubleshooting common issues encountered during configuration.



Astra Proxy integration



Quick Installation



SSH into the VM or developer box where proxy should be hosted.

Pre-requisite

Install Docker in your VM by following the official doc

Download astra-cli from repository

For linux-amd64 and for linux-arm64
For windows-amd64 and for windows-arm64
For mac-amd64 and for mac-arm64

Create an environment file called as proxyEnv.env and fill below contents

Replace < sensorID> with integration ID displayed for your astra-proxy-service integration page in UI.
Replace < allowed_hosts> with comma(,) separated list of FQDNs. Minimum one, maximum five entries can be given as comma separated FQDNs.
Replace < host:port> with address of the astra-traffic-collector

SENSOR_ID=<sensorID>
ALLOWED_HOSTS=<allowed_hosts>
ASTRA_TRAFFIC_COLLECTOR_ENDPOINT=<host:port>


Run the following to start astra-proxy-service

For linux:

Rename the downloaded binary to astra-cli
chmod +x astra-cli
./astra-cli proxy quickstart --listen-port 8181 --env-file proxyEnv.env


For Windows:

Rename the downloaded binary to astra-cli
./astra-cli.exe proxy quickstart --listen-port 8181 --env-file proxyEnv.env


For Mac:

Rename the downloaded binary to astra-cli
./astra-cli proxy quickstart --listen-port 8181 --env-file proxyEnv.env


To check the status of astra-proxy-service, exec below command

For linux:
./astra-cli proxy status


For Windows:

./astra-cli.exe proxy status


For Mac:
./astra-cli proxy status


Set the http proxy address of astra-proxy-service (http://<proxyHost>:<proxyPort>) as upstream proxy in your application like postman, burp or curl and then start using your application




Upgrade



Docker container upgrade


This process updates the docker container to a new version of the astra-proxy-service.

Change directory to the place where astra-cli executable is downloaded

Run below command
./astra-cli proxy upgrade


Upon successfull image pull, run this to stop the current container and subsequently remove it
./astra-cli proxy stop
./astra-cli proxy remove


Restart the container with newly pulled image
./astra-cli proxy quickstart --listen-port 8181 --env-file proxyEnv





Troubleshooting



Please refer here for detailed troubleshooting

Updated on: 20/01/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!