aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main/java
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-08-16 07:08:26 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-08-16 07:08:26 +0200
commita60b99e926ccd5c18baa36144922a94835819777 (patch)
treeab19e4609c2e4e8b1cd8d449c3ad83a8665fe355 /id/ConfigWebTool/src/main/java
parenta9c3d654ebd5af475c1fb634d4fb03d8499218ee (diff)
downloadmoa-id-spss-a60b99e926ccd5c18baa36144922a94835819777.tar.gz
moa-id-spss-a60b99e926ccd5c18baa36144922a94835819777.tar.bz2
moa-id-spss-a60b99e926ccd5c18baa36144922a94835819777.zip
change STORK QAA to eIDAS LoA
Diffstat (limited to 'id/ConfigWebTool/src/main/java')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java15
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java20
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java2
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java7
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OASTORKConfigValidation.java7
5 files changed, 32 insertions, 19 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java
index e71bad299..b5c996c72 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java
@@ -27,6 +27,7 @@ import java.util.List;
import org.apache.log4j.Logger;
+import at.gv.egovernment.moa.id.commons.MOAIDConstants;
import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.AuthComponentGeneral;
import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.CPEPS;
import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.ForeignIdentities;
@@ -40,7 +41,7 @@ public class GeneralStorkConfig {
private List<CPEPS> cpepslist;
private List<StorkAttribute> attributes;
- private int qaa;
+ private String qaa;
private static final Logger log = Logger.getLogger(GeneralStorkConfig.class);
private MOAIDConfiguration dbconfig = null;
@@ -91,10 +92,10 @@ public class GeneralStorkConfig {
}
try {
- qaa = stork.getQualityAuthenticationAssuranceLevel();
+ qaa = stork.getGeneral_eIDAS_LOA();
} catch(NullPointerException e) {
- qaa = 4;
+ qaa = MOAIDConstants.eIDAS_LOA_HIGH;
}
}
@@ -114,6 +115,10 @@ public class GeneralStorkConfig {
attributes.add(new StorkAttribute());
}
+ public List<String> getAllowedLoALevels() {
+ return MOAIDConstants.ALLOWED_eIDAS_LOA;
+ }
+
public List<CPEPS> getRawCPEPSList() {
return cpepslist;
}
@@ -161,11 +166,11 @@ public class GeneralStorkConfig {
this.attributes = attributes;
}
- public int getDefaultQaa() {
+ public String getDefaultQaa() {
return qaa;
}
- public void setDefaultQaa(int qaa) {
+ public void setDefaultQaa(String qaa) {
this.qaa = qaa;
}
}
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 c0e1eaaf7..fb096a2a0 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
@@ -29,6 +29,7 @@ import javax.servlet.http.HttpServletRequest;
import org.apache.log4j.Logger;
+import at.gv.egovernment.moa.id.commons.MOAIDConstants;
import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.AttributeProviderPlugin;
import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.AuthComponentOA;
import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.CPEPS;
@@ -49,7 +50,7 @@ public class OASTORKConfig implements IOnlineApplicationData{
private static final Logger log = Logger.getLogger(OASTORKConfig.class);
private boolean isStorkLogonEnabled = false;
- private int qaa;
+ private String qaa;
private List<AttributeHelper> attributes = null;
@@ -107,14 +108,14 @@ public class OASTORKConfig implements IOnlineApplicationData{
setStorkLogonEnabled(config.isStorkLogonEnabled());
try {
- setQaa(config.getQaa());
+ setQaa(config.geteIDAS_LOA());
} catch(NullPointerException e) {
// if there is no configuration available for the OA, get the default qaa level
try {
- setQaa(dbconfig.getAuthComponentGeneral().getForeignIdentities().getSTORK().getQualityAuthenticationAssuranceLevel());
+ setQaa(dbconfig.getAuthComponentGeneral().getForeignIdentities().getSTORK().getGeneral_eIDAS_LOA());
} catch (NullPointerException e1) {
- setQaa(4);
+ setQaa(MOAIDConstants.eIDAS_LOA_HIGH);
}
}
@@ -208,7 +209,7 @@ public class OASTORKConfig implements IOnlineApplicationData{
}
// transfer the incoming data to the database model
stork.setStorkLogonEnabled(isStorkLogonEnabled());
- stork.setQaa(getQaa());
+ stork.seteIDAS_LOA(getQaa());
stork.setOAAttributes(getAttributes());
stork.setVidpEnabled(isVidpEnabled());
stork.setRequireConsent(isRequireConsent());
@@ -227,11 +228,11 @@ public class OASTORKConfig implements IOnlineApplicationData{
this.isStorkLogonEnabled = enabled;
}
- public int getQaa() {
+ public String getQaa() {
return qaa;
}
- public void setQaa(int qaa) {
+ public void setQaa(String qaa) {
this.qaa = qaa;
}
@@ -282,6 +283,11 @@ public class OASTORKConfig implements IOnlineApplicationData{
return citizenCountries;
}
+
+ public List<String> getAllowedLoALevels() {
+ return MOAIDConstants.ALLOWED_eIDAS_LOA;
+ }
+
public List<String> getEnabledCitizenCountries() {
return enabledCitizenCountries;
}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java
index 40e9b1a90..5e348f91b 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java
@@ -553,7 +553,7 @@ public class EditGeneralConfigAction extends BasicAction {
try {
log.error("QAAAA " + storkconfig.getDefaultQaa());
- stork.setQualityAuthenticationAssuranceLevel(storkconfig.getDefaultQaa());
+ stork.setGeneral_eIDAS_LOA(storkconfig.getDefaultQaa());
if (storkconfig.getAttributes() != null) {
List<StorkAttribute> dbStorkAttr = new ArrayList<StorkAttribute>();
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java
index 6b5c51e3f..ed2c2f903 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java
@@ -7,6 +7,7 @@ import javax.servlet.http.HttpServletRequest;
import org.apache.log4j.Logger;
+import at.gv.egovernment.moa.id.commons.MOAIDConstants;
import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.CPEPS;
import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.StorkAttribute;
import at.gv.egovernment.moa.id.commons.validation.ValidationHelper;
@@ -82,9 +83,9 @@ public class StorkConfigValidator {
}
// check qaa
- int qaa = form.getDefaultQaa();
- if(1 > qaa && 4 < qaa) {
- log.warn("QAA is out of range : " + qaa);
+ String qaa = form.getDefaultQaa();
+ if (!MOAIDConstants.ALLOWED_eIDAS_LOA.contains(qaa)) {
+ log.warn("eIDAS LoA is not allowed : " + qaa);
errors.add(LanguageHelper.getErrorString("validation.stork.qaa.outofrange",
new Object[] {qaa}, request ));
}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OASTORKConfigValidation.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OASTORKConfigValidation.java
index 5c451c06a..6a03bf194 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OASTORKConfigValidation.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OASTORKConfigValidation.java
@@ -30,6 +30,7 @@ import javax.servlet.http.HttpServletRequest;
import org.apache.log4j.Logger;
+import at.gv.egovernment.moa.id.commons.MOAIDConstants;
import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.AttributeProviderPlugin;
import at.gv.egovernment.moa.id.commons.validation.ValidationHelper;
import at.gv.egovernment.moa.id.configuration.data.oa.OASTORKConfig;
@@ -45,9 +46,9 @@ public class OASTORKConfigValidation {
List<String> errors = new ArrayList<String>();
// check qaa
- int qaa = oageneral.getQaa();
- if(1 > qaa && 4 < qaa) {
- log.warn("QAA is out of range : " + qaa);
+ String qaa = oageneral.getQaa();
+ if (!MOAIDConstants.ALLOWED_eIDAS_LOA.contains(qaa)) {
+ log.warn("eIDAS LoA is not allowed : " + qaa);
errors.add(LanguageHelper.getErrorString("validation.stork.qaa.outofrange",
new Object[] {qaa}, request ));
}