aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/moa-id-module-eIDAS/src/main/java/at
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2017-07-27 09:49:10 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2017-07-27 09:49:10 +0200
commit22665d0bb596d772cf6cb81ba458b75d8b455324 (patch)
tree539f63730068009bf266d6859936715f9b3a3463 /id/server/modules/moa-id-module-eIDAS/src/main/java/at
parentac7930ec5d3505dc9ef47fef045d6b5bae53eadb (diff)
downloadmoa-id-spss-22665d0bb596d772cf6cb81ba458b75d8b455324.tar.gz
moa-id-spss-22665d0bb596d772cf6cb81ba458b75d8b455324.tar.bz2
moa-id-spss-22665d0bb596d772cf6cb81ba458b75d8b455324.zip
update logging behavior of eIDAS metadata provider implementation
Diffstat (limited to 'id/server/modules/moa-id-module-eIDAS/src/main/java/at')
-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;