Get Password Rules
Setropts Administration functions for obtaining the system’s password rules.
SetroptsAdmin.get_password_rules()
def get_password_rules(self) -> Union[dict, bytes]:
📄 Description
This functionality is currently considered Experimental due to it’s dependency on
SetroptsAdmin.list_racf_options()
. SeeSetroptsAdmin.list_racf_options()
for more details.
Obtain the Password Rules for a system.
📥 Parameters
This method has no parameters.
📤 Returns
Union[dict, bytes]
Returns a dictionary of the Password Rules for the system. If theSetroptsAdmin.generate_requests_only
class attribute is set toTrue
, concatenated Security Request XML bytes will be returned.
❌ Raises
SecurityRequestError
RaisesSecurityRequestError
when the SAF Return Code of a Security Result is equal to4
.DownstreamFatalError
RaisesDownstreamFatalError
when the SAF Return Code of a Security Result is greater than4
.
💻 Example
Python REPL
>>> from pyracf import SetroptsAdmin
>>> setropts_admin = SetroptsAdmin()
>>> setropts_admin.get_password_rules()
{"rules":[{"minLength":4,"maxLength":8,"content":"********"}],"legend":{"A":"alpha","C":"consonant","L":"alphanumeric","N":"numeric","V":"vowel","W":"no vowel","*":"anything","c":"mixed consonant","m":"mixed numeric","v":"mixed vowel","$":"national","s":"special","x":"mixed all"}}
Password Rules Dictionary as JSON
{
"rules": [
{
"minLength": 4,
"maxLength": 8,
"content": "********"
}
],
"legend": {
"A": "alpha",
"C": "consonant",
"L": "alphanumeric",
"N": "numeric",
"V": "vowel",
"W": "no vowel",
"*": "anything",
"c": "mixed consonant",
"m": "mixed numeric",
"v": "mixed vowel",
"$": "national",
"s": "special",
"x": "mixed all"
}
}