OSS bucket IP restriction disabled 이 페이지는 아직 한국어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우
언제든지 연락주시기 바랍니다. Id: terraform-alicloud-oss-bucket-ip-restriction-disabled
Provider: Alicloud
Platform: Terraform
Severity: High
Category: Networking and Firewall
Learn More Description OSS bucket policies should restrict access by IP address.
This rule checks the policy attribute of alicloud_oss_bucket resources for statements that include a Condition with acs:SourceIp.
Resources without an IP restriction in their policy are reported.
Compliant Code Examples resource "alicloud_oss_bucket" "bucket-securetransport2" {
policy = <<POLICY
{
"Version": "1",
"Statement":
[
{
"Effect": "Deny",
"Action":
[
"oss:RestoreObject",
"oss:ListObjects",
"oss:AbortMultipartUpload",
"oss:PutObjectAcl",
"oss:GetObjectAcl",
"oss:ListParts",
"oss:DeleteObject",
"oss:PutObject",
"oss:GetObject",
"oss:GetVodPlaylist",
"oss:PostVodPlaylist",
"oss:PublishRtmpStream",
"oss:ListObjectVersions",
"oss:GetObjectVersion",
"oss:GetObjectVersionAcl",
"oss:RestoreObjectVersion"
],
"Principal":
[
"*"
],
"Resource":
[
"acs:oss:*:0000111122223334:af/*"
],
"Condition":
{
"IpAdress":
{
"acs:SourceIp": "10.0.0.0"
}
}
}
]
}
POLICY
}
resource "alicloud_oss_bucket" "bucket-securetransport2" {
policy = <<POLICY
{
"Version": "1",
"Statement":
[
{
"Effect": "Deny",
"Action":
[
"oss:RestoreObject",
"oss:ListObjects",
"oss:AbortMultipartUpload",
"oss:PutObjectAcl",
"oss:GetObjectAcl",
"oss:ListParts",
"oss:DeleteObject",
"oss:PutObject",
"oss:GetObject",
"oss:GetVodPlaylist",
"oss:PostVodPlaylist",
"oss:PublishRtmpStream",
"oss:ListObjectVersions",
"oss:GetObjectVersion",
"oss:GetObjectVersionAcl",
"oss:RestoreObjectVersion"
],
"Principal":
[
"*"
],
"Resource":
[
"acs:oss:*:0000111122223334:af/*"
],
"Condition":
{
"NotIpAdress":
{
"acs:SourceIp": "10.0.0.0"
}
}
}
]
}
POLICY
}
Non-Compliant Code Examples resource "alicloud_oss_bucket" "bucket-policy" {
bucket = "bucket-170309-policy"
acl = "private"
policy = <<POLICY
{"Statement":
[{"Action":
["oss:PutObject", "oss:GetObject", "oss:DeleteBucket"],
"Effect":"Allow",
"Resource":
["acs:oss:*:*:*"]}],
"Version":"1"}
POLICY
}