From 2af3fe54a8572b66fd8942a53594792c204fbd9f Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 14 Feb 2019 13:42:16 +0100 Subject: add additional configuration flag --- .../at/gv/egiz/eaaf/core/api/idp/ISPConfiguration.java | 2 ++ .../eaaf/core/impl/idp/conf/SPConfigurationImpl.java | 18 +++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'eaaf_core/src/main/java') diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/ISPConfiguration.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/ISPConfiguration.java index 3b7d3a25..9d92b713 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/ISPConfiguration.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/ISPConfiguration.java @@ -37,6 +37,8 @@ public interface ISPConfiguration extends Serializable { public static final String CONFIG_KEY_RESTRICTIONS_BASEID_INTERNAL = "configuration.restrictions.baseID.idpProcessing"; public static final String CONFIG_KEY_RESTRICTIONS_BASEID_TRANSMISSION = "configuration.restrictions.baseID.spTransmission"; + public static final String CONFIG_KEY_RESTRICTIONS_EID_DEMO_MODE = "configuration.restrictions.eIDTestMode"; + /** * Get the full key/value configuration for this Service Provider * diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/SPConfigurationImpl.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/SPConfigurationImpl.java index adc7629d..6c827489 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/SPConfigurationImpl.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/SPConfigurationImpl.java @@ -47,8 +47,7 @@ public class SPConfigurationImpl implements ISPConfiguration { private final Map spConfiguration; private final List targetAreasWithNoInteralBaseIdRestriction; private final List targetAreasWithNoBaseIdTransmissionRestriction; - - + public SPConfigurationImpl(final Map spConfig, IConfiguration authConfig) { this.spConfiguration = spConfig; @@ -59,11 +58,16 @@ public class SPConfigurationImpl implements ISPConfiguration { CONFIG_KEY_RESTRICTIONS_BASEID_INTERNAL, EAAFConstants.URN_PREFIX_CDID))); - targetAreasWithNoBaseIdTransmissionRestriction = Collections.unmodifiableList( - KeyValueUtils.getListOfCSVValues( - authConfig.getBasicConfiguration( - CONFIG_KEY_RESTRICTIONS_BASEID_TRANSMISSION, - EAAFConstants.URN_PREFIX_CDID))); + if (!authConfig.getBasicMOAIDConfigurationBoolean(CONFIG_KEY_RESTRICTIONS_EID_DEMO_MODE, false)) { + targetAreasWithNoBaseIdTransmissionRestriction = Collections.unmodifiableList( + KeyValueUtils.getListOfCSVValues( + authConfig.getBasicConfiguration( + CONFIG_KEY_RESTRICTIONS_BASEID_TRANSMISSION, + EAAFConstants.URN_PREFIX_CDID))); + + } else + targetAreasWithNoBaseIdTransmissionRestriction = Collections.emptyList(); + if (log.isTraceEnabled()) { log.trace("Internal policy for OA: " + getUniqueIdentifier()); -- cgit v1.2.3