CI / SSO Logo / login_logo.svg

umc
logon
sso

#1

Dear Community, dear univention team,

I’m now on 4.3, but still not found a configuration parameter to set the logo, which is displayed at the SSO page. Is such a feature implemented? How to reach it?

Thanks a lot,
Best,
meg


#2

Hey,

which logo is used on the login page cannot be configured at the moment. I see three ways to circumvent this:

  1. Edit the file that generates the HTML code, /usr/share/simplesamlphp/modules/univentiontheme/themes/univention/core/loginuserpass.php, and let it output a path to your own logo. Advantage: you can use any type of picture format for the logo. Disadvantage: whenever you update your system (rather: the package univention-web), your modifications will be overwritten and you have to re-apply them.
  2. Replace the file in the file system with your own logo: /usr/share/univention-web/js/dijit/themes/umc/images/login_logo.svg . Disadvantages: whenever you update your system (rather: the package univention-web), your modifications will be overwritten and you have to re-apply them, and your logo has to be in SVG format.
  3. Configure Apache to deliver another file on accesses to the URL. Advantage: rather safe wrt. system upgrades. Potential disadvantage: your own logo needs to be in SVG file in this case.

The third would be my choice. Here’s how that might look (untested):

  1. Create the file /etc/apache2/conf-available/custom-logo.conf with the following content:
    Alias /univention/js/dijit/themes/umc/images/login_logo.svg /path/to/my/custom_logo.svg
    
  2. Enable the configuration with: a2enconf custom-logo
  3. Reload Apache: systemctl reload apache2

Kind regads,
mosu


#3

Why ever, this is not working :frowning:

Same on Redirect


#4

Hey,

you’re right, it doesn’t work for me either (I didn’t actually test my solution before posting it).

What I did test, and what does work, is the following:

  1. Enable mod_rewrite: a2enmod rewrite
  2. Modify the custom-logo.conf file you’ve already created to contain the following content:
    RewriteRule /univention/js/dijit/themes/umc/images/login_logo.svg /path/to/my/custom_logo.svg [L]
    
  3. Restart Apache: systemctl restart apache2

You may have to clear your browser’s cache if the old logo is still shown afterwards.

m.


#5

Fast perfekt. Leider greift diese Einstellung nicht für den virtualhost ucs-sso (oder andere wo das logo noch verwendet wird). Ist es möglich diese Regel global auszurollen?
RewriteOptions InheritDown Scheint leider nicht zum Erfolg zu führen :confused:


#6

option 4: use dpkg-divert

With dpkg-divert you can redirect login_logo.svg to another file (e.g.login_logo.svg_org) and put your logo to login_logo.svg yourself.

dpkg-divert --add --rename --divert \
 /usr/share/univention-web/js/dijit/themes/umc/images/login_logo.svg_org \
 /usr/share/univention-web/js/dijit/themes/umc/images/login_logo.svg

Have a look at the changes with vimdiff /var/lib/dpkg/diversions*.

To simulate an upgrade, you can run univention-install --reinstall univention-web-style.


#7

Hey,

This is most likely due to the existing rewrite rules the SAML virtual host uses (see /etc/apache2/sites-available/univention-proxy.conf; the rule RewriteRule ^/univention/(.*)$ %{DOCUMENT_ROOT}%{REQUEST_FILENAME} [END] is probably the culprit).

In this case using dpkg-divert as Thorsten has suggested is the better choice.

Remember that you have to do that not only on your DC Master, but on all servers that can act as a SAML provider (see host ucs-sso.$(ucr get domainname)).

Kind regards,
mosu


#8
**dpkg-divert:** **Fehler:** Umbenennen beinhaltet Überschreiben von »/usr/share/univention-web/js/dijit/themes/umc/images/login_logo.svg« mit

anderer Datei »/var/www/24.svg«, nicht erlaubt

:frowning:

P.S. using sudo.

-> Have to rename/remove the original before :wink:

=> but even that seems not working. Still seeing the default Logo :frowning: