Describe the bug
everpure.flasharray.purefa_policy fails when managing the built-in
FlashArray management password policy if the API returns
lockout_duration as null.
The module directly accesses pwd_policy.lockout_duration. With the
installed py-pure-client, a model field whose value is null raises
AttributeError, so the module fails before it can compare or apply the
requested policy configuration.
I assume this will also fail for other attributes returning null:
- enforce_dictionary_check
- enforce_username_check
- lockout_duration
- min_character_groups
- min_characters_per_group
- min_password_length
To Reproduce
-
Use a FlashArray that supports REST API 2.46.
-
Ensure the existing management password policy has lockout_duration
unset.
-
Confirm the API response from:
GET /api/2.46/policies/password?names=management
contains:
{
"lockout_duration": null
}
-
Run this task:
- name: Configure management password policy
everpure.flasharray.purefa_policy:
name: management
policy: password
min_password_length: 14
min_character_groups: 4
min_characters_per_group: 1
enforce_dictionary_check: true
enforce_username_check: true
password_history: 24
max_login_attempts: 5
lockout_duration: 900
-
Observe the failure:
File ".../purefa_policy.py", line 2007, in update_policy
"lockout_duration": pwd_policy.lockout_duration,
AttributeError
Expected behavior
A missing or null lockout_duration should be treated as “not configured.”
The module should then compare it with the requested value and apply the
requested password-policy settings.
For example, the module should safely retrieve the value:
"lockout_duration": getattr(pwd_policy, "lockout_duration", None),
The same safe handling may be required for other nullable password-policy
fields accessed directly.
Screenshots
Not applicable. A sanitized raw JSON response and traceback can be attached if
useful.
Desktop
- OS: Linux
- Browser: Not applicable
- Version: Not applicable
Smartphone
Not applicable.
Additional context
everpure.flasharray collection version: 1.44.0
py-pure-client version: 1.90.0
- Python version:
3.14
- FlashArray REST API version:
2.46
- The collection's
purefa_policy module currently declares password-policy
support from REST API 2.34; password-policy management is documented as
introduced in REST API 2.39.
Do not include API tokens, session tokens, or unredacted array identifiers in
any attached JSON or logs.
Describe the bug
everpure.flasharray.purefa_policyfails when managing the built-inFlashArray
managementpassword policy if the API returnslockout_durationasnull.The module directly accesses
pwd_policy.lockout_duration. With theinstalled
py-pure-client, a model field whose value isnullraisesAttributeError, so the module fails before it can compare or apply therequested policy configuration.
I assume this will also fail for other attributes returning null:
To Reproduce
Use a FlashArray that supports REST API
2.46.Ensure the existing
managementpassword policy haslockout_durationunset.
Confirm the API response from:
contains:
{ "lockout_duration": null }Run this task:
Observe the failure:
Expected behavior
A missing or
nulllockout_durationshould be treated as “not configured.”The module should then compare it with the requested value and apply the
requested password-policy settings.
For example, the module should safely retrieve the value:
The same safe handling may be required for other nullable password-policy
fields accessed directly.
Screenshots
Not applicable. A sanitized raw JSON response and traceback can be attached if
useful.
Desktop
Smartphone
Not applicable.
Additional context
everpure.flasharraycollection version:1.44.0py-pure-clientversion:1.90.03.142.46purefa_policymodule currently declares password-policysupport from REST API
2.34; password-policy management is documented asintroduced in REST API
2.39.Do not include API tokens, session tokens, or unredacted array identifiers in
any attached JSON or logs.