tb_ownr.rrno 컬럼 DB 암호화 적용

dev
박성영 2 months ago
parent e984e68eb6
commit b97154f3dc

@ -0,0 +1,4 @@
CREATE DEFINER=`root`@`%` FUNCTION `ibmsdb`.`ECL_DECRYPT`(PIN_JNO varchar(256)) RETURNS varchar(4000) CHARSET utf8
BEGIN
RETURN AES_DECRYPT(UNHEX(FROM_BASE64(PIN_JNO)),'Copyright(c)2015-xit.co.kr');
END

@ -0,0 +1,4 @@
CREATE DEFINER=`root`@`%` FUNCTION `ibmsdb`.`ECL_ENCRYPT`(PIN_JNO varchar(256)) RETURNS varchar(4000) CHARSET utf8
BEGIN
RETURN TO_BASE64(HEX(AES_ENCRYPT(PIN_JNO,'Copyright(c)2015-xit.co.kr')));
END

@ -57,6 +57,9 @@ query-executor:
transaction:
timeout-minutes: 5 # 트랜잭션 타임아웃 (분 단위, 기본값: 5분)
# Mariadb aes_secret_key # 참고용도, 실제는 DB function에 하드코딩되어 있음
aes-secret-key: Copyright(c)2015-xit.co.kr
# Interceptor configuration
interceptor:
interceptorExclude:

@ -23,7 +23,7 @@
ar.DEL_DT,
ar.DLTR,
o.FLNM,
o.RRNO,
ECL_DECRYPT(o.RRNO) AS RRNO,
o.OWNR_SE_CD,
ownrSe.CD_NM AS OWNR_SE_CD_NM,
o.ADDR AS ADDR,
@ -101,7 +101,7 @@
ar.DEL_DT,
ar.DLTR,
o.FLNM,
o.RRNO,
ECL_DECRYPT(o.RRNO) AS RRNO,
o.OWNR_SE_CD,
ownrSe.CD_NM AS OWNR_SE_CD_NM,
o.ADDR AS ADDR,

@ -24,7 +24,7 @@
delUser.USER_ACNT AS DLTR_ACNT,
delUser.USER_NM AS DLTR_NM,
o.FLNM,
o.RRNO,
ECL_DECRYPT(o.RRNO) AS RRNO,
o.OWNR_SE_CD,
ownrSe.CD_NM AS OWNR_SE_CD_NM,
o.ADDR AS ADDR,

@ -12,7 +12,7 @@
o.SGG_CD,
sgg.CD_NM AS SGG_CD_NM,
o.FLNM,
o.RRNO,
ECL_DECRYPT(o.RRNO) AS RRNO,
o.OWNR_SE_CD,
ownrSe.CD_NM AS OWNR_SE_CD_NM,
o.ADDR,
@ -78,7 +78,7 @@
AND o.FLNM LIKE CONCAT('%', #{flnm}, '%')
</if>
<if test='rrno != null and rrno != ""'>
AND o.RRNO LIKE CONCAT('%', #{rrno}, '%')
AND ECL_DECRYPT(o.RRNO) LIKE CONCAT('%', #{rrno}, '%')
</if>
<if test='telno != null and telno != ""'>
AND o.TELNO LIKE CONCAT('%', #{telno}, '%')
@ -128,7 +128,7 @@
AND o.FLNM LIKE CONCAT('%', #{flnm}, '%')
</if>
<if test='rrno != null and rrno != ""'>
AND o.RRNO LIKE CONCAT('%', #{rrno}, '%')
AND ECL_DECRYPT(o.RRNO) LIKE CONCAT('%', #{rrno}, '%')
</if>
<if test='telno != null and telno != ""'>
AND o.TELNO LIKE CONCAT('%', #{telno}, '%')
@ -152,7 +152,7 @@
o.SGG_CD,
sgg.CD_NM AS SGG_CD_NM,
o.FLNM,
o.RRNO,
ECL_DECRYPT(o.RRNO) AS RRNO,
o.OWNR_SE_CD,
ownrSe.CD_NM AS OWNR_SE_CD_NM,
o.ADDR,

@ -10,7 +10,7 @@
own.OWNR_ID,
own.SGG_CD,
own.FLNM,
own.RRNO,
ECL_DECRYPT(own.RRNO) AS RRNO,
own.OWNR_SE_CD,
c.CD_NM AS OWNR_SE_CD_NM,
own.addr,
@ -48,7 +48,7 @@
AND own.FLNM LIKE CONCAT('%', #{schTypeTxt}, '%')
</if>
<if test='schType == "2" and schTypeTxt != null and schTypeTxt != ""'>
AND own.RRNO LIKE CONCAT('%', #{schTypeTxt}, '%')
AND ECL_DECRYPT(own.RRNO) LIKE CONCAT('%', #{schTypeTxt}, '%')
</if>
ORDER BY own.OWNR_ID DESC
<if test='pagingYn != null and pagingYn == "Y"'>
@ -66,7 +66,7 @@
AND FLNM LIKE CONCAT('%', #{schTypeTxt}, '%')
</if>
<if test='schType == "2" and schTypeTxt != null and schTypeTxt != ""'>
AND RRNO LIKE CONCAT('%', #{schTypeTxt}, '%')
AND ECL_DECRYPT(RRNO) LIKE CONCAT('%', #{schTypeTxt}, '%')
</if>
</select>
@ -77,7 +77,7 @@
OWNR_ID,
SGG_CD,
FLNM,
RRNO,
ECL_DECRYPT(RRNO) AS RRNO,
OWNR_SE_CD,
addr,
daddr,
@ -145,7 +145,7 @@
LPAD(NEXTVAL(seq_owner_id), 10, '0'),
#{sggCd},
#{flnm},
#{rrno},
ECL_ENCRYPT(#{rrno}),
#{ownrSeCd},
#{addr},
#{daddr},
@ -177,7 +177,7 @@
/* OwnActRegistAndViewMapper.update : 소유자행위자 수정 */
UPDATE tb_ownr
SET FLNM = #{flnm},
RRNO = #{rrno},
RRNO = ECL_ENCRYPT(#{rrno}),
OWNR_SE_CD = #{ownrSeCd},
ADDR = #{addr},
DADDR = #{daddr},

Loading…
Cancel
Save