Closed (fixed)
Project:
Google Apps Authentication
Version:
5.x-1.0
Component:
Code
Priority:
Critical
Category:
Feature request
Assigned:
Reporter:
Created:
23 Apr 2008 at 15:42 UTC
Updated:
9 Mar 2012 at 20:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
Cwolly commentedDitto, would love to have this ported.
Comment #2
Cwolly commentedI'm working on this. I've never ported anything before, but I'm making headway. I've got most things working but I get access denied on the /admin/settings/googleauth page. Something to do with how 6.2 handles authentication.
Any help would be appreciated.
Comment #3
ssnider commentedSorry for the communications lapse -- I definitely plan to attempt a port. I'd be interested in looking at anyones code that even partially implements a port.
Comment #4
ssnider commentedThis is probably due to 'access administration pages' no longer being the admin privilege in drupal 6. if you can look in your db and see what the new value is, the code should start working.
Comment #5
Kirok commentedOkay I'm entirely new to this stuff and to be honest I'm just playing around but try this for the auth part:
It still generates, some errors; different errors but we could do this conversion piece by piece.
Comment #6
Cwolly commentedI've been having a time getting this working in Drupal 6. Anyone make progress? I have a testing environment set up if anyone needs code tested. I can't seem to it to work with Drupal 6.2.
Comment #7
Cwolly commentedI think I got this working in Drupal 6, will do further testing tomorrow and submit patch.
Comment #8
Cwolly commentedOk, so I've implemented the code for the googleauth.module and it is working with drupal 6. Submitting for review. This patch is working, but keep in mind you need to modify your googleauth.info to reflect Drupal 6 core for this to work.
Also, the bugs such as the SAML request bug that was never fixed in the 5.x version of this module are still there, as it is beyond the scope of my knowledge.
Patch incoming...
Comment #9
rdlugosz commentedSeems this has gone stale... any chance we can see this updated officially for Drupal 6? If not, how do I apply the patch? Standard unix patch command against the original sources?
Comment #10
mhenstell commentedRunning the patch... seems to work, when I enter my google docs subdomain I am forwarded to the signin page, I login, but I am left in drupal. After signin I should be redirected to google apps, correct?
Comment #11
jfha73 commentedI ran the patch, but it says not compatible with Drupal 6.9
Comment #12
jfha73 commentedHas anybody checked this: http://drupal.org/project/google_auth
Comment #13
EastWan commentedI've got this working without any problems today in D6 using the sample code provided by google - so it does not use any of this module's code.
I've attached the code. I've called my module 'hs_gauth' and renamed the functions in a similar fashion. I would also be willing to become a co-maintainer for this module, if the author doesn't want to support it anymore.
The module comes with no UI. You have to fill in your domain (e.g. example.com) in the .module file. It will register the path /hs_gauth to handle all requests. So you should register the following paths on Google's SSO settings:
http://examle.com/hs_gauth/pw - to change the password (will redirect to the user/$id/edit page)
http://example.com/ - as your logout page (I don't want to log users out of my site when they log out of Google Apps)
http://example.com/hs_gauth/login - as your login page
If Javascript is enabled, you'll never even see the module in the frontend. It just takes the name of the current drupal user and throws it at Google.
You might want to enable the http://drupal.org/project/r4032login module, so that users are directed to the login page when they try to access GApps, get directed to the module's login handler but are not signed in (otherwise they'll see a 403 access denied message).
The sample source code can be found here:
http://code.google.com/intl/de-DE/apis/apps/sso/saml_reference_implement...
A guide on how to create the public/private keys is found here:
http://code.google.com/intl/de-DE/apis/apps/articles/sso-keygen.html
I've used these commands:
openssl dsaparam -out dsaparam.pem 1024
openssl gendsa -out dsaprivkey.pem dsaparam.pem
openssl dsa -in dsaprivkey.pem -outform DER -pubout -out dsapubkey.key
openssl req -new -x509 -key dsaprivkey.pem -out dsacert.pem (upload this file to Google Apps)
You can delete the dsparam.pem file now. You should not put these files in the module's directory so to not have anybody download your private key file. Fill in the key paths at line 112/113 of the .module file.
Please let me know what you think.
P.S. @jfha73: the google_auth module, as far as I understand it, uses this feature just the other way round: Google handles the login and then passes this information on to your site. This module, however, handles the login and passes the information on to Google.
Comment #14
bryancasler commentedsubscribe
Comment #15
timlie commentedsubscribe
Comment #16
hunt3r commentedI can confirm that the basics of the module posted to this thread works. The javascript redirect isn't working for me, but I'm looking into that now. Since the sample PHP code is basically good to go, this just needs a bit of massaging. I will report back once I get it working soundly, we're implementing this on a Drupal / CiviCRM / Google Apps implementation for a non-profit here in Philadelphia.
Comment #17
bryancasler commentedAny report back would be greatly appreciated.
Comment #18
chansion.vc commentedsubscribe
Comment #19
brendanxc commentedI put together a D6 version based on the D5 one, EastWan's version, and some general tweaking.
I can't believe how long it took to even figure out this was the module to look into for basic SSO with Google Apps.
My current copy is attached; it's working great for me, hopefully it'll be useful.
What's the next step with getting this project to D6? I can make a patch if needed.
Comment #20
jfha73 commentedThis sounds great, but I just tried it and when I enabled it it gave me this:
I disabled it and the warning went away.
Comment #21
EastWan commentedThanks, brendanxc, this works really well.
The fix for #20: You used "'access arguments' => TRUE", instead of "'access callback' => TRUE," in googleauth_menu(). Probably a typo, as you don't want access arguments there (otherwise they'd have to be an array).
I've fixed this. Also, I've added the menu hook for the Change Password option in Google Apps, it's googleauth/pw and it simply redirects to the user's profile.
Comment #22
cweagansSo that everyone knows, I have a sandbox for this module here: http://drupal.org/sandbox/cweagans/1414826
I'm going to be finishing up the port to Drupal 6 and cleaning it up for release, as well as porting to Drupal 7.
Comment #23
cweagansCan somebody create a patch off of the 6.x HEAD in Git? I'd be glad to commit a patch.
Comment #24
cweagansWorking on getting this committed.
Comment #25
cweagansAfter a ton of coding standards cleanups and a bit of review, I've committed and pushed this to git. I'll also create a dev release.