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

fix FIPS mode compatibility #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Pectojin
Copy link

When using the zabbix_api.py script, in Ansible zabbix_host module, on a RHEL8 machine, with FIPS mode enabled, the following error is produced:
Failed to connect to Zabbix server: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS

The issue occurs on line 203, where the password is MD5 hashed before being printed to debug log:

        # don't print the raw password.
        hashed_pw_string = "md5(" + hashlib.md5(l_password.encode('utf-8'), usedforsecurity=False).hexdigest() + ")"
        self.debug(logging.DEBUG, "Trying to login with %s:%s" %
                (repr(l_user), repr(hashed_pw_string)))

Since the MD5 sum is only used for the debug log the simple options are to:

  1. Indicate it's not used for security
  2. Avoid printing the password to debug mode in any form

This PR accomplishes # 1

Issue is similar to s3tools/s3cmd#1005

Issue is almost identical to s3tools/s3cmd#1005
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant