Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Web Start keeps asking to authenticate

I developed a Java Web Start app that lies on a web server based on HTTP security. Once I log in to the web-page for launching my Java Web Start application, the app is asking me again to authenticate, and even if I tick the "save this password to the password list" it is prompting again this authentication dialog.

If I am not wrong, this is because it's trying to access the other jars.

I was wondering if there is a way for defining or passing the authentication username and password automatically to get rid of this annoying "feature"

Thanks for your help

like image 856
Mallinok Avatar asked Apr 16 '26 09:04

Mallinok


2 Answers

No. You must authenticate to the server to access the application, and you must authenticate to the client to allow <all-permissions/>. Accepting the proffered certificate in the manner provided by your client's operating system should preclude repeated requests for credentials. For reference, this example is signed but requires no <security>.

like image 148
trashgod Avatar answered Apr 18 '26 22:04

trashgod


Probably because the User-Agent HTTP request header is not the same.

When you browse to your Web Start page, your browser sends a request to the HTTP server with User-Agent: whatever browser you are using

When the JRE requests the JARs to be downloaded from the HTTP server, it sends a request with User-Agent: whatever java version you are using

From the perspective of the HTTP server, these are 2 distinct clients and therefore you are prompted twice for credentials.

like image 34
Pierre Ernst Avatar answered Apr 18 '26 23:04

Pierre Ernst