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(ldap-auth) use username, password for cache key #3677

Merged
merged 1 commit into from
Aug 13, 2018

Conversation

shashiranjan84
Copy link
Contributor

Summary

This change adds password as part of cache key, doing so
we can cache invalid credential without blocking valid credential

Full changelog

  • Update cache key generation logic to use password
  • Update invalidation spec to test changes
  • Minor log refactor

@shashiranjan84 shashiranjan84 requested a review from a team August 6, 2018 18:11
@shashiranjan84 shashiranjan84 force-pushed the fix/ldap-negative-cache branch from 68bd02d to f24eb72 Compare August 6, 2018 22:55
thibaultcha referenced this pull request Aug 7, 2018
- Remove negative caching as there is no way for invalidation
- Use `%` instead of `bin.mod`
@@ -28,29 +27,36 @@ for _, strategy in helpers.each_strategy() do
ldap_port = "389",
start_tls = false,
base_dn = "ou=scientists,dc=ldap,dc=mashape,dc=com",
attribute = "uid"
attribute = "uid",
cache_ttl = 5,
Copy link
Member

Choose a reason for hiding this comment

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

Could we use a slightly shorter TTL, to avoid slowing down our tests? 5s isn't much, but when every single test relying on TTL behaviour in the suite waits for 5s between each test, we end up with a problem... Maybe 1? 2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, will update it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I set it to one, please review

This change adds password as part of cache key, doing so
we can cache invalid credential without blocking valid credential
@shashiranjan84 shashiranjan84 force-pushed the fix/ldap-negative-cache branch from f24eb72 to 3a63b47 Compare August 7, 2018 23:39
@thibaultcha thibaultcha merged commit e3646da into master Aug 13, 2018
@thibaultcha thibaultcha deleted the fix/ldap-negative-cache branch August 13, 2018 19:11
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