Om det inte är möjligt att anpassa applikationen för krav på AL2-inloggning så går det att konfigurera Shibboleth Service Provider att kontrollera detta.
Idén är att en mellansida införs i inloggningsflödet som kontrollerar tillitsnivå på användaren innan användaren vidarebefordras till den egentliga applikationen.
Konfigurationen består av dessa delar:
- Ett script som agerar mellanlandningssida innan användaren kommer till applikationen
- Stylesheet för scriptet
- Apache HTTPD-konfiguration för att skydda scriptet med Shibboleth-inloggning
- Shibboleth-konfiguration för att kräva AL2 för applikationen om användaren går förbi scriptet
På denna sida beskrivs hur Shibboleth Service Provider kan konfigureras att kräva AL2 för en Confluence-installation.
Script och stylesheet
Scriptet är skrivet i python. De första raderna är konfiguration som behöver anpassas för den specifika tjänsten:
# Warn on AL2 login after this date warn_date = "2024-12-01" # Require AL2 login after this date error_date = "2025-01-01" # Name of site site_name_sv = "Confluence" site_name_en = "Confluence" # Url of application target_url = "https://confluence.its.umu.se/confluence/" # Url to this script retry_url = "https://confluence.its.umu.se/cgi-bin/login.cgi" # Entityid of this Service Provider entityid = "https://confluence.its.umu.se/shibboleth" # File to log all access to logfile = "/var/www/cgi-bin/login.log"
Apache HTTPD-konfiguration
Befintlig HTTPD-konfiguration för applikationen ska bibehållas. För scriptet tillkommer detta, det tvingar Shibboleth-inloggning för att komma åt scriptet och ser till att det kan exekveras:
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" <Directory "/var/www/cgi-bin"> AllowOverride None Options None Require all granted </Directory> <Location /cgi-bin/login.cgi> AuthType shibboleth ShibRequestSetting requireSession true ShibUseHeaders On Require valid-user </Location>
Shibboleth-konfiguration
Shibboleth-konfigurationen lägger in krav på AL2 för åtkomst till applikationen. Den ska läggas in efter error_date från scriptet så att det inte går att ta sig in i applikationen utan AL2 genom att ange applikationens URL direkt utan att gå via scriptet. Konfigurationen kontrollerar Assurance-Certification i metadatan för IdP:n och assurance för själva inloggningen för IdP:er som är registrerade i SWAMID, och godkänner även REFEDS RAF-medium för IdP:er som inte är registrerade i SWAMID under förutsättning att de signalerar att de inte återanvänder användarnamn (eduPersonPrincipalName) för andra individer:
<SPConfig... <RequestMapper type="Native"> <RequestMap> <Host name="confluence.its.umu.se"> <Path name="confluence"> <AccessControl> <OR> <AND> <Rule require="assurance">http://www.swamid.se/policy/assurance/al2</Rule> <Rule require="Meta-Assurance-Certification">http://www.swamid.se/policy/assurance/al2</Rule> <Rule require="Meta-registrationAuthority">http://www.swamid.se/</Rule> </AND> <AND> <Rule require="assurance">https://refeds.org/assurance/IAP/medium</Rule> <Rule require="assurance">https://refeds.org/assurance/ID/eppn-unique-no-reassign</Rule> <NOT> <Rule require="Meta-registrationAuthority">http://www.swamid.se/</Rule> </NOT> </AND> </OR> </AccessControl> </Path> </Host> </RequestMap> </RequestMapper> <ApplicationDefaults... <Sessions... <Errors ... access="accessError.html" /> ... </ApplicationDefaults ... </SPConfig>