企业版V6.0.2身份鉴别功能(passwordcheck插件控制方式) 文章目录文档用途详细信息文档用途企业版V6.0.2新增功能之一是将身份鉴别功能做成插件(passwordcheck)控制的方式本文档用于介绍V6.0.2启用或禁用passwordcheck插件时身份鉴别相关功能的变化详细信息初始化后默认passwordcheck插件启用highgo# \dxListofinstalled extensions Name|Version|Schema|Description------------------------------------------------------------------------------------------------------------------------------------------alter_pg_func|1.0|information_schema|Compatiblewithoraclefunctionorafce|3.13|pg_catalog|Functionsandoperators that emulate a subsetoffunctionsandpackagesfromthe Oracle RDBMS passwordcheck|1.0|information_schema|passwordcheck plpgsql|1.0|pg_catalog|PL/pgSQL procedurallanguage(4rows)passwordcheck插件启用时新用户设置口令需满足口令复杂度要求口令有限期为7天口令错误次数检验为5次口令复杂度规则及配置可参考support文章《企业版V6口令复杂度配置》highgo# create user test01 with password highgo123;ERROR: Password must contain upperandlowercaseletters,numbers,andspecial characters:highgo123.highgo# create user test01 with password Highgo123;ERROR: The password cannot contain highgo keyword.highgo# create user test01 with password Hello123;CREATEROLE highgo# \duListofroles Role name|Attributes|Memberof----------------------------------------------------------------------------------highgo|Superuser,Createrole,CreateDB,Replication,Bypass RLS|{} test01|Password valid until2021-07-0214:06:51.2917608|{} highgo# \q[highgo602host~]$ psql-U test01-d highgo Passwordforusertest01: psql: error: couldnotconnecttoserver: FATAL: You still have4chancestoenter your password before your account get locked.passwordcheck插件drop后身份鉴别相关参数hgidcheck.pwdlock,hgidcheck.pwdlocktime,hgidcheck.pwdvaliduntil会失效创建新用户无口令复杂度要求和口令错误次数检验口令有效期永久highgo# drop extension passwordcheck ;DROPEXTENSION highgo# create user test02 with password highgo123;CREATEROLE highgo# \duListofroles Role name|Attributes|Memberof----------------------------------------------------------------------------------highgo|Superuser,Createrole,CreateDB,Replication,Bypass RLS|{} test01|Password valid until2022-07-0200:00:0008|{} test02||{} highgo# \q[highgo602host~]$ psql-U test02-d highgo Passwordforusertest02: psql: error: couldnotconnecttoserver: FATAL: Password doesnotmatch