aboutsummaryrefslogtreecommitdiff
path: root/id
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2020-02-19 13:46:10 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2020-02-19 13:46:10 +0100
commit830e1912e44e666c6853c9fedefcb032637bd0d9 (patch)
treed7684473c991bb4e786753b96ee37685d2905a5e /id
parent7c361d450a97b9d79a1da90961fd727d2808f9c8 (diff)
downloadmoa-id-spss-830e1912e44e666c6853c9fedefcb032637bd0d9.tar.gz
moa-id-spss-830e1912e44e666c6853c9fedefcb032637bd0d9.tar.bz2
moa-id-spss-830e1912e44e666c6853c9fedefcb032637bd0d9.zip
separate between E-ID Proxy-Mode and Demo-Mode
Diffstat (limited to 'id')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OATargetConfiguration.java13
-rw-r--r--id/ConfigWebTool/src/main/resources/applicationResources_de.properties5
-rw-r--r--id/ConfigWebTool/src/main/resources/applicationResources_en.properties5
-rw-r--r--id/ConfigWebTool/src/main/webapp/jsp/snippets/OA/targetConfiguration.jsp11
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java12
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameterDecorator.java6
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java10
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/MOAIDConfigurationConstants.java1
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/deprecated/OnlineApplication.java13
-rw-r--r--id/server/modules/moa-id-module-E-ID_connector/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidproxyauth/EIDProxyAuthModuleImpl.java2
-rw-r--r--id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java6
11 files changed, 70 insertions, 14 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OATargetConfiguration.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OATargetConfiguration.java
index b2671302c..84516c73f 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OATargetConfiguration.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OATargetConfiguration.java
@@ -61,6 +61,7 @@ public class OATargetConfiguration implements IOnlineApplicationData {
private String foreignbPKTargets = null;
private String additionalbPKTargets = null;
private boolean eidDemoActive = false;
+ private boolean eidProxyActive = false;
public OATargetConfiguration() {
targetList = TargetValidator.getListOfTargets();
@@ -187,7 +188,7 @@ public class OATargetConfiguration implements IOnlineApplicationData {
//parse 'Austrian eID mode' flag
eidDemoActive = dbOA.getIseIDDemoModeActive();
-
+ eidProxyActive = dbOA.getIseIDProxyModeActive();
return null;
}
@@ -301,6 +302,7 @@ public class OATargetConfiguration implements IOnlineApplicationData {
dbOA.setForeignbPKTargetList(getForeignbPKTargets());
dbOA.setAdditionalbPKTargetList(getAdditionalbPKTargets());
dbOA.setIseIDDemoModeActive(isEidDemoActive());
+ dbOA.setIseIDProxyModeActive(isEidProxyActive());
return null;
}
@@ -490,7 +492,14 @@ public class OATargetConfiguration implements IOnlineApplicationData {
this.eidDemoActive = eidDemoActive;
}
-
+ public boolean isEidProxyActive() {
+ return eidProxyActive;
+ }
+
+
+ public void setEidProxyActive(boolean eidProxyActive) {
+ this.eidProxyActive = eidProxyActive;
+ }
diff --git a/id/ConfigWebTool/src/main/resources/applicationResources_de.properties b/id/ConfigWebTool/src/main/resources/applicationResources_de.properties
index 3b053d665..2ef63a529 100644
--- a/id/ConfigWebTool/src/main/resources/applicationResources_de.properties
+++ b/id/ConfigWebTool/src/main/resources/applicationResources_de.properties
@@ -264,8 +264,9 @@ webpages.oaconfig.general.aditional.useUTC=UTC Zeit verwenden
webpages.oaconfig.general.aditional.calculateHPI="TODO!"
webpages.oaconfig.general.isHideBPKAuthBlock=bPK/wbPK im AuthBlock ausblenden
-webpages.oaconfig.general.neweid.header=E-ID Proxy-Mode
-webpages.oaconfig.general.neweid.activate=E-ID Proxy-Mode aktivieren
+webpages.oaconfig.general.neweid.header=E-ID Mode
+webpages.oaconfig.general.neweid.proxy.activate=E-ID Proxy-Mode aktivieren
+webpages.oaconfig.general.neweid.demo.activate=E-ID Demo-Mode aktivieren
webpages.oaconfig.general.foreign.header=Weitere bPKs/fremd-bPKs im MOA-ID Mode
webpages.oaconfig.general.foreign.sectors=Sektoren f\u00FCr Fremd-bPKs (CSV)
diff --git a/id/ConfigWebTool/src/main/resources/applicationResources_en.properties b/id/ConfigWebTool/src/main/resources/applicationResources_en.properties
index 550a9df78..6d0a89a64 100644
--- a/id/ConfigWebTool/src/main/resources/applicationResources_en.properties
+++ b/id/ConfigWebTool/src/main/resources/applicationResources_en.properties
@@ -270,8 +270,9 @@ webpages.oaconfig.general.aditional.useUTC=Use UTC time
webpages.oaconfig.general.aditional.calculateHPI="TODO!"
webpages.oaconfig.general.isHideBPKAuthBlock=Hide bPK/wbPK from AuthBlock
-webpages.oaconfig.general.neweid.header=E-ID Proxy Mode
-webpages.oaconfig.general.neweid.activate=Activate E-ID Proxy Mode
+webpages.oaconfig.general.neweid.header=E-ID Mode
+webpages.oaconfig.general.neweid.proxy.activate=Activate E-ID Proxy Mode
+webpages.oaconfig.general.neweid.demo.activate=Activate E-ID Demo Mode
webpages.oaconfig.general.foreign.header=Additional bPKs/foreign-bPKs in case of MOA-ID mode
webpages.oaconfig.general.foreign.sectors=Sectors for foreign pseudonyms (CSV)
diff --git a/id/ConfigWebTool/src/main/webapp/jsp/snippets/OA/targetConfiguration.jsp b/id/ConfigWebTool/src/main/webapp/jsp/snippets/OA/targetConfiguration.jsp
index 6bccd7d48..1f7adea01 100644
--- a/id/ConfigWebTool/src/main/webapp/jsp/snippets/OA/targetConfiguration.jsp
+++ b/id/ConfigWebTool/src/main/webapp/jsp/snippets/OA/targetConfiguration.jsp
@@ -116,12 +116,19 @@
<div id="oa_config_EID_proxy_mode" class="oa_config_block">
<h3><%=LanguageHelper.getGUIString("webpages.oaconfig.general.neweid.header", request) %></h3>
+ <s:checkbox name="targetConfig.eidProxyActive"
+ value="%{targetConfig.eidProxyActive}"
+ labelposition="left"
+ key="webpages.oaconfig.general.neweid.proxy.activate"
+ cssClass="checkbox">
+ </s:checkbox>
+
<s:checkbox name="targetConfig.eidDemoActive"
value="%{targetConfig.eidDemoActive}"
labelposition="left"
- key="webpages.oaconfig.general.neweid.activate"
+ key="webpages.oaconfig.general.neweid.demo.activate"
cssClass="checkbox">
- </s:checkbox>
+ </s:checkbox>
</div>
<div id="oa_config_foreignbPKArea" class="oa_config_block">
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java
index cdb0dae98..3a826ed13 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataBuilder.java
@@ -222,7 +222,11 @@ public class AuthenticationDataBuilder extends AbstractAuthenticationDataBuilder
authData.setIseIDNewDemoMode(Boolean.parseBoolean(
oaParam.getConfigurationValue(
MOAIDConfigurationConstants.SERVICE_AUTH_AUSTRIAN_EID_DEMO_MODE,
- String.valueOf(false))));
+ String.valueOf(false))) ||
+ Boolean.parseBoolean(
+ oaParam.getConfigurationValue(
+ MOAIDConfigurationConstants.SERVICE_AUTH_AUSTRIAN_EID_PROXY_MODE,
+ String.valueOf(false))));
if (authData.isIseIDNewDemoMode()) {
Logger.info("Demo-mode for 'New Austrian eID' is active. Set 'BaseIDTransferRestrication' to true");
@@ -545,7 +549,11 @@ public class AuthenticationDataBuilder extends AbstractAuthenticationDataBuilder
if (Boolean.parseBoolean(
oaParam.getConfigurationValue(
MOAIDConfigurationConstants.SERVICE_AUTH_AUSTRIAN_EID_DEMO_MODE,
- String.valueOf(false)))) {
+ String.valueOf(false))) ||
+ Boolean.parseBoolean(
+ oaParam.getConfigurationValue(
+ MOAIDConfigurationConstants.SERVICE_AUTH_AUSTRIAN_EID_PROXY_MODE,
+ String.valueOf(false)))) {
Logger.info("Demo-Mode for Austrian eID is active. Post-Processing authData according the new requirements ... ");
//build additional bPKs
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameterDecorator.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameterDecorator.java
index ab2a07f7c..e76acfad5 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameterDecorator.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameterDecorator.java
@@ -266,7 +266,11 @@ public String getKeyBoxIdentifier() {
if (Boolean.parseBoolean(
spConfiguration.getConfigurationValue(
MOAIDConfigurationConstants.SERVICE_AUTH_AUSTRIAN_EID_DEMO_MODE,
- String.valueOf(false)))) {
+ String.valueOf(false))) ||
+ Boolean.parseBoolean(
+ spConfiguration.getConfigurationValue(
+ MOAIDConfigurationConstants.SERVICE_AUTH_AUSTRIAN_EID_PROXY_MODE,
+ String.valueOf(false)))) {
Logger.info("Demo-mode for 'New Austrian eID' is active. Restrict SAML1 response ... ");
returnValue.setProvideBaseId(false);
returnValue.setProvideAuthBlock(false);
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java
index 62a19b399..8de41eee7 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java
@@ -183,6 +183,11 @@ public class ConfigurationMigrationUtils {
else
result.put(MOAIDConfigurationConstants.SERVICE_AUTH_AUSTRIAN_EID_DEMO_MODE, Boolean.FALSE.toString());
+ if (oa.getIseIDProxyModeActive() != null)
+ result.put(MOAIDConfigurationConstants.SERVICE_AUTH_AUSTRIAN_EID_PROXY_MODE, oa.getIseIDProxyModeActive().toString());
+ else
+ result.put(MOAIDConfigurationConstants.SERVICE_AUTH_AUSTRIAN_EID_PROXY_MODE, Boolean.FALSE.toString());
+
if (MiscUtil.isNotEmpty(oa.getForeignbPKTargetList()))
result.put(MOAIDConfigurationConstants.SERVICE_AUTH_TARGET_FOREIGN, oa.getForeignbPKTargetList());
else
@@ -884,6 +889,11 @@ public class ConfigurationMigrationUtils {
else
dbOA.setIseIDDemoModeActive(false);
+ if (MiscUtil.isNotEmpty(oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_AUSTRIAN_EID_PROXY_MODE)))
+ dbOA.setIseIDProxyModeActive(Boolean.valueOf(oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_AUSTRIAN_EID_PROXY_MODE)));
+ else
+ dbOA.setIseIDProxyModeActive(false);
+
if (MiscUtil.isNotEmpty(oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_TARGET_FOREIGN)))
dbOA.setForeignbPKTargetList(oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_TARGET_FOREIGN));
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/MOAIDConfigurationConstants.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/MOAIDConfigurationConstants.java
index 91d738989..87f6c6416 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/MOAIDConfigurationConstants.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/MOAIDConfigurationConstants.java
@@ -67,6 +67,7 @@ public final class MOAIDConfigurationConstants extends MOAIDConstants {
public static final String SERVICE_AUTH_TARGET_FOREIGN = SERVICE_AUTH_TARGET + ".foreign";
public static final String SERVICE_AUTH_TARGET_ADDITIONAL_BPKS = SERVICE_AUTH_TARGET + ".additionalbPKs";
public static final String SERVICE_AUTH_AUSTRIAN_EID_DEMO_MODE = AUTH + ".austrianeIDdemomode";
+ public static final String SERVICE_AUTH_AUSTRIAN_EID_PROXY_MODE = AUTH + ".austrianeIDproxymode";
public static final String SERVICE_AUTH_TARGET_PUBLIC_TARGET = SERVICE_AUTH_TARGET_PUBLIC + ".target";
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/deprecated/OnlineApplication.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/deprecated/OnlineApplication.java
index 74a79912e..53be4d980 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/deprecated/OnlineApplication.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/deprecated/OnlineApplication.java
@@ -126,6 +126,9 @@ public class OnlineApplication
@XmlTransient
protected Boolean iseIDDemoModeActive = false;
+
+ @XmlTransient
+ protected Boolean iseIDProxyModeActive = false;
public String getForeignbPKTargetList() {
@@ -155,6 +158,15 @@ public class OnlineApplication
this.iseIDDemoModeActive = iseIDDemoModeActive;
}
+ public Boolean getIseIDProxyModeActive() {
+ return iseIDProxyModeActive ;
+ }
+
+ public void setIseIDProxyModeActive(Boolean valueOf) {
+ this.iseIDProxyModeActive = valueOf;
+
+ }
+
/**
* @return the saml2PostBindingTemplateURL
*/
@@ -639,5 +651,4 @@ public class OnlineApplication
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
-
}
diff --git a/id/server/modules/moa-id-module-E-ID_connector/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidproxyauth/EIDProxyAuthModuleImpl.java b/id/server/modules/moa-id-module-E-ID_connector/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidproxyauth/EIDProxyAuthModuleImpl.java
index 85d9d0f76..094da19c6 100644
--- a/id/server/modules/moa-id-module-E-ID_connector/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidproxyauth/EIDProxyAuthModuleImpl.java
+++ b/id/server/modules/moa-id-module-E-ID_connector/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidproxyauth/EIDProxyAuthModuleImpl.java
@@ -72,7 +72,7 @@ public class EIDProxyAuthModuleImpl implements AuthModule {
if (Boolean.parseBoolean(
pendingReq.getServiceProviderConfiguration().getConfigurationValue(
- MOAIDConfigurationConstants.SERVICE_AUTH_AUSTRIAN_EID_DEMO_MODE,
+ MOAIDConfigurationConstants.SERVICE_AUTH_AUSTRIAN_EID_PROXY_MODE,
String.valueOf(false)))) {
Logger.debug("SP: " + pendingReq.getSPEntityId() + " activates E-ID mode.");
return AUTH_PROCESS_NAME;
diff --git a/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java b/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java
index af8211dee..73d3d369f 100644
--- a/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java
+++ b/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java
@@ -354,7 +354,11 @@ public class SAML1AuthenticationServer extends AuthenticationServer {
if (Boolean.parseBoolean(
oaParam.getConfigurationValue(
MOAIDConfigurationConstants.SERVICE_AUTH_AUSTRIAN_EID_DEMO_MODE,
- String.valueOf(false)))) {
+ String.valueOf(false))) ||
+ Boolean.parseBoolean(
+ oaParam.getConfigurationValue(
+ MOAIDConfigurationConstants.SERVICE_AUTH_AUSTRIAN_EID_PROXY_MODE,
+ String.valueOf(false)))) {
Logger.info("Demo-mode for 'New Austrian eID' is active. Add additonal attributes ... ");
if (oaAttributes == null)