Available for Oracle Database release 19.12, an application can change its database passwords without an administrator having to schedule downtime.
Security best practices require that you change your passwords frequently. In a regular scenario, a database administrator and an application manager normally took the application down when the application database password was being rotated. Then, the password must be updated in the database side, the application and all the interfaces using the database schema.
Gradual database password rollover allows you to change the password without the need of application downtime. Both, old and new passwords will be valid for database authentication without locking the user UNTIL ROLLOVER period is finished.
I will perform an example of this new feature using an Oracle Database 19.17:
SQL> create profile rollover 2 limit password_rollover_time 1/24;
Profile created. |
SQL> create user VNA identified by roll_pass_1 2 profile rollover;
User created.
SQL> grant connect to vna;
Grant succeeded. |
$ sqlplus vna/roll_pass_1@DEV_EA
Connected to: Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production Version 19.17.0.0.0
SQL> show user USER is "VNA" |
Using sys user:
SQL> select username, account_Status from dba_users where username='VNA';
USERNAME ACCOUNT_STATUS ---------------------- ------------------------------ VNA OPEN |
SQL> !date Mon Apr 10 13:00:15 CDT 2023
SQL> alter user vna identified by roll_pass_new;
User altered. |
Using original password:
$ date Mon Apr 10 13:01:26 CDT 2023 [oracle@vnadapex01 admin]$ sqlplus vna/roll_pass_1@DEV_EA
Last Successful login time: Mon Apr 10 2023 12:55:21 -05:00
Connected to: Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production Version 19.17.0.0.0
SQL> show user; USER is "VNA" |
Using the new password:
$ date Mon Apr 10 13:03:02 CDT 2023 [oracle@vnadapex01 admin]$ sqlplus vna/roll_pass_new@DEV_EA
Last Successful login time: Mon Apr 10 2023 13:01:30 -05:00
Connected to: Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production Version 19.17.0.0.0
SQL> show user; USER is "VNA" |
SQL> select username, account_Status from dba_users where username='VNA';
USERNAME ACCOUNT_STATUS -------------------- -------------------- VNA OPEN & IN ROLLOVER
|
$ date Mon Apr 10 14:03:28 CDT 2023 [oracle@vnadapex01 admin]$ sqlplus vna/roll_pass_1@DEV_EA
ERROR: ORA-01017: invalid username/password; logon denied
$ date Mon Apr 10 14:04:08 CDT 2023 [oracle@vnadapex01 admin]$ sqlplus vna/roll_pass_new@DEV_EA
Last Successful login time: Mon Apr 10 2023 13:03:23 -05:00
Connected to: Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production Version 19.17.0.0.0
SQL> show user USER is "VNA" |
SQL> !date Mon Apr 10 14:06:20 CDT 2023
SQL> select username, account_status from dba_users where username='VNA';
USERNAME ACCOUNT_STATUS -------------------- ------------------------------ VNA OPEN |
Some important notes after finishing:
SQL> alter user vna expire password rollover period;
This new feature is simple but useful, the application can continue to use the older password until the new password is entire configured in the application and other external systems and you don’t need the DBA and the System Administration working at the same time.