Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Single Sign-On with Google Apps + App Engine

Is it possible to achieve SSO with the built-in OpenId on App Engine? I've been trying to integrate a Marketplace app and get the user logged in when coming from Google Apps (the admin panel or universal navigation). I failed miserably, then now I found this:

"The one exception to this is applications which do hybrid OpenID/OAuth — whitelisting does not currently work with this approach." (from here)

I assume that I have to implement OpenId using a library instead of using the built-in one to achieve SSO with Google Apps in my app? Or if it is possible with built-in OpenId, is there an example anywhere that shows how to do this?

like image 475
moraes Avatar asked Aug 28 '10 16:08

moraes


People also ask

Does Google have an IdP?

Google IdP is a user management platform for Google Apps and services. On top of that, Google IdP also acts as a SAML identity provider for third party web applications such as Salesforce and Workday.

How does SSO work in web application?

A user browses to the application or website they want access to, aka, the Service Provider. The Service Provider sends a token that contains some information about the user, like their email address, to the SSO system, aka, the Identity Provider, as part of a request to authenticate the user.


1 Answers

Later Google posted an article about how to do it in Python:

http://code.google.com/googleapps/marketplace/tutorial_python_gae.html

The summary is:

  • You must whitelist your "OpenID realm" (the app domain) in the Marketplace manifest XML.
  • The entry point used for the Google's universal navigation must contain the current Google Apps domain.
  • The entry point in your app redirects the user passing the Google Apps domain as federated_identity.

For example:

from google.appengine.api import users

# [...]

login_url = users.create_login_url(dest_url='http://my-app.appspot.com/',
                                   _auth_domain=None,
                                   federated_identity=google_apps_domain_name)
self.redirect(login_url)
like image 177
moraes Avatar answered Sep 24 '22 05:09

moraes