net.shibboleth.plugin.storage.jdbc

Fehler

Das Problem äußert sich, wenn eine veraltete Plugin-Version für net.shibboleth.plugin.storage.jdbc installiert ist.

Logfiles:

Tomcat catalina.log:
====BEGIN====
SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/idp] startup failed due to previous errors
====END====

Tomcat localhost.log:
====BEGIN====
SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
    org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [net.shibboleth.plugin.storage.jdbc.impl.JDBCStorageService] for bean with name 'JDBCStorageService' defined in file [/opt/shibboleth-idp/conf/global.xml]: problem with class file or dependent class
        at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1508)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:683)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:651)
                 ....
====END====

Lösung

Version 2.0.0 muss mindestens installiert sein, um mit IdP 5.x kompatibel zu sein. Eine Aktualisierung des Plugins ist erst nach dem IdP 5 Upgrade möglich.

detaillierte Lister aller installierten Plugins:

root@idp:/bin/plugin.sh -fl 
Plugin: net.shibboleth.plugin.storage.jdbc	Current Version: 1.0.3
	Versions 
	1.0.4:	Min=4.1.0	Max=5.0.0	Support level: Current
	1.0.1:	Min=4.1.0	Max=5.0.0	Support level: OutOfDate
	1.0.0:	Min=4.1.0	Max=5.0.0	Support level: OutOfDate
	1.0.3:	Min=4.1.0	Max=5.0.0	Support level: OutOfDate
	1.0.2:	Min=4.1.0	Max=5.0.0	Support level: OutOfDate
	2.0.0:	Min=5.0.0	Max=6.0.0	Support level: Current

Liste verfügbarer Updates:

root@idp:/opt/shibboleth-idp# bin/plugin.sh -L
Plugin net.shibboleth.plugin.storage.jdbc: version 2.0.0 available for install

Aktualisieren des Plugins behebt den Fehler:

root@idp:/opt/shibboleth-idp# bin/plugin.sh -u net.shibboleth.plugin.storage.jdbc

Fehler

Beim Aufruf der Statusseite im Browser erscheint im Browserfenster die Fehlermeldung „Ein Fehler ist aufgetreten: ServletException“. In den IdP-Logs findet sich folgende Meldung:

ERROR [jakarta.servlet.ServletException:144] - 
jakarta.servlet.ServletException: Handler dispatch failed: java.lang.NoClassDefFoundError: jakarta/servlet/jsp/jstl/core/Config
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1104)
Caused by: java.lang.NoClassDefFoundError: jakarta/servlet/jsp/jstl/core/Config
        at org.springframework.web.servlet.support.JstlUtils.exposeLocalizationContext(JstlUtils.java:103)

Lösung

Der Fehler lässt sich durch Einbinden einer aktuelleren Version von jakarta jstl beheben.

$ wget -P /opt/shibboleth-idp/edit-webapp/WEB-INF/lib/
https://repo.maven.apache.org/maven2/org/glassfish/web/jakarta.servlet.jsp.jstl/3.0.1/jakarta.servlet.jsp.jstl-3.0.1.jar
$ wget -P /opt/shibboleth-idp/edit-webapp/WEB-INF/lib/
 https://repo.maven.apache.org/maven2/jakarta/servlet/jsp/jstl/jakarta.servlet.jsp.jstl-api/3.0.0/jakarta.servlet.jsp.jstl-api-3.0.0.jar

Danach build erneut ausführen und Tomcat neu starten:

$ sudo /opt/shibboleth-idp/bin/build.sh -Didp.target.dir=/opt/shibboleth-idp  
$ sudo systemctl restart tomcat10.service 

Entsprechend https://shibboleth.atlassian.net/wiki/spaces/IDP4/pages/1265631612/LDAPAuthnConfiguration wurde die LDAP-Konfiguration in V4.1 geändert. Die Datei conf/authn/ldap-authn-config.xml wird nicht mehr mitgeliefert/benötigt.

Fehler

Wurde diese Datei in V 4.1 nicht gelöscht und die entsprechende Referenz „<import resource=„ldap-authn-config.xml“ />“ in conf/authn/password-authn-config.xml nicht entfernt findet sich folgende Fehlermeldung im Logfile des IdP:

WARN [net.shibboleth.shared.spring.context.FilesystemGenericWebApplicationContext:616] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.ldaptive.auth.PooledBindAuthenticationHandler] for bean with name 'authHandler' defined in file [/opt/shibboleth-idp/conf/authn/ldap-authn-config.xml]
ERROR [org.springframework.webflow.execution.FlowExecutionException:88] -
org.springframework.webflow.execution.FlowExecutionException: Exception thrown in state 'CallAuthenticationFlow' of flow 'authn'
    at org.springframework.webflow.engine.impl.FlowExecutionImpl.wrap(FlowExecutionImpl.java:573)

Lösung

  • Löschen der Datei conf/authn/ldap-auth-config.xml gelöscht werden
  • entfernen der entsprechende Referenz „<import resource=„ldap-authn-config.xml“ />“ in conf/authn/password-authn-config.xml
  • ggf. muss zusätzlich in der password-auth-config.xml folgender Abschnitt hinzugefügt werden, wenn dieser fehlt
    <util:list id="shibboleth.authn.Password.Validators">
        <ref bean="shibboleth.LDAPValidator" />
    </util:list>

Vielen Dank an Michael Pietsch für´s Teilen!

Metadaten können gefiltert werden, nachdem sie geladen, aber vor ihrer Verwendung. Wie Metadatenanbieter werden auch Metadatenfilter durch ihr xsi:type-Attribut definiert. Mit Version 4.1 wurde der xsi:type EntityRole eingeführt. Er ist identisch mit dem vorher vorhandenen xsi:type EntityRoleWhiteList. In Version 4.1 bis 4.3 werden beiden unterstützt. Ab Version 5.0 wird ausschließlich der xsi:type EntityRole unterstützt.

Fehler Beim Upgrade auf 5.x tritt bei der Verwendung der alten Konfiguration folgende Fehlermeldung im Logfile idp-process.log auf:

net.shibboleth.shared.spring.service.ReloadableSpringService.doReload(ReloadableSpringService.java:375)  
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:  
Line 88 in XML document from file  
[/opt/shibboleth-idp/conf/metadata-providers.xml] is invalid  
        at  
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:411)  
Caused by: org.xml.sax.SAXParseException: cvc-elt.4.2: 'EntityRoleWhiteList' kann  
nicht als Typdefinition für Element 'MetadataFilter' aufgelöst werden.  

Lösung

Ersetzen Sie in der Datei metadata-providers.xml den alten durch den neuen xsi:type

<MetadataFilter xsi:type="EntityRole" xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata">
          <RetainedRole>md:SPSSODescriptor</RetainedRole> 
</MetadataFilter>
  • Zuletzt geändert: vor 3 Tagen