bucket-policy: Add IPAddress/NotIPAddress conditions support (#4736)

This commit is contained in:
Aaron Walker
2017-08-05 04:00:05 -04:00
committed by Harshavardhana
parent aeafe668d8
commit 5db533c024
9 changed files with 239 additions and 10 deletions

View File

@@ -126,8 +126,9 @@ func checkRequestAuthType(r *http.Request, bucket, policyAction, region string)
if reqAuthType == authTypeAnonymous && policyAction != "" {
// http://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html
sourceIP := getSourceIPAddress(r)
return enforceBucketPolicy(bucket, policyAction, r.URL.Path,
r.Referer(), r.URL.Query())
r.Referer(), sourceIP, r.URL.Query())
}
// By default return ErrAccessDenied