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

nipapd: Close LDAP connection after authentication #1369

Merged
merged 1 commit into from
May 20, 2024

Conversation

garberg
Copy link
Member

@garberg garberg commented Jan 31, 2024

The LDAP auth backend never explicitly closed the connection to the LDAP server, when meant that it was kept open until the auth object timed out from the auth cache which can take some time.

Now LDAP connections are closed once the authentication is done.

The LDAP auth backend never explicitly closed the connection to the LDAP
server, when meant that it was kept open until the auth object timed out
from the auth cache which can take some time.

Now LDAP connections are closed once the authentication is done.
except (ldap.CONNECT_ERROR, ldap.SERVER_DOWN) as exc:
self._logger.error('Attempted to start TLS with ldap server but failed.')
self._logger.exception(exc)
raise AuthError('Unable to establish secure connection to ldap server')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (87 > 79 characters)

if self._ldap_search_conn is not None:
self._ldap_search_conn.start_tls_s()
except (ldap.CONNECT_ERROR, ldap.SERVER_DOWN) as exc:
self._logger.error('Attempted to start TLS with ldap server but failed.')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (89 > 79 characters)

@garberg garberg merged commit 8b2dc2d into SpriteLink:master May 20, 2024
5 checks passed
@garberg garberg deleted the close_ldap_conn branch May 26, 2024 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants