Closed (won't fix)
Project:
Services
Version:
7.x-3.0-rc6
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Sep 2011 at 15:55 UTC
Updated:
6 Mar 2013 at 19:48 UTC
Jump to comment: Most recent file
Comments
Comment #1
marcingy commentedYou can create a sandbox project to provide authenication via ldap which can be promoted to a full project after it going through the drupal module approval process. Services core will not support LDAP.
Comment #2
mrryanjohnston commentedI'm sorry, I forgot to mention: the LDAP authentication is being handled by this module: http://drupal.org/project/ldap I would like to be able to leverage the Services module to authenticate through this module.
Comment #3
marcingy commentedSo you need to convice the maintainer of the ldap module to include a module that will plugin into the services auth system or build a standalone module that provides the bridge between the ldap module and services.
There is might be be push back from the ldap maintainer about adding a services module, so a new project that you maintain that integrates the 2 seems to be the best way forward for you in my opinion.
Comment #4
mrryanjohnston commentedFor anyone interested, I posted this in the LDAP issue tracker: http://drupal.org/node/1286790
Comment #5
mrryanjohnston commentedI made a dirty little patch if anyone is interested. I'll work on making this into a services module.
Comment #6
forestmars commented@marcingy - What would be the reason for pushback from the LDAP maintainer on releasing an LDAP sub-module for Services?
Comment #7
marcingy commentedThat they may not want to maintain a services module if they themselves don't use services.
Comment #8
mrryanjohnston commentedSo I'm attempting to put together a module for this feature. Here is what I have so far: https://gist.github.com/1237280
Currently, it's exhibiting some weird behavior. I'm using the hook hook_services_resources_alter() in order to redefine the callback function for the user.login method in order to do some specific stuff at login time. The hook seems to fire every time I go to the services page in the web gui, but it only fires the first time after clearing cache when attempting to access the rest service directly (ie with curl). Above all, it never seems to fire my custom callback. MrMaksimize in IRC mentioned it may have something to do with caching, even though I'm clearing my cache after making changes. Thoughts?
Comment #9
johnbarclay commentedIf services authentication is setup correctly, it should simply leverage the "user" module api for authentication. Ldap authentication or any other credential based external authentication should work. Thinks like openid and cas may have a different workflow that might create problems.
I maintain the ldap project and am not familiar with services authentication so can't say for sure. The "user" module is architected for external authentication mechanisms to plug in to it seamlessly. If this is not the case, I may be able to help.
My understanding is the use case is to authenticate to a webservice with ldap credentials. If this is the use case, an additional module seems like overkill and the request should simply be labelled "Support user module authentication model"
Comment #10
marcingy commented@johnbarclay I think we have a similar issue in the opposite direction. For services authenication equals how am I telling a service that I am given user. In services core 2 schemas exist for this, utilising the standard drupal login mechanism and then providing a sess id to calls after the initial login or by utilising oauth. Does ldap use standard drupal hooks in the area of logging in and subsequently populate the drupal session table?
Comment #11
mrryanjohnston commentedI started work on a module as a fix in the mean time: http://drupal.org/sandbox/mrryanjohnston/1289212. I'm running into an issue currently, though; as of right now, services still defaults to using the user_resource.inc file rather than my custom defined function. I think it has something to do with caching, but the fixes that I tried implementing for that did not seem to do the trick. Patches gladly accepted!
Comment #12
mrryanjohnston commentedOk, I seem to have gotten this module working. It's only a sandbox project, so use at your own discretion.
Comment #13
BarisW commentedCool, thanks! Will try it out ;)
Comment #14
jaarong commentedHas this been resolved? I am having some problems authenticating with a site that uses LDAP. I'm wondering if Services not integrating well with LDAP might be the problem.