aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/moa-id-module-eIDAS/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/modules/moa-id-module-eIDAS/src/main')
-rw-r--r--id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java27
1 files changed, 22 insertions, 5 deletions
diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java
index 76cc12e44..490dc9dcf 100644
--- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java
+++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java
@@ -15,6 +15,7 @@ import org.opensaml.saml2.metadata.EntitiesDescriptor;
import org.opensaml.saml2.metadata.EntityDescriptor;
import org.opensaml.saml2.metadata.RoleDescriptor;
import org.opensaml.saml2.metadata.provider.ChainingMetadataProvider;
+import org.opensaml.saml2.metadata.provider.FilesystemMetadataProvider;
import org.opensaml.saml2.metadata.provider.HTTPMetadataProvider;
import org.opensaml.saml2.metadata.provider.MetadataFilter;
import org.opensaml.saml2.metadata.provider.MetadataProvider;
@@ -163,8 +164,8 @@ public class MOAeIDASChainingMetadataProvider extends SimpleMOAMetadataProvider
+ " after timeout.");
} else
- Logger.warn("eIDAS metadata for EntityID: " + expired
- + " is marked as unsed, but no loaded metadata provider is found.");
+ Logger.info("eIDAS metadata for EntityID: " + expired
+ + " is marked as expired, but no currently loaded HTTPMetadataProvider metadata provider is found.");
}
}
@@ -229,15 +230,31 @@ public class MOAeIDASChainingMetadataProvider extends SimpleMOAMetadataProvider
private Map<String, HTTPMetadataProvider> getAllActuallyLoadedProviders() {
Map<String, HTTPMetadataProvider> loadedproviders = new HashMap<String, HTTPMetadataProvider>();
ChainingMetadataProvider chainProvider = (ChainingMetadataProvider) internalProvider;
-
+
//make a Map of all actually loaded HTTPMetadataProvider
List<MetadataProvider> providers = chainProvider.getProviders();
for (MetadataProvider provider : providers) {
if (provider instanceof HTTPMetadataProvider) {
HTTPMetadataProvider httpprovider = (HTTPMetadataProvider) provider;
loadedproviders.put(httpprovider.getMetadataURI(), httpprovider);
-
- }
+
+ } else if (provider instanceof FilesystemMetadataProvider) {
+ String entityID = "'!!NO-ENTITYID!!'";
+ try {
+ if (provider.getMetadata() instanceof EntityDescriptor)
+ entityID = ((EntityDescriptor)provider.getMetadata()).getEntityID();
+
+ Logger.debug("Skip eIDAS metadata: " + entityID + " because it is loaded from local Filesystem");
+
+ } catch (MetadataProviderException e) {
+ Logger.info("Collect currently loaded eIDAS metadata provider has an internel process error: " + e.getMessage());
+
+ }
+
+ } else
+ Logger.info("Skip " + provider.getClass().getName() + " from list of currently loaded "
+ + "eIDAS metadata provider");
+
}
return loadedproviders;