Merge branch 'feature/crypto-module' into master

This commit is contained in:
curry772
2026-05-07 17:52:18 +09:00
3 changed files with 131 additions and 0 deletions
@@ -0,0 +1,13 @@
package com.eactive.eai.common.security.loader;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.eactive.eai.data.entity.onl.security.CryptoModuleConfig;
import com.eactive.eai.data.jpa.AbstractDataLoader;
@Service
@Transactional
public class CryptoModuleConfigLoader
extends AbstractDataLoader<CryptoModuleConfig, String, CryptoModuleConfigLoaderRepository> {
}
@@ -0,0 +1,13 @@
package com.eactive.eai.common.security.loader;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import com.eactive.eai.data.DataLoaderRepository;
import com.eactive.eai.data.entity.onl.security.CryptoModuleConfig;
import com.eactive.eai.data.jpa.BaseRepository;
interface CryptoModuleConfigLoaderRepository
extends DataLoaderRepository<CryptoModuleConfig>,
BaseRepository<CryptoModuleConfig, String>,
QuerydslPredicateExecutor<CryptoModuleConfig> {
}
@@ -0,0 +1,105 @@
package com.eactive.eai.data.entity.onl.security;
import java.io.Serializable;
import java.time.LocalDateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.GenericGenerator;
import com.eactive.eai.data.entity.AbstractEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
@Data
@EqualsAndHashCode(onlyExplicitlyIncluded = true, callSuper = true)
@Entity
@Table(name = "crypto_module_config")
@org.hibernate.annotations.Table(appliesTo = "crypto_module_config", comment = "암호화모듈_설정")
public class CryptoModuleConfig extends AbstractEntity<String> implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(generator = "UUID")
@GenericGenerator(name = "UUID", strategy = "org.hibernate.id.UUIDGenerator")
@Column(name = "crypto_id", updatable = false, nullable = false, length = 36)
@Comment("암호화모듈 ID")
private String cryptoId;
@Column(name = "crypto_name", unique = true, nullable = false, length = 100)
@Comment("암호화모듈 이름 (어댑터 참조 키)")
private String cryptoName;
@Column(name = "crypto_desc", nullable = true, length = 500)
@Comment("암호화모듈 설명")
private String cryptoDesc;
@Column(name = "alg_type", nullable = false, length = 10)
@Comment("알고리즘 유형 (AES, ARIA)")
private String algType;
@Column(name = "cipher_mode", nullable = false, length = 20)
@Comment("운영 모드 (CBC, GCM, FF1, FF3-1)")
private String cipherMode;
@Column(name = "padding", nullable = true, length = 30)
@Comment("패딩 방식 (PKCS5Padding, NoPadding)")
private String padding;
@Column(name = "iv_hex", nullable = true, length = 200)
@Comment("초기화 벡터 Hex (선택)")
private String ivHex;
@Column(name = "key_source_type", nullable = false, length = 20)
@Comment("키 소스 유형 (STATIC: DB 직접, DYNAMIC: 전략 기반 동적 생성)")
private String keySourceType;
@Column(name = "enc_key_hex", nullable = true, length = 200)
@Comment("암호화 키 Hex (STATIC 전용)")
private String encKeyHex;
@Column(name = "dec_key_hex", nullable = true, length = 200)
@Comment("복호화 키 Hex (STATIC 전용, 미입력 시 encKeyHex와 동일)")
private String decKeyHex;
@Column(name = "key_deriv_strategy", nullable = true, length = 200)
@Comment("동적 키 도출 전략 코드 또는 FQCN (DYNAMIC 전용)")
private String keyDerivStrategy;
@Column(name = "key_deriv_params", nullable = true, length = 2000)
@Comment("동적 키 도출 전략 파라미터 JSON (DYNAMIC 전용)")
private String keyDerivParams;
@Column(name = "cache_yn", nullable = false, length = 1)
@Comment("동적 키 캐싱 사용 여부 (Y/N)")
private String cacheYn;
@Column(name = "cache_ttl_sec", nullable = true)
@Comment("캐시 TTL 초 (기본 300)")
private Integer cacheTtlSec;
@Column(name = "use_yn", nullable = false, length = 1)
@Comment("사용 여부 (Y/N)")
private String useYn;
@Column(name = "modified_by", nullable = true, length = 50)
@Comment("수정자")
private String modifiedBy;
@Column(name = "modified_at", nullable = true)
@Comment("수정일시")
private LocalDateTime modifiedAt;
@Override
public @NonNull String getId() {
return this.cryptoId;
}
}