SATOSA icon indicating copy to clipboard operation
SATOSA copied to clipboard

Add option pool_lifetime option to ldap

Open shaardie opened this issue 3 years ago • 7 comments

This patch adds another option to the ldap connection. Next to the other pool connections, it is now possible to set the pool_lifetime.

Some LDAP Server abandon connections after some time without notifying the client. This option allow to set a maximal pool lifetime, to also close connections on the client.

All Submissions:

  • [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • [x] Have you added an explanation of what problem you are trying to solve with this PR?
  • [x] Have you added information on what your changes do and why you chose this as your solution?
  • [x] Have you written new tests for your changes?
  • [x] Does your submission pass tests?
  • [x] This project follows PEP8 style guide. Have you run your code against the 'flake8' linter?

shaardie avatar Dec 11 '21 14:12 shaardie

I tested this PR rebased onto v8.0.1 and found no issues. Thank you for this nice commit.

skoranda avatar Feb 22 '22 14:02 skoranda

@shaardie Would you have time to add a test for this functionality? The limited testing we have for the LDAP attribute store is in tests/satosa/micro_services/test_ldap_attribute_store.py. It would be great to see the tests evolve.

skoranda avatar Feb 22 '22 14:02 skoranda

@shaardie Would you have time to add a test for this functionality? The limited testing we have for the LDAP attribute store is in tests/satosa/micro_services/test_ldap_attribute_store.py. It would be great to see the tests evolve.

Yes, I can not see that the other parameter used in the ldap3 connection are tested. Otherwise I would have just followed the test strategy and extended it. I think this is a more general problem in this microservice and should be tackled outside of the scope of this particular Pull Request.

Unfortunately, I will not have time the next weeks to write such tests.

But explicitly for this parameter: We are running this already successful in production for quite some time.

shaardie avatar Feb 22 '22 15:02 shaardie

Any update here? This PR is approved for quite some time now.

shaardie avatar Apr 15 '22 09:04 shaardie