security-manager.properties

제공된 security-manager.properties 파일을 CONFIG_PATH 로 지정한 경로( WAS_HOME )에 복사합니다.

  • security-manager.properties 의 내용은 다음과 같습니다.
    8개 property 의 값은 Manager 모듈에서 사용됩니다.

    #glue-security-dataSource.name=glue-security-dataSource-jndi
    glue-security-dataSource.name=glue-security-dataSource-jdbc
    glue-security-dataSource.jndiname=jdbc/rw/GlueSecurityDS
    glue-security-dataSource.driverClassName=oracle.jdbc.driver.OracleDriver
    glue-security-dataSource.url=jdbc:oracle:thin:@127.0.0.1:1521:XE
    glue-security-dataSource.username=security
    glue-security-dataSource.password=security
    glueUserService.crc=true
    log.file.path=C:/logs/security-manager.log
    
  • security-manager.properties 의 사용처

    1. WAR-FILE / WEB-INF / classes / applicationContext.xml
      applicationContext.xml 에서 다음과 같이 사용됩니다.
      <beans ...>
          <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
              <property name="location" value="file:${CONFIG_PATH}/security-manager.properties" />
              <property name="ignoreUnresolvablePlaceholders" value="true" />
          </bean>
          ...
          <bean id="glue-security-tx" class="com.poscoict.glueframework.transaction.GlueDataSourceTransactionManager">
              <property name="dataSource" ref="${glue-security-dataSource.name}"/>
          </bean>
          <bean id="glue-security-dataSource-jndi" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true">
              <property name="jndiName" value="${glue-security-dataSource.jndiname}" />
          </bean>
          <bean id="glue-security-dataSource-jdbc" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
              <property name="driverClassName" value="${glue-security-dataSource.driverClassName}"/>
              <property name="url" value="${glue-security-dataSource.url}"/>
              <property name="username" value="${glue-security-dataSource.username}"/>
              <property name="password" value="${glue-security-dataSource.password}"/>
          ...
          <bean id="glue-security-dao" class="com.poscoict.glueframework.dao.jdbc.GlueJdbcDao">
              <property name="dataSource" ref="${glue-security-dataSource.name}"/>
          ...
      </beans>
      
    2. WAR-FILE / WEB-INF / classes / logback-test.xml
      logback-test.xml 에서 다음과 같이 사용됩니다.
      <configuration ...>
          <property file="${CONFIG_PATH}/security-manager.properties"/>
          <appender name="FILE" class="ch.qos.logback.core.FileAppender">
              <file>${log.file.path}</file>
          ...
      </configuration>
      
    3. WAR-FILE / WEB-INF / security / security-context.xml
      security-context.xml 에서 다음과 같이 사용됩니다.
      <beans:beans ...>
          <beans:bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
              <beans:property name="location" value="file:${CONFIG_PATH}/security-manager.properties" />
          ...
          <beans:bean id="glueUserService" class="com.poscoict.glueframework.security.bean.GlueUserDetailsService">
              <beans:property name="crc" value="${glueUserService.crc}"/>
          ...
      </beans:beans>
      

JNDI 사용 설정

JNDI 사용시 다음 2개 property 값을 수정합니다.
JNDI 사용시 glue-security-dataSource.name 의 값은 glue-security-dataSource-jndi 입니다.

glue-security-dataSource.name=glue-security-dataSource-jndi
glue-security-dataSource.jndiname=jdbc/rw/GlueSecurityDS

DBCP 사용 설정

DBCP 사용시 다음 5개 property 값을 수정합니다.
DBCP 사용시 glue-security-dataSource.name 의 값은 glue-security-dataSource-jdbc 입니다.

glue-security-dataSource.name=glue-security-dataSource-jdbc
glue-security-dataSource.driverClassName=oracle.jdbc.driver.OracleDriver
glue-security-dataSource.url=jdbc:oracle:thin:@127.0.0.1:1521:XE
glue-security-dataSource.username=gluesecurity
glue-security-dataSource.password=gluesecurity

Logging 설정

application log 의 위치 및 파일이름을 수정합니다.

log.file.path=C:/logs/security-manager.log

기타

일반적으로 테이블의 varchar값 인덱스의 속도보다는 int값 인덱스와 속도가 훨씬 빠릅니다.
USERS 테이블의 VARCHAR 형 컬럼(USER_ID) 대신에 NUMBER 형 컬럼(CRC_ID)을 검색에 사용할 수 있는 property로서, true일경우 USERS 테이블 검색시 속도 향상을 기대할 수 있습니다.
USERS 테이블의 레코드가 많을 경우(User가 매우 많을 경우) Crc32로 암호화한 int값을 사용하여 검색하면 검색 속도를 빠르게 할 수 있습니다.

glueUserService.crc=true