aboutsummaryrefslogtreecommitdiff
path: root/id
diff options
context:
space:
mode:
authorKlaus Stranacher <kstranacher@egiz.gv.at>2014-05-26 14:47:57 +0200
committerKlaus Stranacher <kstranacher@egiz.gv.at>2014-05-26 14:47:57 +0200
commitf814cccf898b02c3b897a4e3d4b95d928d1fb732 (patch)
tree421e7f630aee439cc3d6df4393c4a8f4cdcc09d6 /id
parentf8bb5fa2b930d258d5c92733088bc1332159066a (diff)
parent54144b697bd1a5c4b08e8da9fec655afd949446c (diff)
downloadmoa-id-spss-f814cccf898b02c3b897a4e3d4b95d928d1fb732.tar.gz
moa-id-spss-f814cccf898b02c3b897a4e3d4b95d928d1fb732.tar.bz2
moa-id-spss-f814cccf898b02c3b897a4e3d4b95d928d1fb732.zip
Merge branch 'moa-2.1-Snapshot' of https://gitlab.iaik.tugraz.at/afitzek/moa-idspss into moa-2.1-Snapshot
Diffstat (limited to 'id')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/pvp2/MetaDataVerificationFilter.java13
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java12
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java18
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java5
5 files changed, 40 insertions, 12 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/pvp2/MetaDataVerificationFilter.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/pvp2/MetaDataVerificationFilter.java
index 3429f6c96..332adaa80 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/pvp2/MetaDataVerificationFilter.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/pvp2/MetaDataVerificationFilter.java
@@ -56,6 +56,19 @@ public class MetaDataVerificationFilter implements MetadataFilter {
} catch (MOAIDException e) {
throw new FilterException("Invalid Metadata file Root element is no EntitiesDescriptor", null);
}
+
+ } if (metadata instanceof EntityDescriptor) {
+ try {
+ EntityDescriptor entity = (EntityDescriptor) metadata;
+ if (entity.getSignature() != null)
+ EntityVerifier.verify(entity, this.credential);
+
+ else
+ throw new FilterException("Root element of metadata file has to be signed", null);
+
+ } catch (MOAIDException e) {
+ throw new FilterException("Invalid Metadata file Root element is no EntitiesDescriptor", null);
+ }
}
}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java
index be5b2200b..363c094ff 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java
@@ -253,9 +253,15 @@ public class OASTORKConfig implements IOnlineApplicationData{
public List<CPEPS> getEnabledCPEPS() {
if (enabledCitizenCountries != null) {
List<CPEPS> result = new ArrayList<CPEPS>();
- for(CPEPS current : ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getCPEPS()) {
- if(enabledCitizenCountries.contains(current.getCountryCode()))
- result.add(current);
+
+ try {
+ for(CPEPS current : ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getCPEPS()) {
+ if(enabledCitizenCountries.contains(current.getCountryCode()))
+ result.add(current);
+ }
+
+ } catch (NullPointerException e){
+
}
return result;
}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
index 659835d03..9509f9712 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
@@ -133,12 +133,20 @@ public class EditOAAction extends BasicOAAction {
// prepare attribute helper list
ArrayList<AttributeHelper> attributes = new ArrayList<AttributeHelper>();
- for (StorkAttribute current : ConfigurationDBRead
- .getMOAIDConfiguration().getAuthComponentGeneral()
- .getForeignIdentities().getSTORK().getAttributes())
- attributes.add(new AttributeHelper(current));
- getStorkOA().setHelperAttributes(attributes);
+
+ try {
+ for (StorkAttribute current : ConfigurationDBRead
+ .getMOAIDConfiguration().getAuthComponentGeneral()
+ .getForeignIdentities().getSTORK().getAttributes())
+ attributes.add(new AttributeHelper(current));
+
+
+ } catch (NullPointerException e) {
+
+ }
+ getStorkOA().setHelperAttributes(attributes);
+
} catch (BasicActionException e) {
return Constants.STRUTS_ERROR;
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java
index 345d25cda..40e243d0b 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java
@@ -121,10 +121,10 @@ public class OAPVP2ConfigValidation {
protoSocketFactory);
} catch (MOAHttpProtocolSocketFactoryException e) {
- log.warn("MOA SSL-TrustStore can not initialized. Use default Java TrustStore.");
+ log.warn("MOA SSL-TrustStore can not initialized. Use default Java TrustStore.", e);
} catch (ConfigurationException e) {
- log.info("No MOA specific SSL-TrustStore configured. Use default Java TrustStore.");
+ log.info("No MOA specific SSL-TrustStore configured. Use default Java TrustStore.", e);
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java
index 4dec2c32e..2e243b3ae 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java
@@ -70,7 +70,8 @@ public class STORKConfig {
try {
cpeps = stork.getCPEPS();
- } catch (NullPointerException ex) {
+
+ } catch (NullPointerException ex) {
Logger.error("CPEPS not configured!");
}
@@ -104,7 +105,7 @@ public class STORKConfig {
}*/
}
attr = new ArrayList<StorkAttribute>();
- if (stork.getAttributes() != null) {
+ if (stork != null && stork.getAttributes() != null) {
for(StorkAttribute current : stork.getAttributes()) {
attr.add(current);
}