AEM 6.2 OSGi HTTP proxy with authentication drops username
This link for 6.2: OSGi Configuration Settings suggests org.apache.http.proxyconfigurator is available. However the java docs appear to be missing it: "The Adobe AEM Quickstart and Web Application."
Regardless, if I attempt to use org.apache.http.osgi.services.ProxyConfiguration and associated org.apache.http.osgi.services.HttpClientBuilderFactory within a vanilla 6.2 instance I see that the username, even tho it's set in the Web Console config, is ignored (an empty string is used when debugging the code).
07.02.2019 11:48:25.023 *DEBUG* [FelixStartLevel] com.xxx.aem.service.xxxServiceImpl Activating...
07.02.2019 11:48:25.024 *DEBUG* [FelixStartLevel] com.xxx.aem.service.xxxServiceImpl proxyConfiguration.isEnabled(): true
07.02.2019 11:48:25.024 *DEBUG* [FelixStartLevel] com.xxx.aem.service.xxxServiceImpl proxyConfiguration.getHostname(): localhost
07.02.2019 11:48:25.024 *DEBUG* [FelixStartLevel] com.xxx.aem.service.xxxServiceImpl proxyConfiguration.getPort(): 3128
07.02.2019 11:48:25.024 *DEBUG* [FelixStartLevel] com.xxx.aem.service.xxxServiceImpl proxyConfiguration.getUsername():
07.02.2019 11:48:25.024 *DEBUG* [FelixStartLevel] com.xxx.aem.service.xxxServiceImpl proxyConfiguration.getPassword(): proxyPa55
07.02.2019 11:48:25.024 *DEBUG* [FelixStartLevel] com.xxx.aem.service.xxxServiceImpl proxyConfiguration.getProxyExceptions(): [blah.com]
I've got a local squid proxy set up. If I use that without auth everything is fine and I see requests from AEM logged to /var/log/squid/access.log. If I setup auth on proxy server (verifing it works using a browser) then use AEM provided HTTP client it fails... must be due to the above.
I don't have this problem in 6.3. The username is logged out as expected as are requests to the proxy get through.
06.02.2019 12:03:46.896 *INFO* [0:0:0:0:0:0:0:1 [1549454626643] GET /services/xxx/touchui HTTP/1.1] com.xxx.aem.service.xxxServiceImpl ***validate proxyConfiguration.isEnabled: true
06.02.2019 12:03:46.896 *INFO* [0:0:0:0:0:0:0:1 [1549454626643] GET /services/xxx/touchui HTTP/1.1] com.xxx.aem.service.xxxServiceImpl ***validate proxyConfiguration.proxyHost: localhost
06.02.2019 12:03:46.896 *INFO* [0:0:0:0:0:0:0:1 [1549454626643] GET /services/xxx/touchui HTTP/1.1] com.xxx.aem.service.xxxServiceImpl ***validate proxyConfiguration.proxyPort: 3128
06.02.2019 12:03:46.896 *INFO* [0:0:0:0:0:0:0:1 [1549454626643] GET /services/xxx/touchui HTTP/1.1] com.xxx.aem.service.xxxServiceImpl ***validate proxyConfiguration.proxyUser: proxy_user
06.02.2019 12:03:46.896 *INFO* [0:0:0:0:0:0:0:1 [1549454626643] GET /services/xxx/touchui HTTP/1.1] com.xxx.aem.service.xxxServiceImpl ***validate proxyConfiguration.proxyPassword: proxyPa55
06.02.2019 12:03:46.896 *INFO* [0:0:0:0:0:0:0:1 [1549454626643] GET /services/xxx/touchui HTTP/1.1] com.xxx.aem.service.xxxServiceImpl ***validate proxyConfiguration.proxyExceptions: [localhost, 127.0.0.1]
I realise the Apache HTTP client in 6.2 uses version 4.3.4 whereas 6.3 uses 4.5.2. Would this have something to do with it?