You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Adrian Cole <no...@github.com> on 2013/09/29 00:37:57 UTC

[jclouds-labs-openstack] JCLOUDS-306. added public acl to openstack-swift (#28)

Note this does work on HPCS, but doesn&#39;t work on Cloud Files, as they prohibit anonymous reads.  It remains the case that Cloud Files needs a vendor-specific CDN hack in order to expose a container publicly.

Thread from IRC:
```
notmyname
adrianc: FWIW, x-container-read does work AFAIK for granting access to another CF user. it just doesn&#39;t work for public content
notmyname
ie public access non-CDN is specifically detected and prevented
```
You can merge this Pull Request by running:

  git pull https://github.com/adriancole/jclouds-labs-openstack openstack-swift-publicacl

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds-labs-openstack/pull/28

-- Commit Summary --

  * JCLOUDS-306. added public acl to openstack-swift

-- File Changes --

    M openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/SwiftObject.java (47)
    M openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ContainerApi.java (22)
    M openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ObjectApi.java (3)
    M openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/functions/ParseObjectFromResponse.java (5)
    A openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/functions/ParseObjectListFromResponse.java (99)
    M openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ContainerApiLiveTest.java (3)
    M openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ContainerApiMockTest.java (33)
    A openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/CreatePublicContainerLiveTest.java (65)
    M openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ObjectApiLiveTest.java (18)
    M openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ObjectApiMockTest.java (32)

-- Patch Links --

https://github.com/jclouds/jclouds-labs-openstack/pull/28.patch
https://github.com/jclouds/jclouds-labs-openstack/pull/28.diff

Re: [jclouds-labs-openstack] JCLOUDS-306. added public acl to openstack-swift (#28)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #54](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/54/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/28#issuecomment-25310322

Re: [jclouds-labs-openstack] JCLOUDS-306. added public acl to openstack-swift (#28)

Posted by Adrian Cole <no...@github.com>.
cc @ntolia @andrewgaul ^^ no change here wrt RAX, just was hoping there would be!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/28#issuecomment-25310278

Re: [jclouds-labs-openstack] JCLOUDS-306. added public acl to openstack-swift (#28)

Posted by Andrew Phillips <no...@github.com>.
> @@ -61,6 +64,7 @@ public void list() throws Exception {
>  
>     static void checkObject(SwiftObject object) {
>        assertNotNull(object.name());
> +      assertNotNull(object.uri());
>        assertNotNull(object.hash());
>        assertTrue(object.lastModified().getTime() <= System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(5));

Add message?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/28/files#r7235120

Re: [jclouds-labs-openstack] JCLOUDS-306. added public acl to openstack-swift (#28)

Posted by Andrew Phillips <no...@github.com>.
> @@ -107,18 +108,38 @@ public void createIfAbsent() throws Exception {
>  
>        try {
>           SwiftApi api = swiftApi(server.getUrl("/").toString());
> -         assertTrue(api.containerApiInRegion("DFW").createIfAbsent("myContainer"));
> +         assertTrue(api.containerApiInRegion("DFW").createIfAbsent("myContainer", new CreateContainerOptions()));

Add message?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/28/files#r7235116

Re: [jclouds-labs-openstack] JCLOUDS-306. added public acl to openstack-swift (#28)

Posted by Adrian Cole <no...@github.com>.
commit 83a1c202ed42612875c00c1b9bf5a8f8df3a3582
Author: Adrian Cole <ad...@gmail.com>
Date:   Sat Sep 28 15:35:56 2013 -0700

    JCLOUDS-306. added public acl to openstack-swift

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/28#issuecomment-25310639

Re: [jclouds-labs-openstack] JCLOUDS-306. added public acl to openstack-swift (#28)

Posted by Andrew Phillips <no...@github.com>.
>                 "PUT /v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/myContainer HTTP/1.1");
>        } finally {
>           server.shutdown();
>        }
>     }
>  
> +   public void createPublicRead() throws Exception {
> +      MockWebServer server = mockSwiftServer();
> +      server.enqueue(new MockResponse().setBody(access));
> +      server.enqueue(new MockResponse().setResponseCode(201));
> +
> +      try {
> +         SwiftApi api = swiftApi(server.getUrl("/").toString());
> +         assertTrue(api.containerApiInRegion("DFW").createIfAbsent("myContainer", new CreateContainerOptions().publicRead()));

Add message?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/28/files#r7235118

Re: [jclouds-labs-openstack] JCLOUDS-306. added public acl to openstack-swift (#28)

Posted by Andrew Phillips <no...@github.com>.
>        this.name = checkNotNull(name, "name");
> +      this.uri = checkNotNull(uri, "uri of %s", uri);

Should be `checkNotNull(uri, "uri of %s", name);`?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/28/files#r7235112