sbernhard
(Bernhard Suttner)
April 26, 2020, 8:17pm
1
On previous versions, a landing page was shown on which the “login” button appeared. Clicking this buttons showed the saml login page.
Personally, I really liked this behavior. With the current version 2.4.2 this isn’t possible any more as the saml login page is shown immediately.
Is it configurable?
sam
(Sam Saffron)
April 27, 2020, 1:36am
2
I am not following, you mean we showed a modal that had a single button “Login with SAML” ?
sbernhard
(Bernhard Suttner)
April 27, 2020, 6:46am
3
No.
In a previous version (I believe it was 2.3.6), it was like this:
After clicking on “Anmelden”, the SAML login window appeared.
If I enable “local logins”, the landing page with the login button appears again, but I do not want to have local login and therefore I need to disable it.
sbernhard
(Bernhard Suttner)
April 29, 2020, 9:21pm
4
Can someone help me? maybe @eviltrout ?
eviltrout
(Robin Ward)
April 29, 2020, 9:26pm
5
I certainly didn’t change this on purpose. If you could help us track down when it changed that would be helpful as we could look into the context.
It’s possible it changed for security reasons.
Falco
(Falco)
April 29, 2020, 9:36pm
6
This was a long requested improvement to make omniauth behave like real SSO, when the number of omniauth login methods is only one.
This is now implemented:
If there is only one external authenticator enabled and local logins are disabled and the site requires login, then users will be directed straight to the external authentication page. This exactly matches the implementation of our Discourse-native SSO.
I can’t think of a reason why anyone wouldn’t want this, so this is now the default behaviour.
cc @consideRatio @Joralf
sbernhard
(Bernhard Suttner)
April 29, 2020, 9:36pm
7
How can I help?
one hint: if you enable “local login”, the “Landing page together with the login button” is shown.
david
(David Taylor)
April 29, 2020, 9:38pm
8
If you really want the confirmation page, you can link the user to /login (rather than the homepage). That will not trigger the login automatically.
But note this is not really supported, it is just a quirk of the implementation and may change at any time.
Falco
(Falco)
April 29, 2020, 9:39pm
9
New behavior is better and consistent with SSO login. If a message is needed before login it can be implemented in the Identity Provider.
sbernhard
(Bernhard Suttner)
April 29, 2020, 9:42pm
10
ah, good to know.
I know of 2 reasons:
show a very nice landing page with some basic information instead of that “boring” login window
“security” (I know, its not really a big blocker). Cheap hacking scripts on the main URL (without the landing page) would fail hopefully as its required to press the login button first.
Is it possible to configure this behavior?
sam
(Sam Saffron)
April 30, 2020, 2:29am
11
You are going to need to hire a dev here to build a plugin to change this. As it stands this is the first complaint I have heard about the new system in months.
sbernhard
(Bernhard Suttner)
April 30, 2020, 6:41am
12
I’m a dev (see my changes in discourse_saml)
Would you accept a PR which adds a configuration option (default: new behavior)?
david
(David Taylor)
April 30, 2020, 8:48am
14
The automatic redirect should not introduce any security vulnerabilities. If you are aware of an exploit, please let us know via our disclosure program: discourse/docs/SECURITY.md at main · discourse/discourse · GitHub
I don’t think we want to add more noise to the settings until we have some more users requesting this change.
You could override this in a plugin by patching this method:
So I think you would want to simplify the function right down to
def redirect_to_login
dont_cache_page
cookies[:destination_url] = destination_url
redirect_to path("/login")
end
sbernhard
(Bernhard Suttner)
April 30, 2020, 8:56am
15
Thank you. Very appreciated!
BTW: You are doing a great job with Discourse.