Allows a user with sso_role to configure login and password policy options.
sp_passwordpolicy {“set” | “clear” | “list”}, policy_option, option_value
sp_passwordpolicy 'validate password options'
sp_passwordpolicy "regenerate keypair"
sp_passwordpolicy "expire role passwords", "[rolename | wildcard]"
sp_passwordpolicy "expire login passwords", "[login_name | wildcard]"
sp_passwordpolicy "expire stale role passwords", "datetime"
sp_passwordpolicy "expire stale login passwords", "datetime"
sp_passwordpolicy "help"
“set” – sets the value of this attribute
“list” – displays the current value of the attribute
“clear” deletes the row from sysattributes. Although “clear” deletes the row from sysattributes, the last setting is still effective until you restart the SAP ASE server, or when “set” sets the new value.
'T*M' – indicates duration in minutes, replacing the asterisk (*) with a numeric value, such as “T2M” for two minutes.
'H' – indicates duration in hours.
'D' – indicates duration in days. This is the default if you do not specify another format.
'W' – indicates duration in weeks.
'M' – indicates duration in months.
'Y' – indicates duration in years.
Specify datetime of first generation – the SAP ASE server regenerates a new RSA key pair immediately if that time has elapsed; otherwise the SAP ASE server waits until that specified time.
Do not specify datetime of first generation – the SAP ASE server regenerates a new RSA key pair at a time that is obtained by adding keypair regeneration period to the time when the most recent RSA key pair was generated, if this calculated time is not elapsed; otherwise the SAP ASE server regenerates a new RSA key pair immediately.
Subsequent generations of key pairs occur based on when the most recent key pair was generated and the value of keypair regeneration period.
wait – specifies the amount of time to wait after a failure before regenerating the keypair.
count – specifies how many times you want the SAP ASE server to attempt to regenerate a key pair after a failure.
1 – specifies to generate a new key pair for every user connection.
0 – specifies that all connections share the same RSA key pair.
sp_passwordpolicy 'set', 'password exp warn interval', '7'
sp_passwordpolicy 'list', 'min special char in password'
sp_passwordpolicy 'clear', 'disallow simple passwords'
minimum password length: 8 min alpha in password: 2 min digits in password: 2 min upper char in password: 2 min lower char in password: 2
sp_passwordpolicy 'validate password options' Validation Step Pass/Fail/NA Validation Test --------------- ------------ ----------------------------- min alpha in password Fail 'min alpha in password' > = 'min upper char in password + 'min lower char in password' minimum password length - 1 Pass 'minimum password length' > = 'min digits in password' + 'min special char in password' + 'min alpha in password' minimum password length - 2 Pass 'minimum password length' > = 'min digits in password' + min special char in password' + 'min upper char in password' + 'min lower char in password' maximum password length - 1 Pass 'max password length' > = 'min digits in password' + 'min special char in password' + 'min alpha in password' maximum password length – 2 Pass 'max password length' > = 'min digits in password' + 'min special char in password' + 'min upper char in password' + 'min lower char in password' password exp warn interval NA 'password exp warn interval' < = 'systemwide password expiration' (6 rows affected) (return status = 1)
There is one failure: The sum of min upper char in password + min lower char in password is greater than the value of min alpha in password, so the validation step min alpha in password fails.
sp_passwordpolicy "set", "keypair regeneration period", "2H", "Aug 15 2007 12:01 AM"
sp_passwordpolicy 'set', 'keypair error retry wait', '10'
sp_passwordpolicy 'set', 'keypair error retry count', '5'
sp_passwordpolicy "help" go
sp_ passwordpolicy Usage: sp_passwordpolicy 'help' sp_ passwordpolicy Usage: sp_passwordpolicy command [, option1 [, option2 [, option3]]] sp_passwordpolicy commands: sp_passwordpolicy 'set', {'enable last login updates' | 'disallow simple passwords' | 'min digits in password' | 'min alpha in password' | 'min special char in password' | 'min upper char in password' | 'min lower char in password' | 'password exp warn interval' | 'systemwide password expiration' | 'minimum password length' | 'maximum failed logins' | 'expire login' | 'allow password downgrade' | 'keypair error retry wait' | 'keypair error retry count'}, 'value' sp_passwordpolicy 'set', 'keypair regeneration period', {'regeneration_period' | null, 'datetime' | 'regeneration_period', 'datetime'} sp_passwordpolicy 'list', ['enable last login updates' | 'disallow simple passwords' | 'min digits in password' | 'min alpha in password' | 'min special char in password' | 'min upper char in password' | 'min lower char in password' | 'password exp warn interval' | 'systemwide password expiration' | 'minimum password length' | 'maximum failed logins' | 'expire login' | 'allow password downgrade' | 'keypair error retry wait' | 'keypair error retry count' | 'keypair regeneration period'] sp_passwordpolicy 'clear', {'enable last login updates' | 'disallow simple passwords' | 'min digits in password' | 'min alpha in password' | 'min special char in password' | 'min upper char in password' | 'min lower char in password' | 'password exp warn interval' | 'systemwide password expiration' | 'minimum password length' | 'maximum failed logins' | 'expire login' | 'keypair error retry wait' | 'keypair error retry count' | 'keypair regeneration period'} sp_passwordpolicy 'expire login passwords'[, '{loginame | wildcard}'] sp_passwordpolicy 'expire role passwords'[, '{rolename | wildcard}'] sp_passwordpolicy 'expire stale login passwords', 'datetime' sp_passwordpolicy 'expire stale role passwords', 'datetime' sp_passwordpolicy 'regenerate keypair'[, 'datetime'] sp_passwordpolicy 'validate password options' (return status = 0)
minimum password length: 8 min digits in password: 2 min special char in password: 2 min alpha in password: 6 min upper char in password: 3 min lower char in password: 3
sp_passwordpolicy 'validate password options'
Validation Step Pass/Fail/NA Validation Test --------------- ------------ ----------------------------- min alpha in password Pass 'min alpha in password' > = 'min upper char in password' + 'min lower char in password' minimum password length-1 Fail 'minimum password length' > = 'min digits in password' + 'min special char in password' + 'min alpha in password' minimum password length-2 Fail 'minimum password length' > = 'min digits in password' + 'min special char in password' + 'min upper char in password' + 'min lower char in password' maximum password length-1 Pass 'max password length' > = 'min digits in password' + 'min special char in password' + 'min alpha in password' maximum password length–2 Pass 'max password length' > = 'min digits in password' + 'min special char in password' + 'min upper char in password' + 'min lower char in password' password exp warn interval NA 'password exp warn interval' < = 'systemwide password expiration' (6 rows affected) (return status = 1)
There are two failures in step 2 and step 3.The sum of min digits in password, min special char in password and min alpha in password is greater than the value of minimum password length, so the validation step minimum password length -1 fails. The sum of min digits in password, min special char in password, min upper char in password and min lower char in password is greater than the value of minimum password length, so the validation step minimum password length -2 fails.
These password complexity options and their values are stored in the server:
minimum password length: 8 min alpha in password: 2 min digits in password: 2 min upper char in password: 2 min lower char in password: 2
sp_passwordpolicy 'validate password options'
Validation Step Pass/Fail/NA Validation Test --------------- ------------ -------------------------- min alpha in password Fail 'min alpha in password' > = 'min upper char in password + 'min lower char in password' minimum password length - 1 Pass 'minimum password length' > = 'min digits in password' + 'min special char in password' + 'min alpha in password' minimum password length - 2 Pass 'minimum password length' > = 'min digits in password' + min special char in password' + 'min upper char in password' + 'min lower char in password' maximum password length - 1 Pass 'max password length' > = 'min digits in password' + 'min special char in password' + 'min alpha in password' maximum password length – 2 Pass 'max password length' > = 'min digits in password' + 'min special char in password' + 'min upper char in password' + 'min lower char in password' password exp warn interval NA 'password exp warn interval' < = 'systemwide password expiration' (6 rows affected) (return status = 1)
There is one failure: the sum of min upper char in password + min lower char in password is greater than the value of min alpha in password, so the validation step min alpha in password fails.
Validating the following options stored in the SAP ASE server:
minimum password length: 8 min digits in password: 2 min special char in password: 2 min alpha in password: 6 min upper char in password: 3 min lower char in password: 3
sp_passwordpolicy 'validate password options'
Validation Step Pass/Fail/NA Validation Test --------------- ------------ -------------------------- min alpha in password Pass 'min alpha in password' > = 'min upper char in password' + 'min lower char in password' minimum password length-1 Fail 'minimum password length' > = 'min digits in password' + 'min special char in password' + 'min alpha in password' minimum password length-2 Fail 'minimum password length' > = 'min digits in password' + 'min special char in password' + 'min upper char in password' + 'min lower char in password' maximum password length-1 Pass 'max password length' > = 'min digits in password' + 'min special char in password' + 'min alpha in password' maximum password length–2 Pass 'max password length' > = 'min digits in password' + 'min special char in password' + 'min upper char in password' + 'min lower char in password' password exp warn interval NA 'password exp warn interval' < = 'systemwide password expiration' (6 rows affected) (return status = 1)
There are two failures in step 2 and step 3.
The sum of min digits in password, min special char in password and min alpha in password is greater than the value of minimum password length, so the validation step minimum password length -1 fails. The sum of min digits in password, min special char in password, min upper char in password and min lower char in password is greater than the value of minimum password length, so the validation step minimum password length -2 fails.
Validating the following options stored in the SAP ASE server:
minimum password length: 8 min digits in password: 11 min special char in password: 11 min alpha in password: 11 min upper char in password: 1 min lower char in password: 1
sp_passwordpolicy 'validate password options'
Validation Step Pass/Fail/NA Validation Test --------------- ------------ -------------------------- min alpha in password Pass 'min alpha in password' > = 'min upper char in password' + 'min lower char in password' minimum password length-1 Fail 'minimum password length' > = 'min digits in password' + 'min special char in password' + 'min alpha in password' minimum password length-2 Fail 'minimum password length' > = 'min digits in password' + 'min special char in password' + 'min upper char in password' + 'min lower char in password' maximum password length-1 Fail 'max password length' > = 'min digits in password' + 'min special char in password' + 'min alpha in password' maximum password length–2 Pass 'max password length' > = 'min digits in password' + 'min special char in password' + 'min upper char in password' + 'min lower char in password' password exp warn interval NA 'password exp warn interval' < = 'systemwide password expiration' (6 rows affected) (return status = 1)
There are three failures, including a serious one, a failure in a test for maximum password length, where the sum of the required password components is greater than the maximum password allowed.
Validating the following options stored in the SAP ASE server:
minimum password length: 8 min digits in password: 2 min special char in password: 1 min alpha in password: 4 min upper char in password: 0 min lower char in password: 0
sp_passwordpolicy 'validate password options'
Validation Step Pass/Fail/NA Validation Test --------------- ------------ -------------------------- min alpha in password Pass 'min alpha in password' > = 'min upper char in password' + 'min lower char in password' minimum password length-1 Pass 'minimum password length' > = 'min digits in password' + 'min special char in password' + 'min alpha in password' minimum password length-2 Pass 'minimum password length' > = 'min digits in password' + 'min special char in password' + 'min upper char in password' + 'min lower char in password' maximum password length-1 Pass 'max password length' > = 'min digits in password' + 'min special char in password' + 'min 'min alpha in password' maximum password length–2 Pass 'max password length' > = 'min digits in password' + 'min special char in password' + 'min upper char in password' + 'min lower char in password' password exp warn interval NA 'password exp warn interval' < = 'systemwide password expiration' (6 rows affected) (return status = 0)
There are no failures with these settings. This reports all 5 rows returned, and a return status of 0.
sp_passwordpolicy information is stored in the master.dbo.sysattributes table.
Once the SAP ASE server has regenerated a new RSA key pair, subsequent generations use a formula of the last time when RSA key pair was generated, combined with the value you specified for keypair regeneration frequency.
The value of keypair regeneration period is stored in master..sysattributes under a new password policy class.
A default value of NULL for the option indicates that this row does not exist in sysattributes and the key pair is generated on when the SAP ASE server is restarted, and every 24 hours thereafter.
sp_passwordpolicy 'set', 'keypair regeneration period', NULL [, datetime of first generation]
sp_passwordpolicy 'regenerate keypair' [, datetime of first generation]
These global variable use the information from keypair regeneration period:
@@lastkpgendate – reflects the datetime of when the last key pair was generated.
@@nextkpgendate – to reflect when the key pair is next generated.
The permission checks for sp_passwordpolicy differ based on your granular permissions settings.
Setting | Description |
---|---|
Enabled | With granular permissions enabled, you must be a user with manage security configuration privilege. |
Disabled | With granular permissions disabled, you must be a user with sso_role. |
The set and clear commands in sp_passwordpolicy are audited through audit event 115, “Password Administration.”
sp_passwordpolicy 'set', 'option_name', 'option_value'
sp_passwordpolicy 'clear', 'option_name'
sp_passwordpolicy 'expire login passwords'
sp_passwordpolicy 'expire stale login passwords'
sp_passwordpolicy 'regenerate keypair'
sp_passwordpolicy 'expire role passwords'
sp_passwordpolicy 'expire stale role passwords'
The “password” audit option also audits the administration of RSA key pair regeneration period that generates the AUD_EVT_PASSWORD_ADMIN(115) auditing event.