Erp 응답용 외부 암호화 없음
This commit is contained in:
-53
@@ -1,53 +0,0 @@
|
|||||||
package com.eactive.eai.custom.adapter.http.client.impl.filter;
|
|
||||||
|
|
||||||
import java.util.Properties;
|
|
||||||
|
|
||||||
import com.eactive.eai.adapter.http.client.impl.filter.HttpClientAdapterFilter;
|
|
||||||
import com.eactive.eai.adapter.http.client.impl.filter.OutCryptoFilter;
|
|
||||||
import com.eactive.eai.common.security.keyderiv.KeyDerivationStrategy;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DJBank 더존 연동 암복호화 필터
|
|
||||||
* 전문에서 groupSeq, empSeq를 추출한다.
|
|
||||||
* 암복호화 키 생성에 HSM에서 master key를 가져오고, groupSeq를 조합
|
|
||||||
* empSeq는 AES GCM의 AAD로 사용(PROP_AAD_HEADER prop 세팅)
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class DJBErpEncFieldOutCryptoFilter implements HttpClientAdapterFilter {
|
|
||||||
|
|
||||||
private final OutCryptoFilter filter = new OutCryptoFilter();
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object doPreFilter(String adptGrpName, String adptName, Properties prop, Object message, Properties tempProp)
|
|
||||||
throws Exception {
|
|
||||||
setContext(tempProp);
|
|
||||||
return filter.doPreFilter(adptGrpName, adptName, prop, message, setProp(tempProp));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object doPostFilter(String adptGrpName, String adptName, Properties prop, Object message,
|
|
||||||
Properties tempProp) throws Exception {
|
|
||||||
setContext(tempProp);
|
|
||||||
return filter.doPostFilter(adptGrpName, adptName, prop, message, setProp(tempProp));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setContext(Properties tempProp) {
|
|
||||||
String empSeq = "";
|
|
||||||
//TODO : empSeq 추출
|
|
||||||
tempProp.setProperty(OutCryptoFilter.PROP_AAD_HEADER, empSeq);
|
|
||||||
|
|
||||||
String groupSeq = "";
|
|
||||||
//TODO : groupSeq 추출
|
|
||||||
tempProp.setProperty(KeyDerivationStrategy.PARAM_CONTEXT_KEY, groupSeq);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Properties setProp(Properties p) {
|
|
||||||
p.setProperty(OutCryptoFilter.PROP_DEC_FROM_PATH, "/encryptedData");
|
|
||||||
p.setProperty(OutCryptoFilter.PROP_ENC_TO_PATH, "/encryptedData");
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user