threerings / getdown

Download, Install, Update

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for proxy auth not working, loosing credentials

pb00068 opened this issue · comments

Yesterday we tested the new feature for proxy authentication.
For this purpose we build a '1.8.3pre'-version of getdown based on current master and had following result trying to connect over a proxy requiring authentication:

2019/01/29 07:41:46:472 INFO Getdown starting [version=1.8.3pre, built=2018-10-19 09:52]
2019/01/29 07:41:46:488 INFO Failed to find proxy settings in Windows registry [error=java.lang.UnsatisfiedLinkError: no jRegistryKey in java.library.path: [...]]
2019/01/29 07:41:46:488 INFO Checking whether we need to use a proxy...
2019/01/29 07:41:46:597 INFO Downloading 0 resources [totalBytes=0, maxConcurrent=3]
2019/01/29 07:41:46:597 INFO Testing whether proxy is needed, via: http://pbzcislx001:8080/cis/getdown/getdown.txt
2019/01/29 07:41:47:519 INFO Failed to HEAD http://pbzcislx001:8080/cis/getdown/getdown.txt: java.net.UnknownHostException: pbzcislx001
2019/01/29 07:41:47:519 INFO We probably need a proxy, but auto-detection failed.
2019/01/29 07:41:47:690 WARNING Missing translation message 'm.proxy_auth_required'.
2019/01/29 07:41:47:706 WARNING Missing translation message 'm.proxy_username'.
2019/01/29 07:41:47:706 WARNING Missing translation message 'm.proxy_password'.
2019/01/29 07:42:08:093 INFO User configured proxy [host=proxy.wgs.wuerth.com, port=3128]
2019/01/29 07:42:08:108 INFO Using proxy [host=proxy.wgs.wuerth.com, port=3128, haveCreds=true]
2019/01/29 07:42:08:170 INFO Getdown starting [version=1.8.3pre, built=2018-10-19 09:52]
2019/01/29 07:42:08:170 INFO Failed to find proxy settings in Windows registry [error=java.lang.UnsatisfiedLinkError: no jRegistryKey in java.library.path: [....]]
2019/01/29 07:42:08:170 INFO Using proxy [host=proxy.wgs.wuerth.com, port=3128, haveCreds=false]
2019/01/29 07:42:08:186 INFO Downloading 0 resources [totalBytes=0, maxConcurrent=3]
2019/01/29 07:42:08:245 INFO Able to lock for updates: true
2019/01/29 07:42:08:245 INFO Verifying application: http://pbzcislx001:8080/cis/getdown/
2019/01/29 07:42:08:245 INFO Version: -1
2019/01/29 07:42:08:245 INFO Class: dummy
2019/01/29 07:42:08:245 INFO Failed to load digest: .\digest2.txt (Das System kann die angegebene Datei nicht finden). Attempting recovery...
2019/01/29 07:42:08:245 INFO Attempting to refetch 'digest.txt' from 'http://pbzcislx001:8080/cis/getdown/digest.txt'.
2019/01/29 07:42:08:385 WARNING Failed to refresh non-versioned digest: Server returned HTTP response code: 503 for URL: http://pbzcislx001:8080/cis/getdown/digest.txt. Proceeding...
2019/01/29 07:42:08:385 INFO Attempting to refetch 'digest.txt' from 'http://pbzcislx001:8080/cis/getdown/digest.txt'.
2019/01/29 07:42:08:385 WARNING getdown() failed.
java.io.IOException: Server returned HTTP response code: 503 for URL: http://pbzcislx001:8080/cis/getdown/digest.txt

Looking through the log-file we see following:

1- Translations for 'm.proxy_auth_required, 'm.proxy_username' and 'm.proxy_password' are still missing.
This is not a problem.
2- After having specified proxy-credentials we have the log-entry confirming the presence of credentials:

2019/01/29 07:42:08:108 INFO Using proxy [host=proxy.wgs.wuerth.com, port=3128, haveCreds=true]

Then strangely getdown starts again, and the credentials are lost:

2019/01/29 07:42:08:170 INFO Using proxy [host=proxy.wgs.wuerth.com, port=3128, haveCreds=false]

P.S.: I did not include a ProxyAuth service so far for storing the crypted credential on filesystem. I intend to do it in a second step.

Another problem is that the ProxyPanel is apparently to small to show the ok and cancel button.
https://imgur.com/a/NOR87hz
Our key-user was merely able to activate the ok-button by blind guess (pressing TAB and SPACE-bar after passwd insertion).
P.S.: And it overlaps with the progress-bar-dialog (see second and third image on imgur).

P.S.2.: The overlapping has non-deterministic behavior (not happening always) and has probably to do with status being set async (EventQueue.invokeLater).
Anyway moving the instruction

_dead=true;

some lines up right before calling configureContainer(); (Getdown.java line 151) seems to fix progress-panel overlapping the proxy-dialog.