[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to fix azure-blob component “Server failed to authenticate the request”


I'm setting up apache-camel in spring boot application. And it is worked
fine for file and ftp consumer/producer. But while trying to use azure-blob
component as consumer the following error appears.

* Server failed to
authenticate the request. Make sure the value of Authorization header is
formed correctly including the signature.*

*My router is*


*public class AzureFileImporter extends RouteBuilder {*


*protected StorageCredentials azureAuth() {*

*return new StorageCredentialsAccountAndKey(*

*    "AccountName",*

*    "PlainAccountKey");*



*public void configure() throws Exception {*

* from("azure-blob:AccountName/ContainerName/blockBlob? *

*  credentials=#azureAuth")*

*    .routeId("azureFileImporter")*

*    .noAutoStartup()*

*    .log("Downloading file ${header.CamelFileName} complete.")*

*    .to("file://input/ftp")*

*    .end();*

* }*


*While using azure-blob component with same account as producer no error is
thrown. But the blob is not uploaded into the storage. Also tried with
Base64 encoding of the key.*

*Versions used:*

*apache-camel : 2.22.1*

*springBootVersion = '2.0.5.RELEASE'*

Link to my stackoverflow question: here