-
Notifications
You must be signed in to change notification settings - Fork 21
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
Multiple named configurations #6
Open
lmctv
wants to merge
21
commits into
Pylons:master
Choose a base branch
from
lmctv:multiple_named_configurations
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To avoid useless activation of the context managers both in Connector.ldap_login_query() and Connector.user_groups()
to correctly check exception from the first search too.
by setting a sizelimit on authentication searches.
The API has been preserved by refactoring the caching and connection searching into a new _LDAPQuery.execute_cache method that gets called in turn by _LDAPQuery.execute
by refactoring the _LDAPQuery class: - slightly refactor _LDAPQuery.execute by splitting it into a new method _LDAPQuery.execute_cache, which does the real work of searching and caching, and a replacement _LDAPQuery.execute which will skip the call to execute_cache when filter_tmpl is empty. - directly call _LDAPQuery.execute_cache after entering the user-bind self.manager.connection() context manager
This will avoid trivial DOS and ldap.FILTER_ERROR exceptions on attempted logins by users sporting "funny" login names, like 'user*name' or 'user(middle)name'. This is a forward port of f3057446181106 to silence merge conflicts.
This way, it becomes possible to add distinct ldap connectors to the same pyramid app, and reference them by adding a context=... discriminator to the api calls: ldap_setup() ldap_set_login_query() ldap_set_groups_query() get_ldap_connector() and to the Connector's __init__ method. Feature comes complete with unit tests...
to help groupfinder discriminate between configured backend contexts
to simplify downstream integration.
into multiple_named_configurations
Shorten one line and correct one typo.
@mcdonc: please tell me where should I send the beer box I bought to try and bribe you into taking a look at this PR :-) |
…_named_configurations Conflicts: pyramid_ldap/__init__.py
without being forced to read the vcs log
in `ldap_setup`, `get_ldap_connector`, `ldap_set_login_query` and `ldap_set_groups_query` API calls.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request is a superset of the previous one; hope you don't mind this much noise
coming from my side these days...
Thank you,