Comments (2)
If I bypass the allowed_to_login method which checks all of the group and ous then the delay is gone. I would think that it would be better to check to see if the user actually needs the application to verify if it is needed to traverse the users group and uo assignments prior to doing so.
The original code:
def self.allowed_to_login(user)
(allowed_from_arrays(@config.allowed_groups, @config.denied_groups, user.cn_groups_nested) && allowed_from_arrays(@config.allowed_ous, @config.denied_ous, user.dn_ous))
end
Here would be an alternative:
def self.allowed_to_login(user)
#Only inspect groups and organizations if required
(((@config.allowed_groups.blank? && @config.denied_groups.blank?) || allowed_from_arrays(@config.allowed_groups, @config.denied_groups, user.cn_groups_nested)) && ((@config.allowed_ous.blank? && @config.denied_ous.blank?) || allowed_from_arrays(@config.allowed_ous, @config.denied_ous, user.dn_ous)))
end
On a side note allowed_ous and denied_ous are not mentioned in the default config. Cn_groups_nested an dn_ous need some love to help with this issue for those users that do have to verify group and ou membership.
from adauth.
Will look into tidying this up ASAP
from adauth.
Related Issues (20)
- LDAP over ssl HOT 8
- Reset password instead of change? HOT 4
- Remember Me - possible?
- Federated Active Directory Server Integration HOT 2
- Groups with over 1500 members... HOT 3
- Please provide meaningful error message if user is not found HOT 1
- Do not rely on `givenname` being set HOT 1
- `allowed_ous` ignored HOT 1
- Disable log HOT 1
- Authenticating without Query_user HOT 2
- simple_authenticate still requires a query user
- Error in documentation?
- Adding a secondary domain server? HOT 3
- allowed_groups error
- Tests shouldn't rely on a real AD instance
- Insecure LDAPS implimentation upstream
- Please tag the release 2.0.6
- Edit login form HOT 2
- This repository is dead. Don't create any issues.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adauth.