Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » On Scout 24.1 Formbased Login fails on Safari
On Scout 24.1 Formbased Login fails on Safari [message #1870857] Tue, 10 September 2024 08:14 Go to next message
Eclipse UserFriend
When setting devMode to false in config to allow formbased Login, the login does not function on Safari Browser but functions on Firefox and Chrome Browsers. This is even the case for the helloscout project.
Do we need a special configuration setting or is this a bug?
This behaviour appears only since Scout 24.1.
Best, Aleks
Re: On Scout 24.1 Formbased Login fails on Safari [message #1870872 is a reply to message #1870857] Tue, 10 September 2024 12:52 Go to previous messageGo to next message
Eclipse UserFriend
Are there any error messages displayed either in the browser console or exceptions in the server log? Is the authentication request (and a response) visible in the network view (developer console)?

If debugging on the remote server a break point could be set in org.eclipse.scout.rt.server.commons.authentication.FormBasedAccessController.handleAuthRequest(HttpServletRequest, HttpServletResponse) to get a better understanding if the request reaches the server.
Re: On Scout 24.1 Formbased Login fails on Safari [message #1870971 is a reply to message #1870872] Thu, 12 September 2024 04:57 Go to previous messageGo to next message
Eclipse UserFriend
There were no error messages displayed, neither in the browser nor in the server log. The response, when giving a proper credentials is a 304, and then you see the normal login form the same as in the start.
When I pass some wrong credentials, the I get "Login failed" and a 403 status. So there is an authentication in both cases, just that with proper credentials I don't get redirected.

From what I can tell, the requests and responses seem to work as expected, but the principal cannot be stored on the session. During debugging we noticed that the container HttpSession got in the ServerFilterHelper::getPrincipalOnSession is always null.
Re: On Scout 24.1 Formbased Login fails on Safari [message #1871133 is a reply to message #1870971] Mon, 16 September 2024 14:18 Go to previous messageGo to next message
Eclipse UserFriend
I suppose you are using the FormBasedAccessController? Is the code storing the principal on the session actually called? See https://github.com/eclipse-scout/scout.rt/blob/1e2917733fe6b37e4281b28cfbbb474353539900/org.eclipse.scout.rt.server.commons/src/main/java/org/eclipse/scout/rt/server/commons/authentication/FormBasedAccessController.java#L123

Please note that version 24.1 will not be longed maintained as there is a 24.2 version now: https://www.eclipse.org/forums/index.php/t/1116300/
Re: On Scout 24.1 Formbased Login fails on Safari [message #1871169 is a reply to message #1871133] Tue, 17 September 2024 10:02 Go to previous messageGo to next message
Eclipse UserFriend
I checked and the principal is actually stored as an attribute in request>session>sessionData>attributes = org.eclipse.scout.rt.server.commons.authentication.ServletFilterHelper.PRINCIPAL but the problem prevails.

I also did an update to version 24.2 but the problem still persists.

On my colleague's computer we had a project in an earlier scout version where the login functioned in Safari. We updated the project to 24.1 and now also that project does not accept a login in Safari.
Did you try replicating the problem in Safari?
Re: On Scout 24.1 Formbased Login fails on Safari [message #1871229 is a reply to message #1871169] Wed, 18 September 2024 04:19 Go to previous messageGo to next message
Eclipse UserFriend
Hi Aleksandar

I just created a new Scout Classic hello world application in Eclipse using Scout 24.2.2. I disabled the DevelopmentAccessController in UiServletFilter.java to enforce the display of the login form. Then I could successfully log in on Safari 17.4.1 using the credentials of the config.properties file.

So I was not able to reproduce your issue.
Do you have any Safari Addons installed that may cause issues? Is the Cookie set in your application (JSESSIONID) and is it sent with subsequent requests? You can check that in the developer tools of Safari (Tab "Network").

Kind regards
Mat
Re: On Scout 24.1 Formbased Login fails on Safari [message #1871235 is a reply to message #1871229] Wed, 18 September 2024 04:45 Go to previous messageGo to next message
Eclipse UserFriend
Hi Aleksandar

I just found another point which might affect the login: If you disable the devMode, the application assumes you are using https (TLS) which is highly recommended in production mode. Therefore, following the principle "secure by default" the session cookie is marked as "secure" which only allows the browser to use it, if accessing the app using https.
So if you use http and have the secure flag enabled, the login can never succeed as the browser will ignore it.
You can try to set the property "scout.app.sessionCookieConfigSecure" on the UI to false. Then the cookie should also work using http.
But keep in mind: this is only recommended during local development! In a deployed system running with https and having the secure flag enabled is highly recommended!

Kind regards
mat
Re: On Scout 24.1 Formbased Login fails on Safari [message #1871379 is a reply to message #1871235] Mon, 23 September 2024 11:18 Go to previous messageGo to next message
Eclipse UserFriend
Hi Mat,
It worked finally with scout.app.sessionCookieConfigSecure. But why the problem was only for the Safari browser and not for the Chrome and Firefox, I still don't quite understand.
Thanks with kind regards,
Aleks
Re: On Scout 24.1 Formbased Login fails on Safari [message #1871400 is a reply to message #1871379] Mon, 23 September 2024 12:55 Go to previous message
Eclipse UserFriend
Hi Aleks

This might be because of differences in which sites are considered "secure". Not all browsers use the same rules. See https://issues.chromium.org/issues/40120372 for Chromium for example.
Depending on your setup, different rules (e.g. for localhost) might apply for different browsers.

Kind regards
Mat
Previous Topic:Button in TableColumn
Next Topic:Usage of TreeField
Goto Forum:
  


Current Time: Sat Jun 21 14:15:59 EDT 2025

Powered by FUDForum. Page generated in 0.05540 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top