[
https://issues.apache.org/jira/browse/JCLOUDS-1557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17945673#comment-17945673
]
Xavier BOURGOUIN edited comment on JCLOUDS-1557 at 4/18/25 1:29 PM:
--------------------------------------------------------------------
Hi [~gaul], [~davidsloan],
That's probably a long shot for me 5+ years after this ticket is closed but is
there some example somewhere of what would be a working set of
jclouds.properties to use it with Azurite ?
I have an Azurite deployed locally in the most natural fashion, ie:
{code:bash}
docker run -d --rm \
--name azurite \
-p 10000:10000 \
-v azurite-data:/data \
mcr.microsoft.com/azure-storage/azurite:latest
{code}
And somehow I can't manage to find the correct jclouds.properties for it to
work with, it keeps getting HTTP 403 from Azurite:
{code:java}
Caused by: org.jclouds.azure.storage.AzureStorageResponseException: command
[method=org.jclouds.azureblob.AzureBlobClient.public abstract
org.jclouds.azureblob.domain.ListBlobsResponse
org.jclouds.azureblob.AzureBlobClient.listBlobs(java.lang.String,org.jclouds.azureblob.options.ListBlobsOptions[])[other,
[Lorg.jclouds.azureblob.options.ListBlobsOptions;@165fb67c], request=GET
http://127.0.0.1:10000/devstoreaccount1/other?restype=container&comp=list&prefix=distriboxCache/&include=metadata
HTTP/1.1] failed with code 403, error:
AzureError{requestId='6f53a5cf-b3af-4ec7-a298-525f42d7dd86',
code='AuthorizationFailure', message='Server failed to authenticate the
request. Make sure the value of the Authorization header is formed correctly
including the signature.
{code}
Here's the jclouds.properties I have right now (the ones commented out are the
other combinations I tried already but without any luck..):
{code:java}
jclouds.provider = azureblob
jclouds.endpoint=http://127.0.0.1:10000/devstoreaccount1
#jclouds.endpoint=http://127.0.0.1:10000
jclouds.azureblob.account=devstoreaccount1
jclouds.azureblob.credential=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
#jclouds.azureblob.virtual-host-buckets=false
#jclouds.azureblob.auth=azureKey
#jclouds.azureblob.identity=devstoreaccount1
#jclouds.identity=devstoreaccount1
#jclouds.credential=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
{code}
Any clue what I'm missing ?
Aside from the official doc (https://jclouds.apache.org/guides/azure-storage/)
which doesn't really mention the Azurite case, I haven't found much other
resources to help myself ...
Thanks!
was (Author: xbourgouin):
Hi [~gaul], [~davidsloan],
That's probably a long shot for me 5+ years after this ticket is closed but is
there some example somewhere of what would be a working set of
jclouds.properties to use it with Azurite ?
I have an Azurite deployed locally in the most natural fashion, ie:
{code:bash}
docker run -d --rm \
--name azurite \
-p 10000:10000 \
-v azurite-data:/data \
mcr.microsoft.com/azure-storage/azurite:latest
{code}
And somehow I can't manage to find the correct jclouds.properties for it to
work with, it keeps getting HTTP 403 from Azurite:
{code:java}
Caused by: org.jclouds.azure.storage.AzureStorageResponseException: command
[method=org.jclouds.azureblob.AzureBlobClient.public abstract
org.jclouds.azureblob.domain.ListBlobsResponse
org.jclouds.azureblob.AzureBlobClient.listBlobs(java.lang.String,org.jclouds.azureblob.options.ListBlobsOptions[])[other,
[Lorg.jclouds.azureblob.options.ListBlobsOptions;@165fb67c], request=GET
http://127.0.0.1:10000/devstoreaccount1/other?restype=container&comp=list&prefix=distriboxCache/&include=metadata
HTTP/1.1] failed with code 403, error:
AzureError{requestId='6f53a5cf-b3af-4ec7-a298-525f42d7dd86',
code='AuthorizationFailure', message='Server failed to authenticate the
request. Make sure the value of the Authorization header is formed correctly
including the signature.
{code}
Here's the jclouds.properties I have right now (the ones commented out are the
other combinations I tried already but without any luck..):
{code:java}
jclouds.provider = azureblob
jclouds.endpoint=http://127.0.0.1:10000/devstoreaccount1
#jclouds.endpoint=http://127.0.0.1:10000
jclouds.azureblob.account=devstoreaccount1
jclouds.azureblob.credential=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
#jclouds.azureblob.virtual-host-buckets=false
#jclouds.azureblob.auth=azureKey
#jclouds.azureblob.identity=devstoreaccount1
#jclouds.identity=devstoreaccount1
#jclouds.credential=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
{code}
Any clue what I'm missing ?
Thanks!
> Azure Blob Storage: Support for Local Endpoints (eg Azurite)
> ------------------------------------------------------------
>
> Key: JCLOUDS-1557
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1557
> Project: jclouds
> Issue Type: Improvement
> Components: jclouds-blobstore
> Reporter: Dave Sloan
> Assignee: Andrew Gaul
> Priority: Major
> Labels: azureblob
> Fix For: 2.3.0
>
> Time Spent: 2h 40m
> Remaining Estimate: 0h
>
> Azurite provides a local Azure-compatible endpoint for purposes of testing
> without requiring network traffic or incurring costs on Azure.
> Currently while it is possible to define a custom endpoint this is not
> respected.
> In both
> [https://github.com/apache/jclouds/blob/ba1504b38e725c45db304767ac76b2be4b71fd0d/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureBlobRequestSigner.java#L66]
> [https://github.com/apache/jclouds/blob/ca5190636a5fc1ffe48d0d6b8087ad160c0b7d80/providers/azureblob/src/main/java/org/jclouds/azure/storage/filters/SharedKeyLiteAuthentication.java#L95]
>
> The `storageUrl` is hard-coded to the Azure location
> {code:java}
> this.storageUrl = URI.create("https://" + creds.get().identity +
> ".blob.core.windows.net/");
> {code}
>
> This should be made to respect a custom endpoint if configured, e.g.
>
> {code:java}
> BlobStoreContext context = ContextBuilder.newBuilder("azureblob")
> .credentials(storageAccountName, storageAccountKey)
> .endpoint("http://localhost:10000")
> .buildView(BlobStoreContext.class);
> {code}
> In addition, similar to the AWS S3 connector (`enableVirtualHostBuckets`), a
> configurable property should be provided to change the format of the URLs
> used by Azure to include the storage account name in the path.
>
>
> *Azure endpoint URL format (storage account in hostname)*
> [https://devstoreaccount1.blob.core.windows.net/]
>
> *Azurite endpoint URL format (**storage account* *in path)*
> [http://localhost:10000/devstoreaccount1/]
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)