Merge remote-tracking branch 'origin/jenkins_with_weblogic' of C:/KJB_DEV/git-bundles/bundles/251219/elink-online-common_incremental_2025-12-01.bundle into jenkins_with_weblogic

This commit is contained in:
unknown
2025-12-19 11:27:48 +09:00
5 changed files with 17 additions and 5 deletions
@@ -92,6 +92,7 @@ import com.kjbank.encrypt.exchange.crypto.ECDHESA256Cipher;
import com.eactive.eai.authserver.service.OAuth2Manager;
import java.util.Set;
import java.util.HashSet;
import java.util.Date;
/**
* 1. 기능 : EAI HTTP OutBound 용 어댑터로 수동 시스템의 HTTP 웹 컴포넌트를 GET/POST 방식으로 호출할 수 있는
@@ -326,7 +327,8 @@ public class HttpClient5AdapterServiceRest extends HttpClient5AdapterServiceSupp
throw new Exception("NiceOn Token is empty, TOKEN failed to be issued, TOKEN = [" + niceToken + "]");
}
String clientId = accessToken.getClientId(); // HttpClientAccessTokenServiceWithBase64NiceOn 서 넣어줌
long currentTime = System.currentTimeMillis();
Date currentDate = new Date();
long currentTime = currentDate.getTime() / 1000;
auth = niceToken + ":" + currentTime + ":" + clientId ;
logger.debug("HttpClientAdapterServiceRest] NiceOn auth = [" + auth + "]");
auth = Base64.getEncoder().encodeToString(auth.getBytes("UTF-8"));
@@ -339,7 +341,7 @@ public class HttpClient5AdapterServiceRest extends HttpClient5AdapterServiceSupp
if (logger.isDebug()) {
logger.debug("HttpClientAdapterServiceRest] SEND (" + vo.getAdapterGroupName()
+ ") RequestHeader [Authorization=" + method.getHeader("Authorization") + "]");
+ ") RequestHeader [" + method.getHeader("Authorization").getName() + ": " + method.getHeader("Authorization").getValue() + "]");
}
}
@@ -19,6 +19,7 @@ import com.eactive.eai.adapter.http.dynamic.HttpAdapterServiceKey;
import com.eactive.eai.adapter.http.dynamic.HttpAdapterServiceSupport;
import com.eactive.eai.authserver.service.OAuth2Manager;
import com.eactive.eai.authserver.vo.ClientVO;
import com.eactive.eai.common.TransactionContextKeys;
import com.eactive.eai.common.util.Logger;
public class HmacSha256VerifyFilterKjb implements HttpAdapterFilter {
@@ -139,6 +140,8 @@ public class HmacSha256VerifyFilterKjb implements HttpAdapterFilter {
String macBody = calculateHMAC(outboundBody, clientSecret);
response.addHeader("x-obp-signature-body", macBody);
response.addHeader("x-obp-partnercode", request.getHeader("x-obp-partnercode"));
response.addHeader("x-obp-txid", prop.getProperty(TransactionContextKeys.TRANSACTION_UUID,""));
} catch (Exception e) {
logger.error(e.getMessage());
}
@@ -54,7 +54,7 @@ public class ScopeDAO extends BaseDAO {
ScopeEntity scopeEntity = scopeLoader.findByIdBzwksvckeyname(apiId);
scopeSet.add(scopeEntity.getId().getBzwksvckeyname());
scopeSet.add(scopeEntity.getId().getScopeid());
return scopeSet;
} catch (Exception e) {
throw new DAOException(ExceptionUtil.getErrorCode(e, "RECEAIAUC001"));
@@ -34,7 +34,7 @@ import com.solab.iso8583.IsoMessage;
public final class MessageUtil {
static Logger logger = LoggerFactory.getLogger(MessageUtil.class);
public static final String ERROR_MESSAGE_DEFAULT_FORMAT = "{\"error\":{\"code\":\"%s\",\"message\":\"%s\"}}";
public static final String ERROR_MESSAGE_DEFAULT_FORMAT = "{\"error\":\"%s\",\"error_description\":\"%s\"}";
public static final String ERROR_CODE_AP_ERROR = "E.GW.AP_ERROR";
public static final String ERROR_CODE_AUTH_FAIL = "E.GW.AUTH_FAIL";
@@ -5,12 +5,14 @@ import java.util.Properties;
import com.eactive.eai.common.TransactionContextKeys;
import com.eactive.eai.common.circuitBreaker.CircuitBreakerManager;
import com.eactive.eai.common.util.SMSLogUtil;
import com.eactive.eai.message.StandardMessage;
import com.eactive.eai.util.PropertiesUtil;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.initech.core.util.PropertiesManager;
import io.github.resilience4j.circuitbreaker.CallNotPermittedException;
import io.github.resilience4j.circuitbreaker.CircuitBreaker;
import org.apache.commons.lang3.StringUtils;
@@ -105,7 +107,12 @@ public class RESTProcess extends HTTPProcess {
combinedNode.set("metrics", objectMapper.valueToTree(circuitBreaker.getMetrics()));
logger.info("CircuitBreaker state "+combinedNode.toString());
this.resObject = circuitBreaker.executeCallable(() -> HttpSender.callService(this.adapterGroupName, this.outboundProp, this.reqObject, this.tempProp));
try {
this.resObject = circuitBreaker.executeCallable(() -> HttpSender.callService(this.adapterGroupName, this.outboundProp, this.reqObject, this.tempProp));
}catch(CallNotPermittedException callNotPermittedException){
SMSLogUtil.loggingSMS(reqEaiMsg.getEAISvcCd(), "CIRCUIT_IS_OPEN!");
throw callNotPermittedException;
}
}else{
this.resObject = HttpSender.callService(this.adapterGroupName, this.outboundProp, this.reqObject, this.tempProp);
}