summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eaaf_core/checks/spotbugs-exclude.xml8
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java2
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractController.java2
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java2
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java38
-rw-r--r--eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/controller/ProtocolFinalizationControllerTest.java2
-rw-r--r--eaaf_core_api/checks/spotbugs-exclude.xml12
-rw-r--r--eaaf_core_api/pom.xml17
-rw-r--r--eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafAuthenticationException.java9
-rw-r--r--eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafException.java9
-rw-r--r--eaaf_core_utils/checks/spotbugs-exclude.xml7
-rw-r--r--eaaf_core_utils/pom.xml15
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/data/ExceptionContainer.java (renamed from eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ExceptionContainer.java)54
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/SpConfigurationImpl.java37
-rw-r--r--eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/exceptions/SL20Exception.java8
-rw-r--r--eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/exceptions/SlCommandoParserException.java5
-rw-r--r--pom.xml7
17 files changed, 210 insertions, 24 deletions
diff --git a/eaaf_core/checks/spotbugs-exclude.xml b/eaaf_core/checks/spotbugs-exclude.xml
index b12ecc01..03938cd1 100644
--- a/eaaf_core/checks/spotbugs-exclude.xml
+++ b/eaaf_core/checks/spotbugs-exclude.xml
@@ -51,4 +51,12 @@
</OR>
<Bug pattern="CRLF_INJECTION_LOGS" />
</Match>
+ <Match>
+ <OR>
+ <Class name="at.gv.egiz.eaaf.core.impl.idp.controller.protocols.RequestImpl" />
+ </OR>
+ <OR>
+ <Bug pattern="JACKSON_UNSAFE_DESERIALIZATION" />
+ </OR>
+ </Match>
</FindBugsFilter>
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java
index 98ea339e..08fcf6f8 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java
@@ -43,7 +43,6 @@ import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.IRequestStorage;
import at.gv.egiz.eaaf.core.api.IStatusMessenger;
import at.gv.egiz.eaaf.core.api.data.EaafConstants;
-import at.gv.egiz.eaaf.core.api.data.ExceptionContainer;
import at.gv.egiz.eaaf.core.api.gui.IGuiBuilderConfiguration;
import at.gv.egiz.eaaf.core.api.gui.IGuiBuilderConfigurationFactory;
import at.gv.egiz.eaaf.core.api.gui.IGuiFormBuilder;
@@ -69,6 +68,7 @@ import at.gv.egiz.eaaf.core.exceptions.GuiBuildException;
import at.gv.egiz.eaaf.core.exceptions.InvalidProtocolRequestException;
import at.gv.egiz.eaaf.core.exceptions.ProcessExecutionException;
import at.gv.egiz.eaaf.core.exceptions.ProtocolNotActiveException;
+import at.gv.egiz.eaaf.core.impl.data.ExceptionContainer;
import at.gv.egiz.eaaf.core.impl.data.Pair;
import at.gv.egiz.eaaf.core.impl.gui.AbstractGuiFormBuilderConfiguration;
import at.gv.egiz.eaaf.core.impl.http.HttpUtils;
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractController.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractController.java
index 4fa2676d..ab0ce9d5 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractController.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractController.java
@@ -36,7 +36,6 @@ import at.gv.egiz.components.eventlog.api.EventConstants;
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.IStatusMessenger;
import at.gv.egiz.eaaf.core.api.data.EaafConstants;
-import at.gv.egiz.eaaf.core.api.data.ExceptionContainer;
import at.gv.egiz.eaaf.core.api.idp.IConfigurationWithSP;
import at.gv.egiz.eaaf.core.api.idp.auth.services.IProtocolAuthenticationService;
import at.gv.egiz.eaaf.core.api.logging.IRevisionLogger;
@@ -46,6 +45,7 @@ import at.gv.egiz.eaaf.core.exceptions.EaafException;
import at.gv.egiz.eaaf.core.exceptions.PendingReqIdValidationException;
import at.gv.egiz.eaaf.core.exceptions.ProcessExecutionException;
import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException;
+import at.gv.egiz.eaaf.core.impl.data.ExceptionContainer;
import at.gv.egiz.eaaf.core.impl.data.Pair;
/**
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java
index 099aa180..06da298b 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java
@@ -37,10 +37,10 @@ import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.IRequestStorage;
import at.gv.egiz.eaaf.core.api.IStatusMessenger;
import at.gv.egiz.eaaf.core.api.data.EaafConstants;
-import at.gv.egiz.eaaf.core.api.data.ExceptionContainer;
import at.gv.egiz.eaaf.core.api.idp.IModulInfo;
import at.gv.egiz.eaaf.core.api.utils.IPendingRequestIdGenerationStrategy;
import at.gv.egiz.eaaf.core.exceptions.EaafException;
+import at.gv.egiz.eaaf.core.impl.data.ExceptionContainer;
import at.gv.egiz.eaaf.core.impl.idp.auth.services.ProtocolAuthenticationService;
import at.gv.egiz.eaaf.core.impl.utils.TransactionIdUtils;
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java
index df13fda9..eb32d03f 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java
@@ -33,12 +33,15 @@ import javax.annotation.Nonnull;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.data.EaafConstants;
import at.gv.egiz.eaaf.core.api.idp.IConfiguration;
@@ -49,12 +52,20 @@ import at.gv.egiz.eaaf.core.exceptions.EaafException;
import at.gv.egiz.eaaf.core.exceptions.EaafStorageException;
import at.gv.egiz.eaaf.core.impl.http.HttpUtils;
import at.gv.egiz.eaaf.core.impl.idp.auth.data.AuthProcessDataWrapper;
+import at.gv.egiz.eaaf.core.impl.json.EscapedJsonDeserializer;
+import at.gv.egiz.eaaf.core.impl.json.EscapedJsonSerializer;
import at.gv.egiz.eaaf.core.impl.utils.TransactionIdUtils;
-
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+@Getter
+@Setter
+@NoArgsConstructor
public abstract class RequestImpl implements IRequest, Serializable {
- private static final Logger log = LoggerFactory.getLogger(RequestImpl.class);
-
public static final String DATAID_REQUESTER_IP_ADDRESS = "reqestImpl_requesterIPAddr";
private static final String ERROR_CODE_INTERNAL_00 = "eaaf.core.00";
@@ -75,6 +86,9 @@ public abstract class RequestImpl implements IRequest, Serializable {
private String requestedServiceProviderIdentifer;
private String idpAuthUrl = null;
+ @JsonTypeInfo(include = JsonTypeInfo.As.PROPERTY, use = JsonTypeInfo.Id.CLASS, property = "@class")
+ @JsonSerialize(using = EscapedJsonSerializer.class)
+ @JsonDeserialize(using = EscapedJsonDeserializer.class)
private ISpConfiguration spConfiguration = null;
private boolean passiv = false;
@@ -227,6 +241,7 @@ public abstract class RequestImpl implements IRequest, Serializable {
this.passiv = passiv;
}
+
public final void setForce(final boolean force) {
this.force = force;
}
@@ -298,12 +313,14 @@ public abstract class RequestImpl implements IRequest, Serializable {
}
+ @JsonIgnore
@Override
public final ISpConfiguration getServiceProviderConfiguration() {
return this.spConfiguration;
}
+ @JsonIgnore
@Override
public <T> T getServiceProviderConfiguration(final Class<T> decorator) {
if (this.spConfiguration != null) {
@@ -322,17 +339,25 @@ public abstract class RequestImpl implements IRequest, Serializable {
}
+ /**
+ * Inject Service-Provider configuration into that authentication process.
+ *
+ * @param spConfig SP configuration
+ */
+ @JsonIgnore
public void setOnlineApplicationConfiguration(final ISpConfiguration spConfig) {
this.spConfiguration = spConfig;
}
+ @JsonIgnore
@Override
public final String getUniqueTransactionIdentifier() {
return this.uniqueTransactionIdentifer;
}
+ @JsonIgnore
@Override
public final String getUniqueSessionIdentifier() {
return this.uniqueSessionIdentifer;
@@ -390,11 +415,13 @@ public abstract class RequestImpl implements IRequest, Serializable {
}
+ @JsonIgnore
@Override
public final String getAuthUrl() {
return this.idpAuthUrl;
}
+ @JsonIgnore
@Override
public final String getAuthUrlWithOutSlash() {
if (this.idpAuthUrl.endsWith("/")) {
@@ -458,6 +485,7 @@ public abstract class RequestImpl implements IRequest, Serializable {
}
+ @JsonIgnore
@Override
public boolean isProcessInIframe() {
return this.currentlyInIframe;
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/controller/ProtocolFinalizationControllerTest.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/controller/ProtocolFinalizationControllerTest.java
index e165f84b..a866f45f 100644
--- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/controller/ProtocolFinalizationControllerTest.java
+++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/controller/ProtocolFinalizationControllerTest.java
@@ -22,13 +22,13 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import at.gv.egiz.eaaf.core.api.data.EaafConfigConstants;
import at.gv.egiz.eaaf.core.api.data.EaafConstants;
-import at.gv.egiz.eaaf.core.api.data.ExceptionContainer;
import at.gv.egiz.eaaf.core.api.gui.GroupDefinition;
import at.gv.egiz.eaaf.core.api.gui.ModifyableGuiBuilderConfiguration;
import at.gv.egiz.eaaf.core.api.idp.IConfiguration;
import at.gv.egiz.eaaf.core.api.storage.ITransactionStorage;
import at.gv.egiz.eaaf.core.api.utils.IPendingRequestIdGenerationStrategy;
import at.gv.egiz.eaaf.core.exceptions.EaafException;
+import at.gv.egiz.eaaf.core.impl.data.ExceptionContainer;
import at.gv.egiz.eaaf.core.impl.gui.AbstractGuiFormBuilderConfiguration;
import at.gv.egiz.eaaf.core.impl.idp.auth.dummy.DummyDefaultErrorService;
import at.gv.egiz.eaaf.core.impl.idp.auth.services.IErrorService.ActionType;
diff --git a/eaaf_core_api/checks/spotbugs-exclude.xml b/eaaf_core_api/checks/spotbugs-exclude.xml
new file mode 100644
index 00000000..1c4cf203
--- /dev/null
+++ b/eaaf_core_api/checks/spotbugs-exclude.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<FindBugsFilter>
+ <!-- Required polymoric serialization, because we has no class implementation on compile time. -->
+ <Match>
+ <OR>
+ <Class name="at.gv.egiz.eaaf.core.api.data.ExceptionContainer" />
+ </OR>
+ <OR>
+ <Bug pattern="JACKSON_UNSAFE_DESERIALIZATION" />
+ </OR>
+ </Match>
+</FindBugsFilter> \ No newline at end of file
diff --git a/eaaf_core_api/pom.xml b/eaaf_core_api/pom.xml
index ce140dea..8cf64e77 100644
--- a/eaaf_core_api/pom.xml
+++ b/eaaf_core_api/pom.xml
@@ -48,6 +48,10 @@
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ </dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
@@ -63,6 +67,19 @@
<directory>src/main/resources</directory>
</resource>
</resources>
+
+ <plugins>
+ <plugin>
+ <groupId>com.github.spotbugs</groupId>
+ <artifactId>spotbugs-maven-plugin</artifactId>
+ <version>${spotbugs-maven-plugin.version}</version>
+ <configuration>
+ <failOnError>true</failOnError>
+ <excludeFilterFile>checks/spotbugs-exclude.xml</excludeFilterFile>
+ </configuration>
+ </plugin>
+ </plugins>
+
</build>
</project>
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafAuthenticationException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafAuthenticationException.java
index 22c8a8ca..732834e1 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafAuthenticationException.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafAuthenticationException.java
@@ -19,10 +19,19 @@
package at.gv.egiz.eaaf.core.exceptions;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
public class EaafAuthenticationException extends EaafException {
private static final long serialVersionUID = -4793625336456467005L;
+ @JsonCreator
+ public EaafAuthenticationException(
+ @JsonProperty("errorId") final String internalMsgId) {
+ super(internalMsgId);
+ }
+
public EaafAuthenticationException(final String internalMsgId, final Object[] params) {
super(internalMsgId, params);
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafException.java
index e1719abc..d2d42b31 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafException.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafException.java
@@ -23,15 +23,22 @@ import java.util.Arrays;
import javax.annotation.Nullable;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
import at.gv.egiz.eaaf.core.impl.logging.LogMessageProviderFactory;
+import lombok.Setter;
public class EaafException extends Exception {
private static final long serialVersionUID = -4527097018108560426L;
private String errorId = null;
+
+ @Setter
private Object[] params = null;
- public EaafException(final String errorId) {
+ @JsonCreator
+ public EaafException(@JsonProperty("errorId") final String errorId) {
super(LogMessageProviderFactory.getMessager().getMessage(errorId, null));
this.errorId = errorId;
}
diff --git a/eaaf_core_utils/checks/spotbugs-exclude.xml b/eaaf_core_utils/checks/spotbugs-exclude.xml
index c1271f91..58ed1595 100644
--- a/eaaf_core_utils/checks/spotbugs-exclude.xml
+++ b/eaaf_core_utils/checks/spotbugs-exclude.xml
@@ -28,5 +28,12 @@
<Bug pattern="URLCONNECTION_SSRF_FD" />
<Bug pattern="PATH_TRAVERSAL_IN" />
</OR>
+ </Match>
+ <Match>
+ <Class name="at.gv.egiz.eaaf.core.impl.data.ExceptionContainer" />
+ <OR>
+ <Bug pattern="JACKSON_UNSAFE_DESERIALIZATION" /> <!-- Use custom deserialization that implements some harding -->
+ <Bug pattern="EI_EXPOSE_REP" />
+ </OR>
</Match>
</FindBugsFilter> \ No newline at end of file
diff --git a/eaaf_core_utils/pom.xml b/eaaf_core_utils/pom.xml
index d6743c8a..f8a39521 100644
--- a/eaaf_core_utils/pom.xml
+++ b/eaaf_core_utils/pom.xml
@@ -80,6 +80,21 @@
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ </dependency>
<dependency>
<groupId>org.bitbucket.b_c</groupId>
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ExceptionContainer.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/data/ExceptionContainer.java
index 80c7094c..cdb41147 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ExceptionContainer.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/data/ExceptionContainer.java
@@ -17,11 +17,26 @@
* works that you distribute must include a readable copy of the "NOTICE" text file.
*/
-package at.gv.egiz.eaaf.core.api.data;
+package at.gv.egiz.eaaf.core.impl.data;
import java.io.Serializable;
+import java.util.Collections;
+import java.util.Set;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import at.gv.egiz.eaaf.core.api.IRequest;
+import at.gv.egiz.eaaf.core.impl.json.EscapedJsonDeserializer;
+import at.gv.egiz.eaaf.core.impl.json.EscapedJsonSerializer;
+import at.gv.egiz.eaaf.core.impl.utils.EaafSerializationUtils;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
/**
* AuthProcess exception containter for Front-Channel exception handling.
@@ -29,10 +44,28 @@ import at.gv.egiz.eaaf.core.api.IRequest;
* @author tlenz
*
*/
+@Getter
+@Setter
+@NoArgsConstructor
public class ExceptionContainer implements Serializable {
private static final long serialVersionUID = 5355860753609684995L;
- private Throwable exceptionThrown = null;
+
+ private static final Set<Class<?>> ALLOWED_CLASS_TYPES = Stream.of(
+ Throwable.class, StackTraceElement.class, StackTraceElement[].class, Collections.EMPTY_LIST.getClass())
+ .collect(Collectors.toUnmodifiableSet());
+
+ /**
+ * Error that was thrown.
+ */
+ private byte[] internalExceptionThrown = null;
+
+ /**
+ * pendingReq that throws this error.
+ */
+ @JsonTypeInfo(include = JsonTypeInfo.As.PROPERTY, use = JsonTypeInfo.Id.CLASS, property = "@class")
+ @JsonSerialize(using = EscapedJsonSerializer.class)
+ @JsonDeserialize(using = EscapedJsonDeserializer.class)
private IRequest pendingReq = null;
/**
@@ -43,19 +76,23 @@ public class ExceptionContainer implements Serializable {
*/
public ExceptionContainer(final IRequest pendingReq, final Throwable exception) {
this.pendingReq = pendingReq;
- this.exceptionThrown = exception;
+ this.internalExceptionThrown = EaafSerializationUtils.serialize(exception);
}
/**
- * Get the error.
- *
- * @return the exceptionThrown
+ * Get the exception that was thrown in this process.
+ *
+ * @return Processing error
*/
+ @JsonIgnore
public Throwable getExceptionThrown() {
- return this.exceptionThrown;
+ return (Throwable) EaafSerializationUtils.typeSpecificDeserialize(
+ internalExceptionThrown, ALLOWED_CLASS_TYPES, Throwable.class);
+
}
+ @JsonIgnore
public IRequest getPendingRequest() {
return this.pendingReq;
@@ -66,6 +103,7 @@ public class ExceptionContainer implements Serializable {
*
* @return the uniqueSessionID
*/
+ @JsonIgnore
public String getUniqueSessionID() {
if (this.pendingReq != null) {
return this.pendingReq.getUniqueSessionIdentifier();
@@ -79,6 +117,7 @@ public class ExceptionContainer implements Serializable {
*
* @return the uniqueTransactionID
*/
+ @JsonIgnore
public String getUniqueTransactionID() {
if (this.pendingReq != null) {
return this.pendingReq.getUniqueTransactionIdentifier();
@@ -92,6 +131,7 @@ public class ExceptionContainer implements Serializable {
*
* @return the uniqueServiceProviderId
*/
+ @JsonIgnore
public String getUniqueServiceProviderId() {
if (this.pendingReq != null && this.pendingReq.getServiceProviderConfiguration() != null) {
return this.pendingReq.getServiceProviderConfiguration().getUniqueIdentifier();
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/SpConfigurationImpl.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/SpConfigurationImpl.java
index 2f4e18fa..fa0fe7f5 100644
--- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/SpConfigurationImpl.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/idp/conf/SpConfigurationImpl.java
@@ -25,23 +25,35 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import com.fasterxml.jackson.annotation.JsonIgnore;
import at.gv.egiz.eaaf.core.api.data.EaafConfigConstants;
import at.gv.egiz.eaaf.core.api.data.EaafConstants;
import at.gv.egiz.eaaf.core.api.idp.IConfiguration;
import at.gv.egiz.eaaf.core.api.idp.ISpConfiguration;
import at.gv.egiz.eaaf.core.impl.utils.KeyValueUtils;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import lombok.extern.slf4j.Slf4j;
+@Slf4j
+@NoArgsConstructor
public class SpConfigurationImpl implements ISpConfiguration {
private static final long serialVersionUID = 688541755446463453L;
- private static final Logger log = LoggerFactory.getLogger(SpConfigurationImpl.class);
- private final Map<String, String> spConfiguration;
- private final Set<String> targetAreasWithNoInteralBaseIdRestriction;
- private final Set<String> targetAreasWithNoBaseIdTransmissionRestriction;
+ @Getter
+ @Setter
+ private Map<String, String> spConfiguration;
+
+ @Getter
+ @Setter
+ private Set<String> targetAreasWithNoInteralBaseIdRestriction;
+
+ @Getter
+ @Setter
+ private Set<String> targetAreasWithNoBaseIdTransmissionRestriction;
/**
* Service-provider configuration holder.
@@ -71,12 +83,14 @@ public class SpConfigurationImpl implements ISpConfiguration {
}
}
+ @JsonIgnore
@Override
public final Map<String, String> getFullConfiguration() {
return this.spConfiguration;
}
+ @JsonIgnore
@Override
public final String getConfigurationValue(final String key) {
if (key == null) {
@@ -87,6 +101,7 @@ public class SpConfigurationImpl implements ISpConfiguration {
}
+ @JsonIgnore
@Override
public final String getConfigurationValue(final String key, final String defaultValue) {
final String value = getConfigurationValue(key);
@@ -97,12 +112,14 @@ public class SpConfigurationImpl implements ISpConfiguration {
}
}
+ @JsonIgnore
@Override
public final boolean isConfigurationValue(final String key) {
return isConfigurationValue(key, false);
}
+ @JsonIgnore
@Override
public final boolean isConfigurationValue(final String key, final boolean defaultValue) {
final String value = getConfigurationValue(key);
@@ -114,6 +131,7 @@ public class SpConfigurationImpl implements ISpConfiguration {
return defaultValue;
}
+ @JsonIgnore
@Override
public final boolean containsConfigurationKey(final String key) {
if (key == null) {
@@ -124,6 +142,7 @@ public class SpConfigurationImpl implements ISpConfiguration {
}
+ @JsonIgnore
@Override
public String getUniqueIdentifier() {
return getConfigurationValue(EaafConfigConstants.SERVICE_UNIQUEIDENTIFIER);
@@ -142,16 +161,19 @@ public class SpConfigurationImpl implements ISpConfiguration {
}
+ @JsonIgnore
@Override
public final Set<String> getTargetsWithNoBaseIdInternalProcessingRestriction() {
return this.targetAreasWithNoInteralBaseIdRestriction;
}
+ @JsonIgnore
@Override
public final Set<String> getTargetsWithNoBaseIdTransferRestriction() {
return this.targetAreasWithNoBaseIdTransmissionRestriction;
}
+ @JsonIgnore
@Override
public List<String> getRequiredLoA() {
log.warn(
@@ -159,6 +181,7 @@ public class SpConfigurationImpl implements ISpConfiguration {
return null;
}
+ @JsonIgnore
@Override
public String getLoAMatchingMode() {
log.warn("Method not implemented: " + SpConfigurationImpl.class.getName()
@@ -166,6 +189,7 @@ public class SpConfigurationImpl implements ISpConfiguration {
return null;
}
+ @JsonIgnore
@Override
public String getAreaSpecificTargetIdentifier() {
log.warn("Method not implemented: " + SpConfigurationImpl.class.getName()
@@ -173,6 +197,7 @@ public class SpConfigurationImpl implements ISpConfiguration {
return null;
}
+ @JsonIgnore
@Override
public String getFriendlyName() {
log.warn(
diff --git a/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/exceptions/SL20Exception.java b/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/exceptions/SL20Exception.java
index 08373a2d..2f01a0b9 100644
--- a/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/exceptions/SL20Exception.java
+++ b/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/exceptions/SL20Exception.java
@@ -1,11 +1,19 @@
package at.gv.egiz.eaaf.modules.auth.sl20.exceptions;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
import at.gv.egiz.eaaf.core.exceptions.EaafAuthenticationException;
public class SL20Exception extends EaafAuthenticationException {
private static final long serialVersionUID = -6716465236880571576L;
+ @JsonCreator
+ public SL20Exception(@JsonProperty("errorId") final String messageId) {
+ super(messageId);
+ }
+
public SL20Exception(final String messageId, final Object[] parameters) {
super(messageId, parameters);
diff --git a/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/exceptions/SlCommandoParserException.java b/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/exceptions/SlCommandoParserException.java
index 4993796a..307507cf 100644
--- a/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/exceptions/SlCommandoParserException.java
+++ b/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/exceptions/SlCommandoParserException.java
@@ -4,6 +4,11 @@ public class SlCommandoParserException extends SL20Exception {
private static final long serialVersionUID = 1L;
+ public SlCommandoParserException() {
+ super("sl20.02", null);
+
+ }
+
public SlCommandoParserException(final String msg) {
super("sl20.02", new Object[] { msg });
diff --git a/pom.xml b/pom.xml
index d06c8f10..784350ba 100644
--- a/pom.xml
+++ b/pom.xml
@@ -664,7 +664,12 @@
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-parameter-names</artifactId>
<version>${com.fasterxml.jackson.core.version}</version>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ <version>${com.fasterxml.jackson.core.version}</version>
+ </dependency>
<dependency>
<groupId>com.google.code.gson</groupId>