[SOLVED] Basic Authentication not working with OWS 1.2.1

The public knowledge pool and discussion forum of the OWS community. Do not post confidential information here!
abrensch
Posts: 1
Joined: 12 Oct 2020, 17:27

[SOLVED] Basic Authentication not working with OWS 1.2.1

Post by abrensch »

Hi,

we hit a problem with OpenWebStart for installations where the server requires basic authentication.

With Java-Webstart, there's a popup once asking for the credentials.

I saw a github issue about the reverse problem in IcedTeaWeb (too many popups):

https://github.com/AdoptOpenJDK/IcedTea-Web/issues/607

so it seems that basic authentication should work somehow with OWS?

When writing a DEBUG log, I see that the server is sending the expected 401-response, but it's not handled:

[ITW-CORE][2020-10-12 17:12:20.500 MESZ][DEBUG][net.adoptopenjdk.icedteaweb.http.HttpUtils]
Following exception should be harmless, but may help in finding root cause.
java.io.IOException: Server returned HTTP response code: 401 for URL: https://....jnlpx
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1900)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
at net.adoptopenjdk.icedteaweb.http.CloseableConnection.getInputStream(CloseableConnection.java:58)
at net.adoptopenjdk.icedteaweb.http.HttpUtils.consumeAndCloseConnection(HttpUtils.java:74)
at net.adoptopenjdk.icedteaweb.http.HttpUtils.consumeAndCloseConnectionSilently(HttpUtils.java:61)
at net.adoptopenjdk.icedteaweb.resources.initializer.UrlProber.getUrlResponseCodeWithRedirectionResult(UrlProber.java:67)
at net.adoptopenjdk.icedteaweb.resources.initializer.BaseResourceInitializer.testUrl(BaseResourceInitializer.java:103)
at net.adoptopenjdk.icedteaweb.resources.initializer.BaseResourceInitializer.lambda$null$0(BaseResourceInitializer.java:83)

Any idea?

thanx, Arndt

Janak Mulani
Posts: 246
Joined: 24 Mar 2020, 13:37

Re: Basic Authentication not working with OWS 1.2.1

Post by Janak Mulani »

Hi,

Thanks for reporting.

We are aware of

Code: Select all

https://github.com/AdoptOpenJDK/IcedTea-Web/issues/607
and already have an issue on our internal list.

We will take it up after assessing the effort and available resources.

Is it an urgent high priority issue for you? Would you be willing to support us?

- Janak

Janak Mulani
Posts: 246
Joined: 24 Mar 2020, 13:37

Re: Basic Authentication not working with OWS 1.2.1

Post by Janak Mulani »

Hi

I started investigating this by making a small sample. When I start

Code: Select all

javaws http://host/abc.jnlp
it shows me the authentication dialog twice : once in stage 1 for downloading jnlp and second time in stage 2 when it starts the jnlp. After this it does not show Authentication dialog for jar files. After this the app runs.

Can you please tell me what your experience has been? Does the app run at all or not? How is your jnlp structured? does it have extensions? Are jars and jnlp are under the same codebase? How is Basic Auth configured on the server?

It will help if you can share the jnlp.

Thanks

Stephan Classen
Posts: 185
Joined: 27 Mar 2020, 09:55

Re: Basic Authentication not working with OWS 1.2.1

Post by Stephan Classen »

We found the underlying issue and will release a fix with version 1.3.0 in mid November
For details see https://github.com/AdoptOpenJDK/IcedTea-Web/issues/607

Post Reply