580686886c
- CryptoFilter (abstract): BODY/FIELD scope 암복호화, buildRuntimeContext 추상화 - String/byte[]/JSONObject 타입 message 처리 (toBodyString) - STATIC/DYNAMIC 키 모듈 공통 지원 (CryptoModuleManager가 내부 분기) - ReloadCryptoModuleCommand: 로깅 추가, 성공 시 "success" 반환, 에러코드 정의 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
29 lines
848 B
Java
29 lines
848 B
Java
package com.eactive.eai.agent.security;
|
|
|
|
import com.eactive.eai.agent.command.Command;
|
|
import com.eactive.eai.agent.command.CommandException;
|
|
import com.eactive.eai.common.security.CryptoModuleManager;
|
|
import com.eactive.eai.common.util.Logger;
|
|
|
|
public class ReloadCryptoModuleCommand extends Command {
|
|
|
|
private static final long serialVersionUID = 1032982004418318100L;
|
|
|
|
@Override
|
|
public Object execute() throws CommandException {
|
|
Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT);
|
|
try {
|
|
String cryptoId = (String) args;
|
|
CryptoModuleManager.getInstance().reload(cryptoId);
|
|
return "success";
|
|
} catch (Exception e) {
|
|
String rspErrorCode = "RECEAIMCM002";
|
|
String msg = this.makeException(rspErrorCode, e);
|
|
if (logger.isError()) {
|
|
logger.error(msg, e);
|
|
}
|
|
throw new CommandException(e.getMessage());
|
|
}
|
|
}
|
|
}
|