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 configurable LDAP timeout properties #49

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

filip-daca
Copy link

@filip-daca filip-daca commented Sep 12, 2022

This PR adds 2 new fields to configure LDAP timeouts. Without it, no timeout was used, which could lead to LDAP connectivity issues causing deadlocks while accessing synchronised user cache provided by Guava.

Verification
  • new fields in UI:

Screenshot 2022-09-12 at 15 40 30

  • timeouts used visible in logs:
Sep 12, 2022 1:27:21 PM FINE org.acegisecurity.ldap.DefaultInitialDirContextFactory connect
Creating InitialDirContext with environment {java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.referral=follow, java.naming.security.principal=***, com.sun.jndi.ldap.connect.timeout=30000, com.sun.jndi.ldap.connect.pool=true, com.sun.jndi.ldap.read.timeout=60000, java.naming.provider.url=ldaps://****:636/dc=***, java.naming.security.authentication=simple, java.naming.security.credentials=******}
  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira: https://issues.jenkins.io/browse/JENKINS-69590
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@sboardwell
Copy link
Contributor

Hi @filip-daca, thanks a lot for the PR. Instead of adding additional fields, do you think you could base your solution on environment variables as done in jenkinsci/ldap-plugin#102?

This would keep mean less maintenance and helps keep things aligned with the main ldap plugin.

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.

2 participants