forked from TrueCloudLab/frostfs-s3-gw
[#603] Fix GetBucketPolicyStatus case sensitivity
According to the AWS documentation (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html), the `IsPublic` tag value should be in uppercase. However, the `aws-cli` utility interprets such responses as always `false`. To avoid incorrect interpretation, we now return the tag value in lowercase. Signed-off-by: Aleksey Kravchenko <al.kravchenko@yadro.com>
This commit is contained in:
parent
9edec7d573
commit
d85e5b10bb
1 changed files with 5 additions and 2 deletions
|
@ -67,9 +67,12 @@ type PolicyStatus struct {
|
||||||
|
|
||||||
type PolicyStatusIsPublic string
|
type PolicyStatusIsPublic string
|
||||||
|
|
||||||
|
// According to the AWS documentation (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html),
|
||||||
|
// the `IsPublic` tag value should be in uppercase. However, the `aws-cli` utility interprets such responses
|
||||||
|
// as always `false`. To avoid incorrect interpretation, we return the tag value in lowercase.
|
||||||
const (
|
const (
|
||||||
PolicyStatusIsPublicFalse = "FALSE"
|
PolicyStatusIsPublicFalse = "false"
|
||||||
PolicyStatusIsPublicTrue = "TRUE"
|
PolicyStatusIsPublicTrue = "true"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AccessControlPolicy contains ACL.
|
// AccessControlPolicy contains ACL.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue