Bug 44112 - univention-self-service URI is in UCS 4.2 no longer available
univention-self-service URI is in UCS 4.2 no longer available
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Self Service
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.2
Assigned To: Daniel Tröder
Erik Damrose
: interim-4
Depends on:
Blocks: 43964
  Show dependency treegraph
 
Reported: 2017-03-28 14:48 CEST by Stefan Gohmann
Modified: 2017-04-04 18:30 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
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 Stefan Gohmann univentionstaff 2017-03-28 14:48:13 CEST
At least for the password self service sites, we need redirects from the UCS 4.1 URI (univention-self-service) to the UCS 4.2 URI (univention/self-service).
Comment 1 Florian Best univentionstaff 2017-03-28 19:39:58 CEST
univention-self-service (2.0.13-5):
r78446 | Bug #44112: add backwards compatible redirections
Comment 2 Florian Best univentionstaff 2017-03-29 12:52:24 CEST
univention-management-console (9.0.78-1):
r78462 | Bug #44112: stay backwards compatible for all URI's
Comment 3 Florian Best univentionstaff 2017-03-29 12:54:10 CEST
It is now possible again to have a UCS 4.2 DC Master which was updated from UCS 4.1 and a UCS 4.1 DC Slave where the Self-Service frontend runs on.
Comment 4 Florian Best univentionstaff 2017-03-29 12:55:08 CEST
All URL's like /univention-self-service/ are redirected to /univention/self-service/ with a HTTP 303 status code which preserves the #fragement and apache preserves the query-string.
Comment 5 Daniel Tröder univentionstaff 2017-03-31 20:13:38 CEST
OK: redirects correctly: /univention-self-service/?lang=en-US#passwordreset
OK: redirects correctly: /univention-self-service/?lang=de-DE#passwordchange

Links from previous token-mails don't have to be valid anymore, but links from new token mails must.

REOPEN: When following the link in a sent email:
-----------------------------------------------------------------------
Webfrontend error: The specified request is unknown.
The path '/self-service/' was not found.
-----------------------------------------------------------------------

The reason is, that the hostname of the dc master is in the email. If I replace it with the hostname of the slave (on which the App was installed) it works.
Comment 6 Stefan Gohmann univentionstaff 2017-04-01 21:06:03 CEST
Another problem is, that univention-self-service-master is unmaintaned:

root@master411:~# apt-cache policy univention-self-service-master
univention-self-service-master:
  Installiert:           (keine)
  Installationskandidat: 2.0.15-3A~4.2.0.201703311631
  Versionstabelle:
     2.0.15-3A~4.2.0.201703311631 0
        500 https://updates-test.software-univention.de/4.2/unmaintained/ 4.2-0/all/ Packages
root@master411:~#
Comment 7 Stefan Gohmann univentionstaff 2017-04-01 22:10:15 CEST
(In reply to Stefan Gohmann from comment #6)
> Another problem is, that univention-self-service-master is unmaintaned:

Should be available after the next mirror sync.

(In reply to Daniel Tröder from comment #5)
> The reason is, that the hostname of the dc master is in the email. If I
> replace it with the hostname of the slave (on which the App was installed)
> it works.

If I understand it correctly, this UCR variable is used for it:
 umc/self-service/passwordreset/email/webserver_address

I've now added a simple listener script which checks for a server object with the registered service self-service. If the UCR variable is empty, it is set to the FQDN of the server. It is not the best solution but it should work out of the box and admins can overwrite them via UCR or via UCR policy.
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2017-04-01 23:11:12 CEST
(In reply to Stefan Gohmann from comment #7)
> It is not the best solution but it should
> work out of the box and admins can overwrite them via UCR or via UCR policy.

Yes, if there is more than one system with installed and registered self service, the UCR variable might be set with one of the "other" FQDNs.
Comment 9 Daniel Tröder univentionstaff 2017-04-03 10:59:05 CEST
Commit is r78586 (tagged for Bug #44112).

(In reply to Sönke Schwardt-Krummrich from comment #8)
> (In reply to Stefan Gohmann from comment #7)
> > It is not the best solution but it should
> > work out of the box and admins can overwrite them via UCR or via UCR policy.
> 
> Yes, if there is more than one system with installed and registered self
> service, the UCR variable might be set with one of the "other" FQDNs.
The UCRV is only set by the listener if previously unset.
But it wouldn't matter anyway, as all frontends would use the same backend. The problem of varying the frontend address in the email is one that the customer can remedy by forking sending/send_email.py (optionally using the external method).

The listener only triggers when a new computer object is created.
Comment 10 Daniel Tröder univentionstaff 2017-04-03 11:00:41 CEST
r78605: make listener trigger on change

Package: univention-self-service
Version: 2.0.16-3A~4.2.0.201704031100
Branch: ucs_4.2-0
Scope:
Comment 11 Erik Damrose univentionstaff 2017-04-03 16:31:02 CEST
(In reply to Daniel Tröder from comment #10)
> r78605: make listener trigger on change

The listener will get all objects with the matching filter upon initialization anyway. I think the change is rather pointless, because the UCRv is still only set if it previously unset - but nothing breaks ;)

Daniel: Please make sure that it was intended this way, and clone a specific bug for 4.2-errata if the behavior should be changed. I will set this bug to VERIFIED
Comment 12 Stefan Gohmann univentionstaff 2017-04-04 18:30:00 CEST
UCS 4.2 has been released:
 https://docs.software-univention.de/release-notes-4.2-0-en.html
 https://docs.software-univention.de/release-notes-4.2-0-de.html

If this error occurs again, please use "Clone This Bug".