Search code examples
amazon-web-servicessonicwall

Site to Site connection between SonicWall and AWS - IAM Policy


I'm trying to set up a Site to Site connection between our on-premise server and our cloud infrastructure. In our premises we have a SonicWall firewall installed and, since SonicOS 6.5.1.0 it's now easy to put an AWS access key and AWS Secret Key and let the software configure everything via SDK.

The problem is that the tutorial on how to configure the firewall (p. 8) says:

The security policy used, either for a group to which the user belongs or attached to the user directly, must include the following permissions:

• AmazonEC2FullAccess – For AWS Objects and AWS VPN

• CloudWatchLogsFullAccess – For AWS Logs

Since it's not ideal to give anyone the full access to Amazon EC2 do you know which features SonicWall actually needs so I can disable everything else and follow the principle of least privilege?


Solution

  • Without looking into the code for SonicWall itself, it is not going to be easy to know exactly which API calls it's going to make to EC2. If you are prepared to at least temporarily grant full EC2 access, you could use AWS CloudTrail to monitor exactly which API calls are being made by the IAM user associated with your on-premises server, and then update your specific policy to match those calls.

    Alternatively, start with the full access IAM policy template and go through and deny any calls you think are completely unrelated to SonicWall's functionality.

    If you trust SonicWall then probably the easiest thing to do is to just allow the full EC2 access it claims is required (or start there and gradually remove them until something breaks!)