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

fix: concurrent calls not authorized and LDAP timeout #20

Merged
merged 8 commits into from
Sep 21, 2023

Conversation

kpetremann
Copy link
Contributor

@kpetremann kpetremann commented Aug 21, 2023

Fix two LDAP issues:

  • unable to authenticate concurrent requests
  • no reconnect after the TCP/LDAP timed out
  • timeout if the LDAP is not responding to authentication requests

In some cases like network connectivity lost, the LDAP bind request is
waiting indefinetely.

To avoid that, we to a timeout on the LDAP request by closing the
LDAP connection.
internal/api/auth/ldap.go Outdated Show resolved Hide resolved
cmd/data-aggregation-api/main.go Outdated Show resolved Hide resolved
internal/api/auth/ldap.go Outdated Show resolved Hide resolved
internal/api/auth/ldap.go Outdated Show resolved Hide resolved
internal/api/auth/ldap.go Outdated Show resolved Hide resolved
internal/api/auth/ldap.go Outdated Show resolved Hide resolved
internal/api/auth/ldap.go Outdated Show resolved Hide resolved
internal/api/auth/ldap.go Outdated Show resolved Hide resolved
internal/api/auth/basic_auth.go Outdated Show resolved Hide resolved
internal/config/settings.go Outdated Show resolved Hide resolved
@kpetremann kpetremann force-pushed the ldap_fix branch 2 times, most recently from 21d35dc to 668cd94 Compare August 24, 2023 15:47
Max connection lifetime is the maximum time a LDAP connection will be
re-used for authentication requests. Default is 1 minute.

This is not a guarantee:
- the LDAP could close the connection
- the TCP connection could be closed (timeout if the max connection
  lifetime is too high, issues etc...)
internal/api/auth/ldap.go Outdated Show resolved Hide resolved
internal/api/auth/ldap.go Outdated Show resolved Hide resolved
internal/api/auth/ldap.go Outdated Show resolved Hide resolved
internal/api/auth/ldap.go Outdated Show resolved Hide resolved
internal/api/auth/ldap.go Outdated Show resolved Hide resolved
@kpetremann kpetremann merged commit b233912 into criteo:main Sep 21, 2023
2 checks passed
@kpetremann kpetremann deleted the ldap_fix branch September 21, 2023 10:04
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