aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/moa-id-module-eIDAS/src/main
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2019-06-27 08:32:35 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2019-06-27 08:32:35 +0200
commit062816757bf3f436fd03c2bdad1e8e6711411c3f (patch)
tree5ca14d5fe9a90ebeda52d216137a4042bc3dad44 /id/server/modules/moa-id-module-eIDAS/src/main
parent2f69f5d34faf1b3f6ea51dfec488a642e6dfa30c (diff)
downloadmoa-id-spss-062816757bf3f436fd03c2bdad1e8e6711411c3f.tar.gz
moa-id-spss-062816757bf3f436fd03c2bdad1e8e6711411c3f.tar.bz2
moa-id-spss-062816757bf3f436fd03c2bdad1e8e6711411c3f.zip
add log messages
Diffstat (limited to 'id/server/modules/moa-id-module-eIDAS/src/main')
-rw-r--r--id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/ModifiedEncryptionSW.java19
-rw-r--r--id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eid4u/utils/AttributeScopeMapper.java10
2 files changed, 24 insertions, 5 deletions
diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/ModifiedEncryptionSW.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/ModifiedEncryptionSW.java
index 8779436e0..1b0f258ab 100644
--- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/ModifiedEncryptionSW.java
+++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/ModifiedEncryptionSW.java
@@ -99,10 +99,21 @@ public class ModifiedEncryptionSW extends KeyStoreSamlEngineEncryption {
return useEncryption;
} catch(NullPointerException | ConfigurationException e) {
- Logger.warn("failed to gather information about encryption for countryCode " + countryCode + " - thus, enabling encryption");
- if(Logger.isDebugEnabled())
- e.printStackTrace();
- return true;
+ try {
+ return !Boolean.valueOf(
+ AuthConfigurationProviderFactory.getInstance().getBasicConfiguration(
+ "moa.id.protocols.eIDAS.encryption.disabled",
+ "false"
+ ));
+
+ } catch (ConfigurationException e1) {
+ Logger.warn("failed to gather information about encryption for countryCode " + countryCode + " - thus, enabling encryption");
+ if(Logger.isDebugEnabled())
+ e.printStackTrace();
+
+ return true;
+
+ }
}
diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eid4u/utils/AttributeScopeMapper.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eid4u/utils/AttributeScopeMapper.java
index 69cc131ff..48e64da62 100644
--- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eid4u/utils/AttributeScopeMapper.java
+++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eid4u/utils/AttributeScopeMapper.java
@@ -180,7 +180,12 @@ public class AttributeScopeMapper {
if (StringUtils.isNotEmpty(eIDASAttr)) {
if (!AttributeScopeMapper.getInstance().isComplexeScope(key)) {
Logger.debug("Map simple TUG scope: " + key + " to eIDAS attribute: " + eIDASAttr);
- result.put(eIDASAttr, el.getValue().getAsString());
+ if (StringUtils.isNotEmpty(el.getValue().getAsString())) {
+ Logger.trace("eIDAS attribute: " + eIDASAttr + " has value: " + el.getValue().getAsString());
+ result.put(eIDASAttr, el.getValue().getAsString());
+
+ } else
+ Logger.info("Ignore empty attr: "+ eIDASAttr);
} else {
Logger.trace("Find complex TUG scope: " + key);
@@ -205,6 +210,7 @@ public class AttributeScopeMapper {
address.cvAddressArea(jsonObject.get(AttributeScopeMapper.HomeInstitutionAddressStreet).getAsString());
address.thoroughfare(jsonObject.get(AttributeScopeMapper.HomeInstitutionAddressStreet).getAsString());
result.put(attr, address.build());
+ Logger.debug("Add eIDAS attr: " + Definitions.HOMEINSTITUTIONADDRESS_NAME);
} else if (Definitions.TEMPORARYADDRESS_NAME.equals(attr)) {
address.postCode(jsonObject.get(AttributeScopeMapper.StudyAddressPostalCode).getAsString());
@@ -212,6 +218,7 @@ public class AttributeScopeMapper {
address.cvAddressArea(jsonObject.get(AttributeScopeMapper.StudyAddressStreet).getAsString());
address.thoroughfare(jsonObject.get(AttributeScopeMapper.StudyAddressStreet).getAsString());
result.put(attr, address.build());
+ Logger.debug("Add eIDAS attr: " + Definitions.TEMPORARYADDRESS_NAME);
} else if (eu.eidas.auth.engine.core.eidas.spec.NaturalPersonSpec.Definitions.CURRENT_ADDRESS.getNameUri().toString().equals(attr)) {
address.postCode(jsonObject.get(AttributeScopeMapper.PermanentAddressPostalCode).getAsString());
@@ -219,6 +226,7 @@ public class AttributeScopeMapper {
address.cvAddressArea(jsonObject.get(AttributeScopeMapper.PermanentAddressStreet).getAsString());
address.thoroughfare(jsonObject.get(AttributeScopeMapper.PermanentAddressStreet).getAsString());
result.put(attr, address.build());
+ Logger.debug("Add eIDAS attr: " + eu.eidas.auth.engine.core.eidas.spec.NaturalPersonSpec.Definitions.CURRENT_ADDRESS);
} else {
Logger.warn("Complexe eID4U attribute: " + attr + " is NOT SUPPORTED yet!");