logo

한국어

[AppDefender] Agent FATAL 로그 수정

관리자 2019.09.04 13:49 조회 수 : 4

#!/bin/bash
##############################################################################
#
# 이 패치는 Application Defender 19.2.0의 rtal(RunTime Application Logging)
# 룰이 docker 이미지에서 누락되어 있는 버그를 패치한다.
#
# 패치를 진행한 후에는 반드시 Agent를 재 설치해야 한다.
#
##############################################################################

SECURITY_CONTENT=SecurityContent2018.4.1.1.zip
CURRENT_DIR=$(pwd)
UNZIP_CMD=$(which unzip)
if [ -z ${UNZIP_CMD} ]
then
  exit 1
fi

DOCKER_CMD=$(which docker)
if [ -z ${DOCKER_CMD} ]
then
  exit 2
fi

mkdir ${CURRENT_DIR}/tmp_securitycontent
${UNZIP_CMD} ${SECURITY_CONTENT} -d ${CURRENT_DIR}/tmp_securitycontent

${DOCKER_CMD} exec -it appdefender_ui_customer_1 /bin/ls -l /usr/local/tomcat/initialConfig
${DOCKER_CMD} cp ${CURRENT_DIR}/tmp_securitycontent/rules/rtal_information_dotnet.rpr  appdefender_ui_customer_1:/usr/local/tomcat/initialConfig/
${DOCKER_CMD} cp ${CURRENT_DIR}/tmp_securitycontent/rules/rtal_information_java.rpr    appdefender_ui_customer_1:/usr/local/tomcat/initialConfig/
${DOCKER_CMD} cp ${CURRENT_DIR}/tmp_securitycontent/rules/rtal_logging_dotnet.rpr      appdefender_ui_customer_1:/usr/local/tomcat/initialConfig/
${DOCKER_CMD} cp ${CURRENT_DIR}/tmp_securitycontent/rules/rtal_logging_java.rpr        appdefender_ui_customer_1:/usr/local/tomcat/initialConfig/
${DOCKER_CMD} exec -it appdefender_ui_customer_1 /bin/chown -R root:staff /usr/local/tomcat/initialConfig
${DOCKER_CMD} exec -it appdefender_ui_customer_1 /bin/ls -l /usr/local/tomcat/initialConfig

rm -rf ${CURRENT_DIR}/tmp_securitycontent