{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/17046","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/17046/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/17046/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/17046/events","html_url":"https://github.com/elastic/elasticsearch/issues/17046","id":139857497,"number":17046,"title":"Add basic auth support for proxies in the plugin manager","user":{"login":"clintongormley","id":56599,"avatar_url":"https://avatars.githubusercontent.com/u/56599?v=3","gravatar_id":"","url":"https://api.github.com/users/clintongormley","html_url":"https://github.com/clintongormley","followers_url":"https://api.github.com/users/clintongormley/followers","following_url":"https://api.github.com/users/clintongormley/following{/other_user}","gists_url":"https://api.github.com/users/clintongormley/gists{/gist_id}","starred_url":"https://api.github.com/users/clintongormley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clintongormley/subscriptions","organizations_url":"https://api.github.com/users/clintongormley/orgs","repos_url":"https://api.github.com/users/clintongormley/repos","events_url":"https://api.github.com/users/clintongormley/events{/privacy}","received_events_url":"https://api.github.com/users/clintongormley/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Plugins","name":":Plugins","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/adoptme","name":"adoptme","color":"207de5"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/enhancement","name":"enhancement","color":"4a4ea8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-10T11:13:50Z","updated_at":"2016-03-11T07:33:44Z","closed_at":null,"body":"The plugin manager script supports proxies with the `-Dhttp.proxyHost` and `-Dhttp.proxyPort` settings. Unfortunately this does not support authenticated proxies out of the box, but it looks fairly easy for us to add this by setting the default authenticator in eg the plugin cli main when we see `-Dhttp.proxyUser` and `-Dhttp.proxyPassword`.\r\n\r\nFrom https://github.com/elastic/elasticsearch/issues/16633#issuecomment-183489149\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/195233520","html_url":"https://github.com/elastic/elasticsearch/issues/17046#issuecomment-195233520","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/17046","id":195233520,"user":{"login":"sarwarbhuiyan","id":658557,"avatar_url":"https://avatars.githubusercontent.com/u/658557?v=3","gravatar_id":"","url":"https://api.github.com/users/sarwarbhuiyan","html_url":"https://github.com/sarwarbhuiyan","followers_url":"https://api.github.com/users/sarwarbhuiyan/followers","following_url":"https://api.github.com/users/sarwarbhuiyan/following{/other_user}","gists_url":"https://api.github.com/users/sarwarbhuiyan/gists{/gist_id}","starred_url":"https://api.github.com/users/sarwarbhuiyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarwarbhuiyan/subscriptions","organizations_url":"https://api.github.com/users/sarwarbhuiyan/orgs","repos_url":"https://api.github.com/users/sarwarbhuiyan/repos","events_url":"https://api.github.com/users/sarwarbhuiyan/events{/privacy}","received_events_url":"https://api.github.com/users/sarwarbhuiyan/received_events","type":"User","site_admin":false},"created_at":"2016-03-11T07:33:44Z","updated_at":"2016-03-11T07:33:44Z","body":"Does this work too?\r\n\r\nURL url = new URL(“location address”);\r\nURLConnection uc = url.openConnection();\r\nString userpass = username + \":\" + password;\r\nString basicAuth = \"Basic \" + new String(new Base64().encode(userpass.getBytes()));\r\nuc.setRequestProperty (\"Authorization\", basicAuth);\r\nInputStream in = uc.getInputStream();\r\n\r\nJust considering whether that might be better than calling Authenticator.setDefault. Thoughts?"}}