首页 » ORACLE [C]系列, ORACLE 9i-23c » Oracle 12c 关于密码(password)的几个新特性小结

Oracle 12c 关于密码(password)的几个新特性小结

oracle数据库软件是获得过最高级别的安全认证,完全超越其它所有数据库软件,并且在可维护性上基于大量的实践需要稳步前行,这里简单整理几个12c 关于password几个新特性。

1. 新的password hash算法
2. 新的password verify function
3. 密码文件可以存储到ASM
4. 密码自动从primary同步到standby端在Dataguard环境中
5. 新的密码认证协议

 

1. 新的password hash算法

Oracle对Oracle Database 12c中的用户密码哈希进行了改进, 通过使用基于PBKDF2的SHA512哈希算法,而不是简单的SHA1哈希,密码哈希更安全, 从11g起user$.spare4列存储着密码的哈希值。在12.1.0.2版本时spare4列有3部分组成(S:H:T).12.2时只剩下(S:T )2部分。

S部分和11g时的算法一样,长度60 chars,是基于SHA1的哈希。

H部分是基于MD5的哈希,长度为32 chars, 也可能是因为MD5 hash更方便入侵者的暴力破解,在12.2 版本时从Spare4列去掉该部分。

T部分是从12.1.0.2版本增加,长度为160 chars, 使用的是基于PBKDF2-based SHA512的算法。该算法后部分32chars 的验证数据部分是随机生成。更加安全。

2. 新的password verify function

在12c中default profile除了password verify function和11g不同,其它资源限制都是相同的。
不过国防安全要求有个建议值:
RESOURCE NAME LIMIT
PASSWORD_LIFE_TIME 60
PASSWORD_REUSE_TIME 365
PASSWORD_REUSE_MAX 5
FAILED_LOGIN_ATTEMPTS 3
PASSWORD_VERIFY_FUNCTION ora12c_strong_verify_function

12c新引入了verify function 有ora12c_verify_function, ora12c_strong_verify_function (ora12c_stig_verify_function) ,而且可能在12.1.0.1 ,12.1.0.2, 12.2.0.1     profile默认的verify function名都不一样。

比如STIG有以下限制:

  • Password at least 9 characters
  • at least 2 capital letters
  • at least 2 small letters
  • at least 2 digits
  • at least 2 special characters
  • password must differ by at least 4 characters from the old password

3.密码文件可以存储到ASM

在Oracle Database 12c之前,密码文件始终位于$ ORACLE_HOME / dbs文件下,即使对于RAC实例和RAC ASM集群也是如此。 对于RAC而言,DBA必须设法保持这一点密码文件在每个节点上同步。现在,在Oracle 12c中,可以将密码文件存储在ASM上。 这意味着一个共享密码文件Oracle RAC数据库为集群中的所有实例共享,与ASM spfile不同,ASM密码文件的访问只有在启动ASM ,并且在磁盘组mount后才可以访问。用于创建密码文件的命令实用程序仍然是相同的:“orapwd”

asmcmd同样也可以创建密码文件
$ asmcmd
ASMCMD> pwcreate

ASM存储密码文件前提条件 COMPATIBLE.ASM>= 12.1

-- move password file from A asm diskgroup to another
ASMCMD> pwmove --asm +CRS/asm/password/orapwasm +data/orapwasm

-- create new password in ASM for db instance 
orapwd file='+data/ORCL/orapworcl' dbuniquename='orcl'

-- create new password in ASM for ASM instance
orapwd file='+data/ASM/orapwasm' asm=y

-- create new password in ASM from location for ASM instance
orapwd input_file='/oraclegrid/dbs/orapwasm' file='+data/ASM/orapwasm' asm=y

-- create new password in ASM from location for DB instance
orapwd input_file='/oraclegrid/dbs/orapworcl' file='+data/ORCL/orapworcl' dbuniquename='orcl'

4. 密码自动从primary同步到standby端在Dataguard环境中

12cR2中一个有用的增强功能是密码文件在Data Guard环境中自动同步,如果在primary database上更改了sys的密码,并且它自动也在standby database上进行了更改。 在早期版本中必须手动完成的,通常通过使用primary database 密码文件替换standby database上的密码文件。

5. 新的密码认证协议

升级12C注意事项: 连接失败 ORA-28040 ORA-1017

之前写过关于认证的协议的。如果你的数据库是从12c以前的版本升上来的,在升级时会提示去掉SEC_CASE_SENSITIVE_LOGON=FALSE参数如下,但是如果你没有去掉SEC_CASE_SENSITIVE_LOGON=FALSE,那么升级后登录可以会遇到ora-1017错误,即使密码是正确的,甚至修改在升级后再修改密码(新的密码版本将为”11G 12C”)。解决方法是:change SEC_CASE_SENSITIVE_LOGON=TRUE, –the default.另外注意如果是Data Pump导入创建的用户,密码版本会和导出时版本一致。

RECOMMENDED ACTIONS
===================
+ Consider removing the following DEPRECATED initialization parameters.
They are not OBSOLETE in version 12.2.0.1.0
but probably will be OBSOLETE in a future release.

Parameter
——————————
sec_case_sensitive_logon

Note:

Oracle notes that the term “version” in the allowed_logon_version_server parameter name refers to the version of the authentication protocol. It does NOT refer to the Oracle release version.

sqlnet.allowed_logon_version_server, depending on the version of the authentication protocol.

sqlnet.allowed_logon_version_server=12a: For Oracle Database 12c Release 1 (12.1) release 12.1.0.2 or later.
sqlnet.allowed_logon_version_server=12: For the critical patch updates CPUOct2012 and later Oracle Database 11g authentication protocols (recommended).
sqlnet.allowed_logon_version_server=11: For Oracle Database 11g authentication protocols (default).
sqlnet.allowed_logon_version_server=10: For Oracle Database 10g authentication protocols.
sqlnet.allowed_logon_version_server=8: For Oracle8i authentication protocol

打赏

,

对不起,这篇文章暂时关闭评论。