Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b37fc5e1b | |||
| 9a730dc0b7 | |||
| 0ff2259f78 |
+1
-1
Submodule elink-online-common updated: a923ff3f9f...9e1f7391a0
+1
-1
Submodule elink-online-core updated: 2929fc753f...f5a653ca6a
+1
-1
Submodule elink-online-transformer updated: a1d822c2d7...f9e6522b8f
+3
-12
@@ -6,7 +6,6 @@ import java.util.Properties;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.json.simple.JSONObject;
|
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
|
||||||
import com.eactive.eai.adapter.http.dynamic.filter.FilterException;
|
import com.eactive.eai.adapter.http.dynamic.filter.FilterException;
|
||||||
@@ -16,6 +15,7 @@ import com.eactive.eai.common.security.ARIACryptoModuleExtension;
|
|||||||
import com.eactive.eai.common.security.CryptoModuleExtension;
|
import com.eactive.eai.common.security.CryptoModuleExtension;
|
||||||
import com.eactive.eai.common.util.Logger;
|
import com.eactive.eai.common.util.Logger;
|
||||||
import com.eactive.eai.util.HexaConverter;
|
import com.eactive.eai.util.HexaConverter;
|
||||||
|
import com.eactive.eai.util.JsonPathUtil;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
@@ -30,17 +30,8 @@ public class DecrytTestFilter implements HttpAdapterFilter {
|
|||||||
public Object doPreFilter(String adptGrpName, String adptName, Object message, Properties prop,
|
public Object doPreFilter(String adptGrpName, String adptName, Object message, Properties prop,
|
||||||
HttpServletRequest request, HttpServletResponse response) throws Exception {
|
HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
try {
|
try {
|
||||||
ObjectNode rootNode = null;
|
ObjectNode rootNode = (ObjectNode)JsonPathUtil.toTree(message);
|
||||||
String jsonStr = null;
|
|
||||||
if (message instanceof String) {
|
|
||||||
jsonStr = (String) message;
|
|
||||||
} else if (message instanceof JSONObject) {
|
|
||||||
jsonStr = ((JSONObject) message).toJSONString();
|
|
||||||
} else {
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
rootNode = (ObjectNode) OBJECT_MAPPER.readTree(jsonStr);
|
|
||||||
|
|
||||||
JsonNode alg = rootNode.get("alg");
|
JsonNode alg = rootNode.get("alg");
|
||||||
JsonNode mode = rootNode.get("mode");
|
JsonNode mode = rootNode.get("mode");
|
||||||
JsonNode padding = rootNode.get("padding");
|
JsonNode padding = rootNode.get("padding");
|
||||||
|
|||||||
+3
-15
@@ -8,7 +8,6 @@ import javax.crypto.SecretKey;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.json.simple.JSONObject;
|
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
|
||||||
import com.eactive.eai.adapter.http.dynamic.filter.FilterException;
|
import com.eactive.eai.adapter.http.dynamic.filter.FilterException;
|
||||||
@@ -19,6 +18,7 @@ import com.eactive.eai.common.security.ARIACryptoModuleExtension;
|
|||||||
import com.eactive.eai.common.security.CryptoModuleExtension;
|
import com.eactive.eai.common.security.CryptoModuleExtension;
|
||||||
import com.eactive.eai.common.util.Logger;
|
import com.eactive.eai.common.util.Logger;
|
||||||
import com.eactive.eai.util.HexaConverter;
|
import com.eactive.eai.util.HexaConverter;
|
||||||
|
import com.eactive.eai.util.JsonPathUtil;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
@@ -33,20 +33,8 @@ public class EncrytTestFilter implements HttpAdapterFilter {
|
|||||||
public Object doPreFilter(String adptGrpName, String adptName, Object message, Properties prop,
|
public Object doPreFilter(String adptGrpName, String adptName, Object message, Properties prop,
|
||||||
HttpServletRequest request, HttpServletResponse response) throws Exception {
|
HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
try {
|
try {
|
||||||
ObjectNode rootNode = null;
|
ObjectNode rootNode = (ObjectNode)JsonPathUtil.toTree(message);
|
||||||
String jsonStr = null;
|
|
||||||
if (message instanceof String) {
|
|
||||||
jsonStr = (String) message;
|
|
||||||
} else if (message instanceof ObjectNode) {
|
|
||||||
rootNode = (ObjectNode) message;
|
|
||||||
} else if (message instanceof JSONObject) {
|
|
||||||
jsonStr = ((JSONObject) message).toJSONString();
|
|
||||||
} else {
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
if(rootNode == null)
|
|
||||||
rootNode = (ObjectNode) OBJECT_MAPPER.readTree(jsonStr);
|
|
||||||
|
|
||||||
// 1. HSM에서 키 가져오기
|
// 1. HSM에서 키 가져오기
|
||||||
byte[] hsmKeyBytes = null;
|
byte[] hsmKeyBytes = null;
|
||||||
JsonNode hsmKeyAlias = rootNode.get("hsmKeyAlias");
|
JsonNode hsmKeyAlias = rootNode.get("hsmKeyAlias");
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import java.util.Properties;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.json.simple.JSONObject;
|
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
|
||||||
import com.eactive.eai.adapter.http.dynamic.filter.FilterException;
|
import com.eactive.eai.adapter.http.dynamic.filter.FilterException;
|
||||||
@@ -18,6 +17,7 @@ import com.eactive.eai.common.util.Logger;
|
|||||||
import com.eactive.eai.custom.common.security.keyderiv.HsmContextSha256KeyDerivationStrategy;
|
import com.eactive.eai.custom.common.security.keyderiv.HsmContextSha256KeyDerivationStrategy;
|
||||||
import com.eactive.eai.custom.common.security.keyderiv.HsmKeyAndIvSliceDerivationStrategy;
|
import com.eactive.eai.custom.common.security.keyderiv.HsmKeyAndIvSliceDerivationStrategy;
|
||||||
import com.eactive.eai.util.HexaConverter;
|
import com.eactive.eai.util.HexaConverter;
|
||||||
|
import com.eactive.eai.util.JsonPathUtil;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
@@ -32,17 +32,8 @@ public class GenKeyFilter implements HttpAdapterFilter {
|
|||||||
public Object doPreFilter(String adptGrpName, String adptName, Object message, Properties prop,
|
public Object doPreFilter(String adptGrpName, String adptName, Object message, Properties prop,
|
||||||
HttpServletRequest request, HttpServletResponse response) throws Exception {
|
HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
try {
|
try {
|
||||||
ObjectNode rootNode = null;
|
ObjectNode rootNode = (ObjectNode)JsonPathUtil.toTree(message);
|
||||||
String jsonStr = null;
|
|
||||||
if (message instanceof String) {
|
|
||||||
jsonStr = (String) message;
|
|
||||||
} else if (message instanceof JSONObject) {
|
|
||||||
jsonStr = ((JSONObject) message).toJSONString();
|
|
||||||
} else {
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
rootNode = (ObjectNode) OBJECT_MAPPER.readTree(jsonStr);
|
|
||||||
|
|
||||||
JsonNode hsmKey = rootNode.get("hsmKey");
|
JsonNode hsmKey = rootNode.get("hsmKey");
|
||||||
JsonNode hsmIv = rootNode.get("hsmIv");
|
JsonNode hsmIv = rootNode.get("hsmIv");
|
||||||
JsonNode contextKey = rootNode.get("contextKey");
|
JsonNode contextKey = rootNode.get("contextKey");
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public final class GUIDGeneratorDJB {
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
// 노드번호(2): 서버명 마지막 2자리, 없으면 "00"
|
// 노드번호(2): 서버명 마지막 2자리, 없으면 "00"
|
||||||
String serverName = System.getProperty("server.key", "");
|
String serverName = System.getProperty(com.eactive.eai.common.server.Keys.SERVER_KEY, "");
|
||||||
if (serverName.length() >= 2) {
|
if (serverName.length() >= 2) {
|
||||||
NODE_NO = serverName.substring(serverName.length() - 2);
|
NODE_NO = serverName.substring(serverName.length() - 2);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user