기술 정보
home
채널 소개
home

password_grace_time 동작 개선

문서 유형
장애 해결
분야
패치/업그레이드
키워드
profile
적용 제품 버전
7F S02PS
1 more property

현상

password_grace_time 동작 관련 개선 사항에 대해 설명합니다.
password_grace_time unlimited 설정 시, unlimited가 아닌 바로 expire 되어 설정 값이 0인 것처럼 동작
password_grace_time이 0일 때, expired(grace)여서 바로 만료되지 않고 접속 가능한 현상
password_grace_time을 9999/12/31 이후로 설정되도록 값을 지정하는 경우 profile job이 계속 throw 발생
[시나리오]
#. User Create SQL>create user test01 identified by test01; SQL>grant dba to test01; #. User Create SQL>create user test01 identified by test01; SQL>grant dba to test01; #. profile 생성 SQL>create profile prof limit password_life_time 2/1440 password_grace_time unlimited; #. profile 확인 SQL>select * from dba_profiles where profile='PROF' and RESOURCE_NAME in ('PASSWORD_LIFE_TIME', 'PASSWORD_GRACE_TIME'); #. profile을 user에 적용 SQL>alter user test01 profile prof; #. User status 확인 SQL>select username, account_status, profile, created, expiry_date from dba_users where username='TEST01'; #. 시간 확인 SQL>alter session set nls_date_format='yyyy/mm/dd hh24:mi:ss'; SQL>select sysdate from dual; #. 만료 시간 이후 접속 -> status 확인 SQL>conn test01/test01 SQL>select username, account_status, profile, created, expiry_date from dba_users where username='TEST01';
SQL
복사

원인

unlimited 최초 설계가 grace 기능을 사용하지 않는 것으로 설계된 것으로 보이나, expired(grace)에서 만료되지 않도록 하는 것이 적절한 방식으로 판단되어 수정,
비밀번호가 만료된 이후 grace time에 password_grace_time에 설정된 날짜만큼 exptime을 login_date에 더해서 설정하고, expire(grace) 상태에서 해당 날짜가 지나면 expire 되는데, 더했을 때 9999/12/31을 넘는 경우 dml throw를 내고 있어 exptime을 갱신하는 dml이 수행되지 못합니다.

해결

password_grace_time에 unlimited 혹은 큰 값이 들어와 login_date에 더했을 때 9999/12/31이 넘어 date type으로 표기할 수 없는 입력을 받았을 때 exptime이 9999/12/31으로 고정되도록 변경합니다.
password_grace_time 0을 설정한 경우 password_life_time을 경과한 사용자에 대해 grace 상태를 거치지 않고 바로 expired 되도록 변경합니다.
[시나리오]
#. grace time 설정이 unlimited의 경우 SQL>col username for a20; SQL>col account_status for a20; SQL>drop user u1; SQL>drop profile p1; SQL>create profile p1 limit password_life_time 1/2880 password_grace_time unlimited; SQL>create user u1 identified by tibero profile p1; SQL>grant connect to u1; SQL>alter system set nls_date_format = 'YYYY/MM/DD HH24:MI:SS'; SQL>select username, account_status, expiry_date, SYSDATE from dba_users where username ='U1'; #. 패치 후, expired(grace) 확인 - password 만료되지 않음 SQL>conn u1/tibero SQL>select username, account_status, expiry_date from dba_users where username ='U1'; USERNAME ACCOUNT_STATUS EXPIRY_DATE ------------------------------ ------------------------------ ------------------- U1 EXPIRED(GRACE) 9999/12/31 00:00:00 1 row selected.
SQL
복사
#. grace time 설정이 0의 경우 SQL>alter profile p1 limit password_grace_time 0;SQL>select username, account_status, expiry_date from dba_users where username ='U1'; USERNAME ACCOUNT_STATUS EXPIRY_DATE ------------------------------ ------------------------------ ------------------- U1 EXPIRED 2025/02/27 00:27:47 1 row selected. SQL>conn u1/tibero SQL>conn u1/tibero TBR-17002: Password has expired. Enter new password:
SQL
복사