ugent / Studieplekken

The Study Rooms (Studieplekken) application facilitates work and study places within UGent, HOGENT, Arteveldehogeschool, Odisee, LUCA, KU Leuven and the City of Ghent.
https://bloklocaties.stad.gent
MIT License
11 stars 1 forks source link

InputMetadataManager initialization errors #153

Open EwoutV opened 1 month ago

EwoutV commented 1 month ago

From a fresh installation, the local instance of Spring Boot gives the following error upon start:

2024-10-05 21:13:27,858 ERROR [Metadata-reload] org.springframework.security.saml.metadata.MetadataManager: Initialization of metadata provider blok2.http.security.providers.InputStreamMetadataProvider@7f40fae0 failed, provider will be ignored
org.opensaml.saml2.metadata.provider.MetadataProviderException: java.lang.NullPointerException
        at org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.refresh(AbstractReloadingMetadataProvider.java:270)
        at org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.doInitialization(AbstractReloadingMetadataProvider.java:239)
        at org.opensaml.saml2.metadata.provider.AbstractMetadataProvider.initialize(AbstractMetadataProvider.java:407)
        at org.springframework.security.saml.metadata.ExtendedMetadataDelegate.initialize(ExtendedMetadataDelegate.java:167)
        at org.springframework.security.saml.metadata.MetadataManager.initializeProvider(MetadataManager.java:438)
        at org.springframework.security.saml.metadata.MetadataManager.refreshMetadata(MetadataManager.java:264)
        at org.springframework.security.saml.metadata.CachingMetadataManager.refreshMetadata(CachingMetadataManager.java:86)
        at org.springframework.security.saml.metadata.MetadataManager$RefreshTask.run(MetadataManager.java:1073)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.NullPointerException: null
        at org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.inputstreamToByteArray(AbstractReloadingMetadataProvider.java:494)
        at blok2.http.security.providers.InputStreamMetadataProvider.fetchMetadata(InputStreamMetadataProvider.java:48)
        at org.opensaml.saml2.metadata.provider.AbstractReloadingMetadataProvider.refresh(AbstractReloadingMetadataProvider.java:258)
        ... 9 common frames omitted

This does not break the backend, but needs investigation.

AurisAudentis commented 1 month ago

We've externalized the SAML dependency to another service a long time ago, so the saml dependency can likely be removed from the main backend - which would likely solve this problem.