aboutsummaryrefslogtreecommitdiff
path: root/connector/src
diff options
context:
space:
mode:
Diffstat (limited to 'connector/src')
-rw-r--r--connector/src/main/java/at/asitplus/eidas/specific/connector/logger/RevisionLogger.java21
1 files changed, 18 insertions, 3 deletions
diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/logger/RevisionLogger.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/logger/RevisionLogger.java
index 1d29d96b..22e31fa8 100644
--- a/connector/src/main/java/at/asitplus/eidas/specific/connector/logger/RevisionLogger.java
+++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/logger/RevisionLogger.java
@@ -4,17 +4,23 @@ import java.util.Date;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import at.asitplus.eidas.specific.connector.MSeIDASNodeConstants;
import at.gv.egiz.components.eventlog.api.Event;
+import at.gv.egiz.components.eventlog.api.EventConstants;
import at.gv.egiz.components.eventlog.api.EventLogFactory;
import at.gv.egiz.components.eventlog.api.EventLoggingException;
import at.gv.egiz.eaaf.core.api.IRequest;
+import at.gv.egiz.eaaf.core.api.idp.IConfiguration;
import at.gv.egiz.eaaf.core.api.idp.ISPConfiguration;
import at.gv.egiz.eaaf.core.api.logging.IRevisionLogger;
public class RevisionLogger extends EventLogFactory implements IRevisionLogger {
private static final Logger log = LoggerFactory.getLogger(RevisionLogger.class);
-
+
+ @Autowired private IConfiguration basicConfig;
+
@Override
public void logEvent(ISPConfiguration oaConfig, int eventCode, String message) {
logEvent(createNewEvent(new Date().getTime(), eventCode, message));
@@ -55,9 +61,18 @@ public class RevisionLogger extends EventLogFactory implements IRevisionLogger {
private void logEvent(Event event) {
try {
- if (event.getEventCode() >= 1100)
+ if (event.getEventCode() >= 1100) {
+ if ( (event.getEventCode() == EventConstants.TRANSACTION_IP)
+ && !basicConfig.getBasicMOAIDConfigurationBoolean(
+ MSeIDASNodeConstants.PROP_CONFIG_REVISIONLOG_LOG_IP_ADDRESS_OF_USER, true) ) {
+ log.trace("Ignore Event: " + event.getEventCode() + " because IP adresse logging prohibited");
+ return;
+
+ }
+
getEventLog().logEvent(event);
- else
+
+ } else
log.trace("Ignore Event: " + event.getEventCode() + " because session functionallity is not implemented");
} catch (EventLoggingException e) {