From 619611933a6c5d634a08eac8d06e344ab46452c6 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sun, 31 Mar 2019 08:42:43 -0700 Subject: [PATCH] Remove policy nesting errors (#7449) Policy nesting has been supported for a while now, we should remove references of code and docs indicating nesting is not allowed anymore. --- cmd/api-errors.go | 6 ------ cmd/object-api-errors.go | 7 ------- cmd/web-handlers.go | 2 -- docs/bucket/policy/README.md | 39 ------------------------------------ 4 files changed, 54 deletions(-) delete mode 100644 docs/bucket/policy/README.md diff --git a/cmd/api-errors.go b/cmd/api-errors.go index 47c8879fd..a8a9a822a 100644 --- a/cmd/api-errors.go +++ b/cmd/api-errors.go @@ -184,7 +184,6 @@ const ( ErrStorageFull ErrRequestBodyParse ErrObjectExistsAsDirectory - ErrPolicyNesting ErrInvalidObjectName ErrInvalidResourceName ErrServerNotInitialized @@ -884,11 +883,6 @@ var errorCodes = errorCodeMap{ Description: "Multiple disks failures, unable to write data.", HTTPStatusCode: http.StatusServiceUnavailable, }, - ErrPolicyNesting: { - Code: "XMinioPolicyNesting", - Description: "New bucket policy conflicts with an existing policy. Please try again with new prefix.", - HTTPStatusCode: http.StatusConflict, - }, ErrInvalidObjectName: { Code: "XMinioInvalidObjectName", Description: "Object name contains unsupported characters.", diff --git a/cmd/object-api-errors.go b/cmd/object-api-errors.go index d148299f6..225ca06d9 100644 --- a/cmd/object-api-errors.go +++ b/cmd/object-api-errors.go @@ -372,13 +372,6 @@ func (e NotImplemented) Error() string { return "Not Implemented" } -// PolicyNesting - policy nesting conflict. -type PolicyNesting struct{} - -func (e PolicyNesting) Error() string { - return "New bucket policy conflicts with an existing policy. Please try again with new prefix." -} - // UnsupportedMetadata - unsupported metadata type UnsupportedMetadata struct{} diff --git a/cmd/web-handlers.go b/cmd/web-handlers.go index f04e49729..6cdd16f2b 100644 --- a/cmd/web-handlers.go +++ b/cmd/web-handlers.go @@ -1840,8 +1840,6 @@ func toWebAPIError(err error) APIError { return getAPIError(ErrWriteQuorum) case InsufficientReadQuorum: return getAPIError(ErrReadQuorum) - case PolicyNesting: - return getAPIError(ErrPolicyNesting) case NotImplemented: return APIError{ Code: "NotImplemented", diff --git a/docs/bucket/policy/README.md b/docs/bucket/policy/README.md deleted file mode 100644 index abb1c98bf..000000000 --- a/docs/bucket/policy/README.md +++ /dev/null @@ -1,39 +0,0 @@ -## Access Policy - -This package implements parsing and validating bucket access policies based on Access Policy Language specification - http://docs.aws.amazon.com/AmazonS3/latest/dev/access-policy-language-overview.html - -### Supports following effects. - - Allow - Deny - -### Supports following set of operations. - - s3:GetObject - s3:ListBucket - s3:PutObject - s3:GetBucketLocation - s3:DeleteObject - s3:AbortMultipartUpload - s3:ListBucketMultipartUploads - s3:ListMultipartUploadParts - -### Supports following conditions. - - StringEquals - StringNotEquals - StringLike - StringNotLike - IpAddress - NotIpAddress - -Supported applicable condition keys for each conditions. - - s3:prefix - s3:max-keys - aws:Referer - aws:SourceIp - -### Nested policy support. - -Nested policies are not allowed.