views:

246

answers:

2

I'm looking for info on howto get a google appengine app onto the newly announced google apps marketplace.

The page at http://code.google.com/googleapps/marketplace/sso.html does not have a python openid apps-discovery library which seems to be the stumbling block.

Has anyone ported an appengine app to the marketplace? or know of the existence of a python openid apps-discovery library? or have a timeline on this?

updated: please see comment re: standard python openid library vs library that supports "apps-discovery"

updated: apparently it is not currently possible, however it will be soon see http://www.google.com/support/forum/p/apps-apis/thread?tid=52e36f012c2436c3&hl=en

A: 

The python-openid library appears to support discovery.

Nick Johnson
the page http://code.google.com/googleapps/marketplace/tutorial.html#Integrate-OpenID says"Because Google Apps doesn't require every customer to host a website, a slightly modified version of the discovery prototocol is used for Google Apps domains" and it goes on to talk about the php-openid-apps-discovery library. The standard openid library apparently will not work. It would help to have a clear writeup on how a python appengine app can participate in the apps marketplace.PS: I follow your notdot.net blog, great stuff.
molicule
The only step that the standard python-openid library doesn't appear to take care of is the initial discovery - fetching http://{domain}/.well_known/... or the google.com equivalent. I do intend to write a post about this, probably tomorrow, though. :)
Nick Johnson
molicule
+3  A: 

I answered an almost the same question at http://stackoverflow.com/questions/2313573/google-apps-login-in-django/2575075#2575075. Check it out.

Edited:

Actually, your question can be separated into two related questions.

  1. How to build an application for Google Marketplace?
  2. How to authenticate with Google Apps Account to login into your application?

You don't really have to authenticate with Google Apps. But since your user already have an Google Apps Account, it's nice to let the user login with their existing account instead of building your own user management module from scratch.

For the first question, when you register your application on Google Marketplace, you provide your login url. It's in http://yourdomain.com/auth/domain.com kind of format. The domain.com part is the domain name of the organization who choose to install your application. When one organization installed your application, they will use that login url as the entrance point. It is your application determines what to do with the request. Typically, you redirect the user to the login page. Since you want the user to login with his Google Apps Account, you could generate the login request and redirect the user to Google's server. And that part is related to the second question.

For the second question, you could let the user to login into your application with their Google Apps Account by implementing Google's AuthSub or OpenID authentication mechanism. As you're asking for the openid library, I guess you chose openid. If you want to use openid to authenticate, you should pay your attention to Google's custom discovery method which is not in the standard library. Check my answer in the other question I answered for more information.

I just uploaded my patched version of python-openid-2.2.4 to github. Here is the link: http://github.com/adieu/python-openid/

BTW: you don't really have to ask the user to put some file on their server. But if they do so, they could change the default openid authentication backend server.

Maybe I should write a blog post about this problem :)

adieu
Could you provide a more detailed step-by-step howto on implementing this and how it reconciles with http://blog.notdot.net/2010/03/Taking-advantage-of-the-new-Apps-Marketplace esp. placing an openid file on the server etc.
molicule
Please do write a blog post about this and link from here.
Gabriel