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

Use SSL for database connection when zabbix_server_dbtlsconnect is set #951

Closed
wants to merge 1 commit into from

Conversation

ChandlerSwift
Copy link
Contributor

@ChandlerSwift ChandlerSwift commented Apr 11, 2023

SUMMARY

I am setting up Zabbix with a database where SSL is enforced. Zabbix itself works fine with this, thanks to the zabbix_server_dbtlsconnect parameter, but a few of the playbook's setup tasks try to connect without TLS, which fails. This adds a parameter to enable TLS if the server would also be set to use it.

This isn't a perfect solution, but the community.mysql collection doesn't provide a way to use a TLS connection without setting one of check_hostname, ca_cert, client_key, or client_hostname, and we don't (can't, in our case) specify a cert/key. This will potentially fail when the host presents a cert with the wrong hostname (which can happen if zabbix_server_dbtlsconnect is set to required rather than verify_ca or verify_full). However, there's not a way to enable TLS without setting one of these options without also changing the MySQL collection.

There's some more background on this issue in the community.mysql collection: ansible-collections/community.mysql#90

(I'm not convinced this is the right approach, though it does fix our particular use case! If there's another way to fix this that would be better, I'd appreciate the feedback and can try to update the PR if desired.)

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

zabbix_server role

@ChandlerSwift
Copy link
Contributor Author

Hey @pyrodie18, is there anything I can do to help get this moved towards being merged? Thanks!

@pyrodie18
Copy link
Collaborator

It's not ready to be merged. It failed the checks and looks like it was based on a pre 2.0 release. Need to rebase and update your code and make sure that it passes the checks before we can merge it.

@BGmot
Copy link
Collaborator

BGmot commented Jun 25, 2023

@pyrodie18 should we close it without merging?

@pyrodie18
Copy link
Collaborator

Closed due to lack of corrections. Please feel free to make the required changes and create a new PR.

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.

3 participants