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 and associated 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] Activating...

07.02.2019 11:48:25.024 *DEBUG* [FelixStartLevel] proxyConfiguration.isEnabled(): true

07.02.2019 11:48:25.024 *DEBUG* [FelixStartLevel] proxyConfiguration.getHostname(): localhost

07.02.2019 11:48:25.024 *DEBUG* [FelixStartLevel] proxyConfiguration.getPort(): 3128

07.02.2019 11:48:25.024 *DEBUG* [FelixStartLevel] proxyConfiguration.getUsername():

07.02.2019 11:48:25.024 *DEBUG* [FelixStartLevel] proxyConfiguration.getPassword(): proxyPa55

07.02.2019 11:48:25.024 *DEBUG* [FelixStartLevel] proxyConfiguration.getProxyExceptions(): []

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] ***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] ***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] ***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] ***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] ***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] ***validate proxyConfiguration.proxyExceptions: [localhost,]

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?

Accepted Solutions (1)

Accepted Solutions (1)



I can confirm that upgrading 6.2 to included SP1  (which I had already) and CFP17 (I only had CFP2 !) does indeed rectify the problem.

Thanks for your suggestion.

Answers (1)

Answers (1)




If it doesn't retain in 6.2 vanilla instance but in 6.3, then probably that could've been a bug and fixed in SP/CFPs.

Could you try with latest SP/CFP?

Do you see the username being retained in the configuration when you open it again?

I don't think that would be with library version however, you could still update the lib version via system/console/bundles and test.