Skip to content

Merge dev-v2 branch into master #50

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

Merged
merged 66 commits into from
Oct 16, 2014
Merged

Merge dev-v2 branch into master #50

merged 66 commits into from
Oct 16, 2014

Conversation

mtodd
Copy link
Member

@mtodd mtodd commented Oct 15, 2014

This PR merges in the dev-v2 branch into master, including these fixes:

This does not signify that v2 is ready, just that this code is at a point where we want to keep iterating on master and that v2 is on the horizon.

Membership Validation

This introduces MembershipValidators module with Classic and Recursive (with more to come) objects intended to replace the expensive/inefficient GitHub::Ldap::Domain#is_member? method. (The Classic strategy wraps that method so it's still available if required.)

The GitHub::Ldap::MembershipValidators::Recursive strategy efficiently determines whether a user is a member of any of the supplied groups, recursing down a chain until membership is validated, no more groups can be checked, or we hit the maximum depth. Very little data is transferred to the client side for these queried, resulting in much faster operation and much less data transferred over the wire.

An ActiveDirectory-specific strategy is planned before v2.

Tests

  • use single seed LDIF fixture file for all tests
  • boot LDAP server once for all tests (instead of once per class)
  • wire up OpenLDAP CI tests alongside ApacheDS

cc @jch

@mtodd
Copy link
Member Author

mtodd commented Oct 15, 2014

These changes were individually reviewed in #45, #48, and #49.

module MembershipValidators
autoload :Base, 'github/ldap/membership_validators/base'
autoload :Classic, 'github/ldap/membership_validators/classic'
autoload :Recursive, 'github/ldap/membership_validators/recursive'
Copy link
Member Author

Choose a reason for hiding this comment

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

@jch will want to change this from autoload since it's deprecated (thanks for the pointer).

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

jch and others added 3 commits October 15, 2014 15:29
Pass through search options for GitHub::Ldap::Domain#user?
Removed deprecated autoload. h/t @jch
@jch
Copy link
Contributor

jch commented Oct 16, 2014

🚢 I think we can make further tweaks from master as needed. I only skimmed over this since we've reviewed them separately in other PR's.

mtodd added a commit that referenced this pull request Oct 16, 2014
Merge dev-v2 branch into master
@mtodd mtodd merged commit 0bdbdf2 into master Oct 16, 2014
@mtodd mtodd deleted the dev-v2 branch October 16, 2014 01:16
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