Azure Blob strange request sequence

16 views
Skip to first unread message

Rustam Aliyev

unread,
Apr 15, 2013, 8:34:00 PM4/15/13
to jcl...@googlegroups.com
Hi,

I'm using Azure Blob through proxy and when fetching blob I see 2 requests:

1. GET /container/blob --> Blob contents
2. GET /container?restype=container&comp=acl -> Container ACL

First request is successfully passed by proxy and correct response
received 200 + body.
The problem is that authentication for the second request (ACL) fails. I
can see that all required parameters are passed by proxy.

In any case, does anyone know why jclouds retreives container metadata
after retreiving blob? In the code I'm only doing putBlob(...).


Many thanks,
Rustam.

Rustam Aliyev

unread,
Apr 17, 2013, 7:30:47 PM4/17/13
to jcl...@googlegroups.com
After digging a bit in the code I found where ACLs are checked from:

https://github.com/jclouds/jclouds/blob/master/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/functions/BlobPropertiesToBlobMetadata.java#L66

...
BlobPropertiesToBlobMetadata.apply(BlobProperties) line: 66
AzureBlobToBlob.apply(AzureBlob) line: 49
AzureBlobStore.getBlob(String, String, GetOptions) line: 180
AzureBlobStore(BaseBlobStore).getBlob(String, String) line: 183
...

Does it mean that jclouds checks container ACL and applies it to blob
(in case if not private) after each GET? I'm not sure I understand
reason for that. Can someone explain?

-
Rustam.

Adrian Cole

unread,
Apr 17, 2013, 7:41:12 PM4/17/13
to jcl...@googlegroups.com, jclou...@googlegroups.com
The reason is that when ACL support was made available, not all BlobStores supported blob-level acls.  In fact CloudFiles didn't support it at all.  For this reason, to support public acls, we made a flag at container level.  As ACL metadata doesn't usually come back in headers, this implies looking up a container ACL lazy as you are noticing.

Years have passed.  Swift now supports ACLs, so we can do object-level for blobstores (including hpcloud and swift, which currently emulate public ACLs via CDN).  Moreover, we could allow for disabling of ACL lookup.

So, that is the history, and this moving away from that would be a nice one for when we enter the incubator.. nudge nudge :)


-A


--
You received this message because you are subscribed to the Google Groups "jclouds" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jclouds+unsubscribe@googlegroups.com.
To post to this group, send email to jcl...@googlegroups.com.
Visit this group at http://groups.google.com/group/jclouds?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



Rustam Aliyev

unread,
Apr 17, 2013, 8:05:45 PM4/17/13
to jcl...@googlegroups.com
Hi Adrian,

Thanks for clarification. Disabling of ACL lookups would be good - as we know requests are not free.

- Rustam
To unsubscribe from this group and stop receiving emails from it, send an email to jclouds+u...@googlegroups.com.

To post to this group, send email to jcl...@googlegroups.com.
Visit this group at http://groups.google.com/group/jclouds?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "jclouds" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jclouds+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages