Git Product home page Git Product logo

Comments (5)

afranken avatar afranken commented on July 22, 2024 1

ah!
looking at the API again, it seems like you're specifying a "canned ACL":
https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#CannedACL
this is indeed currently not supported.

from s3mock.

mkleint avatar mkleint commented on July 22, 2024 1

great, thank you. works perfectly now

from s3mock.

afranken avatar afranken commented on July 22, 2024

@mkleint does the code above work against S3?

The API clearly states:


The request accepts the following data in XML format.

[AccessControlPolicy](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectAcl.html#API_PutObjectAcl_RequestSyntax)

    Root level tag for the AccessControlPolicy parameters.

    Required: Yes

https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectAcl.html

So the request should fail on S3 as well.

from s3mock.

mkleint avatar mkleint commented on July 22, 2024

The old code I'm migrating was using java aws client v2 with following code

                                for (val o : s3ObjectList.contents()) {
                                    // update object ACL
                                    s3.putObjectAcl(PutObjectAclRequest.builder()
                                            .bucket(bucket)
                                            .key(o.key())
                                            .acl("bucket-owner-full-control")
                                            .build());
                                }

I assume it works, as we running that in production. unfortunately that old code is not using s3mock in CI to test.

the new code we creating now is doing the same and I've tried to add component test to verify in CI. I've tried to create the aws cli equivalent to test against the s3mock and to report as issue. No idea if the java client is adding some kind of dummy request body or not.

from s3mock.

afranken avatar afranken commented on July 22, 2024

@mkleint I just released 3.5.1 that supports canned ACLs.

from s3mock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.