Bug 51423 - Redirect to SAML login not working from multiple hostnames
Redirect to SAML login not working from multiple hostnames
Status: NEW
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-06-04 13:50 CEST by Valentin Heidelberger
Modified: 2020-06-04 15:52 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.057
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Valentin Heidelberger univentionstaff 2020-06-04 13:50:32 CEST
On the Univention portal in the upper right hand corner there is a login button. A click on this button should lead to the SAML login, if it's reachable from the user's browser, if not it should lead to the normal login.

This doesn't seem to work reliably depending on the hostname that's being used to access the system.

I have a system called "master.ucs.demo" which provides SSO at "ucs-sso.ucs.demo"
This system is also reachable as "portal.ucs.demo" and "ucs.demo"

When I click on "login" using the portal on master.ucs.demo I get correctly redirected to ucs-sso.ucs.demo; when i do the same on portal.ucs.demo or simply ucs.demo I get the normal login even though ucs-sso.ucs.demo is perfectly reachable.

I've dug a bit and found that the function "passiveSingleSignOn" in line 419 of /usr/share/univention-management-console-login/main.js catches an error while trying to parse the saml iframe which results in

deferred.cancel(error)

and the redirect to the normal login. The error is

TypeError: Cannot read property 'passive_single_sign_on_28urpi' of undefined
    at Function.t.doc (VM8 dojo.js:1617)
    at win.global.<computed> (VM13 main.js:430)
    at HTMLIFrameElement.onload ((index):1)


I don't know why that happens and don't see a reason why it shouldn't work from a feature perspective so far. If a customer decides to have their system reachable from multiple hostnames, that should work. A not so pretty "workaround" is to add a portal tile linking to /univention/saml/?location=/univention/portal/ - that works regardless of the hostname being used.