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.
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
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=
ALLOWED_HOSTS=
ASTRA_TRAFFIC_COLLECTOR_ENDPOINT=
** 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://:) as upstream proxy in your application like postman, burp or curl and then start using your application
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
Unable to pull the image. Error shows something like this: "no matching manifest for linux/arm64/v8". This is a common issue for Mac users.
Solution: use this command to pull the image: docker pull --platform linux/x86_64 getastra/proxy
Please refer here for detailed troubleshooting