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

Re-initialize OpenLDAP TLS context during plugin initialization #17

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

Conversation

dbnicholson
Copy link

When shinken-broker starts in the default daemon mode, it closes all
open files. If OpenLDAP is in use and the TLS implementation is GnuTLS,
then this may cause the random data source /dev/urandom to be closed.
This often results in the following error:

Warning : [webui] The mod auth-active-directory raise an exception:
{'info': "Error in the system's randomness device.",
'desc': "Can't contact LDAP server"}, I'm tagging it to restart later

In order to ensure the TLS context is valid for OpenLDAP, set the option
OPT_X_TLS_NEWCTX during plugin initialization. This will cause OpenLDAP
to re-initialize it's TLS context, which will cause GnuTLS to re-open
/dev/urandom.

@dbnicholson dbnicholson force-pushed the openldap-reinit-tls branch from 21f4a28 to 7c49273 Compare June 19, 2017 20:10
When shinken-broker starts in the default daemon mode, it closes all
open files. If OpenLDAP is in use and the TLS implementation is GnuTLS,
then this may cause the random data source /dev/urandom to be closed.
This often results in the following error:

Warning : [webui] The mod auth-active-directory raise an exception:
{'info': "Error in the system's randomness device.",
'desc': "Can't contact LDAP server"}, I'm tagging it to restart later

In order to ensure the TLS context is valid for OpenLDAP, set the option
OPT_X_TLS_NEWCTX during plugin initialization. This will cause OpenLDAP
to re-initialize it's TLS context, which will cause GnuTLS to re-open
/dev/urandom.
@dbnicholson
Copy link
Author

Any thoughts on this?

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