Transfer Server is publicly exposed
Description
By ensuring that your Azure Transfer Server is not public, you can help protect your data from unauthorized access or tampering. Public Azure Transfer Servers are accessible over the internet, which can make them vulnerable to external threats such as hackers or malware. By making it private, you can help ensure that only authorized users can access the data.
Fix - Buildtime
Terraform
- Resource: aws_transfer_server
- Argument: endpoint_type
```go aws_s3_bucket.test.tf resource "aws_transfer_server" "test" { + endpoint_type = "VPC" protocols = ["SFTP"] }
## CloudFormation
- **Resource:** AWS::Transfer::Server
- **Argument:** Properties.EndpointType
```yaml
Resources:
VPC:
Type: AWS::Transfer::Server
Properties:
...
+ EndpointType: "VPC" # or "VPC_ENDPOINT"