Comments (13)
I am all for that. If you have examples in code, or a PR, I'd be happy to a review.
from aura.auth.
Unfortunately I do not have any example readily available. I do know that
the Drupal ldap module supports this use case.
from aura.auth.
Link to the Drupal LDAP module? Every little bit you help out helps this go faster. :-)
from aura.auth.
I'm on mobile right now, but I'll add some details as soon as I get to a
computer 😃
from aura.auth.
@t0xicCode is it simple ldap or ldap ?
http://cgit.drupalcode.org/simple_ldap/tree/?h=7.x-2.x
http://cgit.drupalcode.org/ldap/tree/?h=8.x-2.x
May be good if you can point to the right file though.
Thanks
from aura.auth.
@harikt ldap. It's located in the function at http://cgit.drupalcode.org/ldap/tree/ldap_authentication/ldap_authentication.inc#n532.
Line 562 does the initial bind with the service account credentials, it then maps or searches for the given username, and finally, at line 659 actually authenticates with the given password and the mapped ldap user.
The bind
function that is called at multiple places uses the stored service account information if it's passed NULL
for its parameters.
from aura.auth.
Thank you @t0xicCode
from aura.auth.
There's also some trickiness here that some LDAP servers require you to set options for the bind to even work right:
ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
I'm not sure this breaks it for other connection types, but I had to use this for a MS-based domain handler.
Also, I noticed in the VerifierInterface, it requires the second parameter (the hashed value). In this case, it doesn't make sense to have to generate something for that as the plain-text password is just sent to the LDAP server for validation.
from aura.auth.
Also, I noticed in the VerifierInterface, it requires the second parameter (the hashed value). In this case, it doesn't make sense to have to generate something for that as the plain-text password is just sent to the LDAP server for validation.
Hm, in that case the verifier don't need to do the verification . And even though there need a PlainText verifier.
from aura.auth.
Sorry forgot to add . Which always returns true.
<?php
namespace Aura\Auth\Verifier;
class PlainTextVerifier implements VerifierInterface
{
public function verify($plaintext, $hashvalue, array $extra = array())
{
return $plaintext === $hashvalue;
}
}
from aura.auth.
So you're saying not having a verifier for LDAP at all? Based on the others it kind of seems like that's the point (to abstract that out behind the generic verify
method).
from aura.auth.
@enygma I was looking at http://php.net/manual/en/function.ldap-compare.php and it seems to me we need to do something like as shown in example. The above example I mentioned checking plain and hash one is wrong.
from aura.auth.
Yeah, the tricky part on that is whether or not the password is returned and how to set up that base DN information. Also, the compare will only work if there's a service account as was mentioned in the initial comment here. If you're using the ldap_bind
method for testing the login, you wouldn't even be able to run the compare if the login was incorrect.
from aura.auth.
Related Issues (20)
- 4.0.0 Release? HOT 2
- PHP 7.4 compatibility HOT 3
- Release and without fear to use HOT 1
- PDO: Thrown exception error messages HOT 6
- Auth object calling session_start HOT 1
- Rehash HOT 2
- Does HtpasswordVerifier need to verify the password hash is buggy and using bcrypt ? HOT 1
- Better ways to handle brute force attack
- Sessions, remember me functionality and other things. HOT 1
- Can't use minimum-stability: stable with this package HOT 2
- Adapter in resume HOT 1
- Probably good to have messages passed for Exceptions ? HOT 3
- LdapAdapter::bind performs a double unbind on the underlying ldap resource HOT 2
- Default timeout values HOT 3
- Missing return values, or changed API and docblock out of date? HOT 4
- Aura.Session compatibility HOT 12
- Unable to logout HOT 1
- If password changes, session is still valid. HOT 4
- New release builds, please? HOT 14
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 aura.auth.