feat: HTTP 어댑터 암복호화 필터 기반 클래스 추가 및 기본 scope 수정

- BaseCryptoFilter: 빈 RuntimeContext를 반환하는 기반 클래스 추가
- CryptoFilter: 기본 scope SCOPE_BODY → SCOPE_FIELD로 변경

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
curry772
2026-05-12 16:27:21 +09:00
parent 580686886c
commit 3cda2873cc
2 changed files with 23 additions and 2 deletions
@@ -0,0 +1,21 @@
package com.eactive.eai.adapter.http.dynamic.filter;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import javax.servlet.http.HttpServletRequest;
/**
* HTTP 어댑터 요청/응답 암복호화 필터 기반 클래스.
*
*/
public class BaseCryptoFilter extends CryptoFilter {
/**
* 빈 Runtime Context를 생성한다.
*/
protected Map<String, String> buildRuntimeContext(Properties prop, HttpServletRequest request) {
return new HashMap<>();
}
}
@@ -76,7 +76,7 @@ public abstract class CryptoFilter implements HttpAdapterFilter {
} }
String moduleName = required(prop, PROP_MODULE_NAME); String moduleName = required(prop, PROP_MODULE_NAME);
String scope = prop.getProperty(PROP_SCOPE, SCOPE_BODY).toUpperCase(); String scope = prop.getProperty(PROP_SCOPE, SCOPE_FIELD).toUpperCase();
String body = toBodyString(message); String body = toBodyString(message);
Map<String, String> runtimeCtx = buildRuntimeContext(prop, request); Map<String, String> runtimeCtx = buildRuntimeContext(prop, request);
@@ -101,7 +101,7 @@ public abstract class CryptoFilter implements HttpAdapterFilter {
} }
String moduleName = required(prop, PROP_MODULE_NAME); String moduleName = required(prop, PROP_MODULE_NAME);
String scope = prop.getProperty(PROP_SCOPE, SCOPE_BODY).toUpperCase(); String scope = prop.getProperty(PROP_SCOPE, SCOPE_FIELD).toUpperCase();
String body = toBodyString(resultMessage); String body = toBodyString(resultMessage);
Map<String, String> runtimeCtx = buildRuntimeContext(prop, request); Map<String, String> runtimeCtx = buildRuntimeContext(prop, request);