Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for 10.0.2.0's changes to management_authentication #315

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions ibmsecurity/isam/base/management_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def set(isamAppliance,
bind_dn=None,
bind_password=None,
ldap_debug=None,
enable_usermapping=None,
usermapping_script=None,
check_mode=False,
force=False):
"""
Expand Down Expand Up @@ -70,6 +72,22 @@ def set(isamAppliance,
json_data["ldap_debug"] = ldap_debug
elif ibmsecurity.utilities.tools.version_compare(isamAppliance.facts["version"], "9.0.4.0") >= 0:
json_data["ldap_debug"] = False
if enable_usermapping is not None:
if ibmsecurity.utilities.tools.version_compare(isamAppliance.facts["version"], "10.0.2.0") < 0:
warnings.append(
"Appliance at version: {0}, enable_usermapping: {1} is not supported. Needs 10.0.2.0 or higher. Ignoring enable_usermapping for this call.".format(
isamAppliance.facts["version"], enable_usermapping))
else:
json_data["enable_usermapping"] = enable_usermapping
elif ibmsecurity.utilities.tools.version_compare(isamAppliance.facts["version"], "10.0.2.0") >= 0:
json_data["enable_usermapping"] = False
if usermapping_script is not None or usermapping_script == '':
if ibmsecurity.utilities.tools.version_compare(isamAppliance.facts["version"], "10.0.2.0") < 0:
warnings.append(
"Appliance at version: {0}, usermapping_script: {1} is not supported. Needs 10.0.2.0 or higher. Ignoring usermapping_script for this call.".format(
isamAppliance.facts["version"], usermapping_script))
else:
json_data["usermapping_script"] = usermapping_script
if force is False:
if bind_password is not None:
warnings.append("Unable to read existing bind password to check idempotency.")
Expand Down