# Azure Repository - Proxy Authentication

**URL:** <https://discuss.elastic.co/t/azure-repository-proxy-authentication/218018>\
**Category:** Elasticsearch\
**Created:** [February 5, 2020, 3:43pm UTC](https://discuss.elastic.co/t/azure-repository-proxy-authentication/218018 "2020-02-05T15:43:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aikon](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@aikon](https://discuss.elastic.co/u/aikon)\
**Post date:** [February 5, 2020, 3:43pm UTC](https://discuss.elastic.co/t/azure-repository-proxy-authentication/218018/1 "2020-02-05T15:43:14Z")

</div>

Dear all,  
I'm running Elasticsearc 7.3.0 on Windows machines (4 nodes) and I installed the Azure Cloud Plugin on all nodes to manage snapshots in blob containers. I followed the instractions on the Elastic documentation and everything works properly.  
The problem comes when I enable the proxy (that requires authentication) on all windows machines. In order to get the plugin working, I added (as by documentation), the following details in the elasticsearch.yml file of each node:

[//azure.client.default.proxy.host](https://azure.client.default.proxy.host): host\_address  
[//azure.client.default.proxy.port](https://azure.client.default.proxy.port): port\_number  
[//azure.client.default.proxy.type](https://azure.client.default.proxy.type): http

When I start the nodes and try to get the list of the snapshots in the blob container, I get the following error:

{  
"error": {  
"root\_cause": [  
{  
"type": "storage\_exception",  
"reason": "storage\_exception: Proxy Authentication Required"  
}  
],  
"type": "no\_such\_element\_exception",  
"reason": "no\_such\_element\_exception: An error occurred while enumerating the result, check the original exception for details.",  
"caused\_by": {  
"type": "storage\_exception",  
"reason": "storage\_exception: Proxy Authentication Required",  
"caused\_by": {  
"type": "null\_pointer\_exception",  
"reason": null  
}  
}  
},  
"status": 500  
}

I also tried to store the following information in the elasticsearch key store:

[//azure.client.default.proxy.username](https://azure.client.default.proxy.username)  
[//azure.client.default.proxy.password](https://azure.client.default.proxy.password)

but the nodes don't even start and I get the following error:

[//java.lang.IllegalArgumentException](https://java.lang.IllegalArgumentException): unknown secure setting [azure.client.default.proxy.password]

So the question is, how do I tell to elasticsearch to use username and password to be authenticated by the proxy?

---

<div class="post-metadata">

**Author:** ![Armin\_Braun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/armin_braun/32/20092_2.png) [@Armin\_Braun](https://discuss.elastic.co/u/Armin_Braun)\
**Post date:** [February 5, 2020, 4:19pm UTC](https://discuss.elastic.co/t/azure-repository-proxy-authentication/218018/2 "2020-02-05T16:19:23Z")

</div>

Hi @aikon

I'm afraid the Azure repository plugin does not yet have support for authenticated proxies.  
You could try to set the following system properties to override the default Java http connection proxy auth though. Disclaimer: I have not tested this, but it seems somewhat likely that it will work.

```auto
-Dhttp.proxyUser=someUserName
-Dhttp.proxyPassword=somePassword

```

I created an issue in the ES repo to add proxy authentication to the Azure plugin natively here:

> <https://github.com/elastic/elasticsearch/issues/51952>
>
> Currently Azure repositories only allow setting up the proxy type, host and port but there is no way to configure credentials...

---

<div class="post-metadata">

**Author:** ![aikon](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@aikon](https://discuss.elastic.co/u/aikon)\
**Post date:** [February 5, 2020, 5:26pm UTC](https://discuss.elastic.co/t/azure-repository-proxy-authentication/218018/3 "2020-02-05T17:26:51Z")

</div>

> [@Armin\_Braun](#):
>
> Hi @aikon
> 
> I'm afraid the Azure repository plugin does not yet have support for authenticated proxies.  
> You could try to set the following system properties to override the default Java http connection proxy auth though. Disclaimer: I have not tested this, but it seems somewhat likely that it will work.
> 
> ```auto
> -Dhttp.proxyUser=someUserName
> -Dhttp.proxyPassword=somePassword
> 
> ```

Hi @Armin_Braun  
following your suggestion I've added those two system properties accessing to the elasticsearch-service.bat manager dialog in the Java Options area for all nodes and restarted them.  
However I still get the same error : Proxy Authentication Required.  
Am I missing something?  
Many thanks for your time

P.S.

> [@Armin\_Braun](#):
>
> I created an issue in the ES repo to add proxy authentication to the Azure plugin natively here:

That was really a great idea! Thanks.

---

<div class="post-metadata">

**Author:** ![Armin\_Braun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/armin_braun/32/20092_2.png) [@Armin\_Braun](https://discuss.elastic.co/u/Armin_Braun)\
**Post date:** [February 5, 2020, 5:30pm UTC](https://discuss.elastic.co/t/azure-repository-proxy-authentication/218018/4 "2020-02-05T17:30:51Z")

</div>

> [@aikon](#):
>
> Many thanks for your time

No problem 🙂 Thanks for raising this issue.

> [@aikon](#):
>
> Am I missing something?

If those Java opts show up for the `jvm` in the [nodes api](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html) then I'm afraid you're not missing anything and the workaround doesn't work ☹ sorry.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 4, 2020, 5:30pm UTC](https://discuss.elastic.co/t/azure-repository-proxy-authentication/218018/5 "2020-03-04T17:30:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
