WorryFree Computers   »   [go: up one dir, main page]

Editor's Note: Jeff Morgan is a Senior Technical Consultant at Appirio, a cloud solution provider which creates products and delivers services . He’s worked with many Google Data APIs, so we’re excited to publish his insights on the various authentication choices.

As developers using the Google Data APIs, one of the first challenges we tackle is learning and sorting through the Google Data authentication schemes. AuthSub, OAuth, ClientLogin, OpenID+OAuth, and so on. Perhaps you may be developing a Google App Engine web application for the first time and want access to a user's Google Calendar. Maybe you are building a data processing application that requires access to a Google user's data. If you are familiar with the Google Data APIs you likely know that there are many authentication options available depending on the API. So how do you decide? The best place to start is the Getting Started with Account Authorization guide. Also, the Authentication in Google Data Protocol page provides detail on the various authentication methods. This post provides references to many existing resources and some additional things to consider to help you decide which authentication method to use for your application.

Does your application need end user permission to access their Google data?

When developing web applications, developers are sometimes faced with deciding between AuthSub or OAuth. However, the first question should be, "Who will be granting permission to the user's Google data?" If the end users are Google Apps users then most likely it will be an administrator granting access. Frequently developers ask the same question in another way, "Should I use 3-legged or 2-legged authentication?" Ideally, from a Google Apps user experience perspective, it is better to use 2-legged OAuth. This way the application is granted access to a user's Google Apps data at the administrator level. The end user can start to use the application and the trust has already been established by an administrator. If you are developing a Marketplace application then it is very likely you will not need to engage in the 3-legged authentication dance.
However, if you are writing an application that is wide open to anyone with a Google account, let the 3-legged dance begin. Both AuthSub and OAuth for Web Applications are designed for this purpose. However, the behavior and look and feel for each is slightly different. Both ultimately allow the user to grant your application access to their data, but knowing the differences helps you make the best choice. Here is an article that covers the topic and should help you choose. It has color coded highlights that compare the two.

Some general rules follow when choosing an authentication method:
End UserAuthentication
Google User (regular)AuthSub or 3-Legged OAuth (3LO)
Googe Apps User (hosted)2-Legged OAuth (2LO)
No end user2LO or ClientLogin


Gadgets

Again there are different options for choosing Google Data authentication from a Gadget container. The first option to consider is OAuth Proxy for Gadgets. OAuth proxy is a 3-legged dance asking the end user for permission to access their data. Once access has been granted then the gadget developer can use the gadgets.io.makeRequest()method to make the Google Data API calls. Most likely you will want the JSON response from the feed so remember to add the ?alt=json URL parameter. For more information and code examples on OAuth Proxy see Writing OAuth Gadgets.

For Marketplace Gadgets another authentication option is available and uses OpenID. This option is used to authenticate the user and determine identity only and it does not provide authorization for API access. After the user is authenticated, server-to-server calls are used to make the requests, authorized via 2-legged OAuth and specifying the xoauth_requestor_id based on the authenticated user from OpenID. For more information on this approach see the Marketplace Best Practices page.


Secure Storage of Credentials

Adding layers of security is a common approach to to making data more secure. Google does provide various layers by providing different authentication and authorization methods. Registering web applications, supporting digital certificates, support for industry standards, (SAML, OAuth, OpenID) all help in providing security. However, one of the most common mistakes we can make is not taking care to protect important credentials. When working with Google Data ClientLogin and 2-legged OAuth, these credentials can be keys to the kingdom (e.g. administrator credentials or domain OAuth consumer secret) and therefore should be protected at all costs. Access to these credentials can potentially open the entire Google Apps domain data for the authorized services. This could have tremendous impact especially if you are maintaining 2-legged OAuth credentials for domains that have granted your application access, e.g. a Marketplace application. Therefore it is risky practice to embed them in source code or even a configuration file. Consider using an approach that allows you to enter credentials at runtime and store in memory or use your favorite method for secure storage of these important credentials.


Google Apps Marketplace

With the March announcement of the Google Apps Marketplace, the decision making process may have become a little easier. OpenID+OAuth and 2-Legged OAuth are the schemes that are supported and likely will be used if your Marketplace application needs access to Google Apps data; which is very likely. You’ll notice that the Marketplace has embraced the open standards of OpenID and OAuth. While AuthSub and ClientLogin are proprietary to Google, they will likely not be useful in your Marketplace application.


ClientLogin

If your application needs to create or make modifications to user accounts (using the Provisioning API) then your only current option is ClientLogin. But a common oversight is to not reuse the access token. Without proper reuse of this token, eventually your application will force the account into a CAPTCHA state which can easily be avoided if the access token is used for subsequent ClientLogin authentication requests. It is best to keep this token cached in memory and renew the token in some configured frequency/timeout.

Summary

This post covered some important considerations for selecting a Google Data authentication method for your application. If you are new to Google Data authentications and want to have a better overall understanding then start with the Getting Started with Account Authorization guide. No matter which approach you choose make sure that accessing users data is done is a secure user friendly way.

References

Google Data authentication is a vast topic. For your convenience here are a list of resources.

Google Data Authentication - Start Here
Getting Started with Account Authorization
Authentication in the Google Data Protocol
OAuth
OAuth in the Google Data Protocol Client Libraries
OAuth for Web Applications
OAuth for Installed Applications
OAuth API Reference
Using OAuth with the Google Data APIs
Google Data API Tips - OAuth
OAuth Playground
OAuth-enabled http test client: oacurl
Gadgets
Authentication for Gadgets
Writing OAuth Gadgets
Fetching Remote Content
Creating a Google Data Gadget
JavaScript client library API reference
Using JSON with Google Data APIs
OAuth Enabled Gadgets on OpenSocial enabled Social Networks
Registration
Registration for Web-Based Applications
OpenID
Federated Login Service for Google Apps
OpenID+OAuth
Sharing and previewing Google Docs in Socialwok: Google Data APIs
Step2 Code Project
OpenID OAuth Extension
ClientLogin
ClientLogin in the Google Data Protocol Client Libraries
ClientLogin for Installed Applications
Google Data API Blog - ClientLogin
AuthSub
AuthSub Authentication for Web Applications
Using AuthSub in the Google Data Protocol JavaScript Client Library
Google Data API Tips - AuthSub
Google I/O
OpenID-based single sign on and OAuth data access for Google Apps

Want to weigh in on this topic? Discuss on Buzz

Editor's Note: This post was written by Zhenya Grinshteyn and Tom Jacobs of Expensify. We invited Expensify to share their experience with the Google Apps Marketplace.

Expensify does expense reports that don't suck by importing expenses and receipts from your credit cards and mobile phones, submitting expense reports through email, and reimbursing online with QuickBooks and direct deposit.

The Foundation: Single Sign-On

We were really excited when Google approached us to be a launch partner for their new Google Apps Marketplace because tons of our customers use Google Apps -- including us! We have long wanted to put an 'Expenses' link up there next to Mail and Documents, and now we had our chance.


To do that, we installed the JanRain PHP OpenID library with the Google Apps Discovery extension. We’d already implemented Gmail OpenID and ironed out the kinks related to having multiple logins to a single account, so implementing this was a very straightforward process.

Lessons Learned

We quickly learned that while single sign-on is awesome, there was a high drop-off rate among admins installing Expensify into their domain. Digging deeper we determined it was due to the setup process being split: part of the setup was done from within Google Apps, but the final part had to be completed by signing in to our site. Not only that, a major part of the setup process was laboriously entering their employee’s emails. We decided to address each in turn by creating a setup wizard and importing the domain’s email list. We approached this change in two major ways:

First, when the Google Apps admin installs the Expensify application, we created a custom configuration step that creates what we call an 'expense policy'. This governs everything from who is part of the company, who can approve expenses, and ultimately who exports to QuickBooks to keep the general ledger in check. Previously this step had to be done after the application was already installed, usually when the admin first signed in. By making this step part of the install process, the entire setup felt much more intuitive and resulted in a higher completion rate.

Second, we used the Zend framework to connect to the Google Apps Provisioning API to fill the new expense policy with a list of all existing employees. This saved a ton of typing and resulted in a vast reduction in the time it took to deploy Expensify to the full company. With everything else in place, the code we used to do this looked something like this:
$oauthOptions = array(
'requestScheme' => Zend_Oauth::REQUEST_SCHEME_HEADER,
'version' => '1.0',
'signatureMethod' => 'HMAC-SHA1',
'consumerKey' => $CONSUMER_KEY,
'consumerSecret' => $CONSUMER_SECRET
);
$consumer = new Zend_Oauth_Consumer($oauthOptions);
$token = new Zend_Oauth_Token_Access();
$httpClient = $token->getHttpClient($oauthOptions);
$service = new Zend_Gdata_Gapps($httpClient, $domain );
$users = $service->retrieveAllUsers();
All of the users’ names and emails are presented in a table of employees that the person installing the app can use to set roles and quickly build an approval tree for all expenses.


Once the setup is completed, we automatically create accounts for all of the selected employees and send out a brief email with tips to get started.

Results: 3.5x more users sign up

Overall it was a fast and painless process, has increased the flow of high-quality leads, and has accelerated their rate of converting into real users. Domain admins now sign up 3.5x more users right away than they have been using the previous two-part setup! Feel free to install our app to see how the setup process works, and respond to this post with questions about your implementation -- we'll try to help out as best we can. And of course if you're still doing your expense reports the old sucky way, please come visit our website (Expensify.com) and we'd be happy to help ease your pain. Thanks for reading, let me know if there's anything I can help clarify!

Want to weigh in on this topic? Discuss on Buzz

Your users likely spend countless hours a week bouncing between their inbox and various business applications. However, they could be even more efficient if the correct information was presented to them and made actionable where they need it the most -- their inbox.

Gmail Contextual Gadgets enable this improved efficiency. As a developer, you need to create a small view of your application as a gadget and register a regular expression in your Google Apps Marketplace manifest file. If an email message in your customer’s mailbox matches the regular expression, your gadget appears below the e-mail and has access to the relevant email content. Contextual gadgets are just one step in helping your users eliminate the days when they need to open a new tab to look up a contact in their CRM system, fill out a time card, find more information out about a prospective customer from their LinkedIn profile or edit a project page. Gadgets on the Marketplace from Solve360, Harvest, Gist and Smartsheet already accomplish these use cases.

These companies and others have been successful in delivering rich features to their users with Gmail Contextual Gadgets. Read what they have to say:

Solve360

“The holy grail of business applications and CRM in particular is to get staff to use them. Integrating valuable processes and best practices within email in such a contextual, non-obstructive way is nothing less than a breakthrough.”
- Steve Ireland, Solve360 President


Smartsheet

“While some tout the virtues of relying less on email, that's a battle many have lost - multiple times. We live in our inboxes, so we should make business apps work inside them. Email is the horse, business apps are the cart.”
- Mark Mader, Smartsheet CEO


Harvest

"So many actions and todos originate from emails. Today, with contextual gadgets, we deliver the user their timesheet so it's incredibly convenient for them to fill out."
- Danny Wen, Harvest Co-founder.



Head over to the Google Enterprise Blog if you want more detail on these applications.

Contextual Gadgets greatly accelerate user adoption by bringing the application directly to the user in context and in their normal work flow. Many great apps fail to gain user traction because they are separated from the normal workflow. Gmail Contextual Gadgets solve that problem for developers, and make it much easier for the end users to see the benefits.

If you think you’re ready to start saving time for the users of your application, then dive right into the Developer’s Guide for Gmail Contextual Gadgets. Since gadgets are based on the OpenSocial gadget specification, they’re developed in the technologies you’re already familiar with -- HTML, JavaScript and CSS. Get started now, and be sure to share what you build!

Want to weigh in on this topic? Discuss on Buzz

We had a great time at the Google Apps Hackathon yesterday in Mountain View. There was a great turnout and lots of interest in doing it again. So, we have planned two more Hackathons in September.

If you want to learn more about Google Apps Script and meet the Apps Script team, here is your chance. We will be holding a Google Apps Script Hackathon in Mountain View, CA, on Thursday September 23rd from 2pm to 8pm.

After we cover the basics of Google Apps Script, you can code along with us as we build a complete script. You can also bring your own ideas and get some help from other hackers and the Apps Script team.

There will be food, drinks, wifi, power, and Apps Script experts available to help you throughout the day. See the event details here, and be sure to RSVP to reserve your slot.

NOTE: We are planning another weekend Hackathon in San Francisco on September 25th and 26th in partnership with the Techcrunch Disrupt conference. Watch this blog for more details.

Want to weigh in on this topic? Discuss on Buzz

SlideRocket launched a few months ago on the Google Apps Marketplace, and has already seen impressive results. Listen to this quote from Chuck Dietrich, SlideRocket CEO.

"We have seen a 500% increase in the number of seats being trialled by businesses since joining the Google Apps Marketplace. In 4 simple clicks, an IT administrator can get all their employees using SlideRocket within Google Apps - saving time and providing employees with a rich, integrated experience."
-Chuck Dietrich, SlideRocket CEO

InformationWeek recently published its picks for the 15 best business apps on Google Apps Marketplace. SlideRocket was first on the list.

InformationWeek says "SlideRocket lets you import presentations from Google or Microsoft PowerPoint or create them right within the program, and then access them from any PC, Mac, or Linux computers. You can add audio and share presentations with your Google Contacts. It also includes analytics for measuring audience engagement."

Integration with Google Apps
- "The new Google Apps Marketplace made it simple to leverage Google's existing set of extensive data API's to take SlideRocket's integration with Google to a new level for the millions of people already using Google Apps. The best part was that we were able to complete our initial integration for the Marketplace in only a few days thanks to the straightforward platform Google has built using various open standards." Chuck Dietrich, SlideRocket CEO.

If you would like to launch your app on Google Apps Marketplace send me an email (dondodge at google) and I will help you get it done. Check out the growing list of business apps at Google Apps Marketplace.


Want to weigh in on this topic? Discuss on Buzz

Our Google Apps Hackathon is just over 1 week away. We put together a site where you can find directions, announcements, and other resources to help you get started. The hackathon is open to all developers interested in integrating with Google Apps, whether or you’re an ISV looking to sell your app in the Google Apps Marketplace, a system integrator or reseller, or use Google Apps for your own business.

Tentative Agenda:
9:45 AM - 10:15 AM : Registration
10:15 AM - 11:00 AM : Opening remarks & overview of Google Apps & Google Apps Marketplace
11:00 AM - 4:00 PM : Open time for coding, asking questions
4:00 - 5:00 PM : Demos & Presentations from attendees
5:00 PM : Closing remarks

We'll also be running a series of short presentations and discussions on various topics starting at 11:00 AM for those interested. Planned topics include:
  • Marketplace APIs
  • OpenID & OAuth
  • Gmail contextual gadgets
  • Administrative APIs
  • Docs APIs
  • Calendar APIs
  • Contacts APIs

There will be plenty of time to try out APIs, ask questions, and get hands-on help from members of the Google team and other local developers. Bring your laptops and come hang out at Google. Lunch and snacks will be served.

When: Tuesday, August 24th from 10AM to 5PM.
Where: Google Campus: 1600 Amphitheatre Pkwy, Mountain View, CA 94043.

If you haven’t yet signed up and would like to attend, you can register here.

Want to weigh in on this topic? Discuss on Buzz

We've just finished pushing one of our most feature-rich Google Apps Script releases ever! So much has been added and improved in this release that it's hard to fit it all in one blog post. I'll run through the highlights, but please make sure to check out the Release Notes for a complete list of changes in this release.

The biggest news is that UiApp is now available to all users! UiApp allows you to build user interfaces, giving scripts the ability to show a friendly interface, which is a necessity for less technical users. We’re very happy to make this formerly Premier feature available to everyone. For more information, see the UiApp code samples and reference documentation.

Next, we've added ScriptProperties and UserProperties. These features allow scripts to store key:value data per user, or per script. ScriptProperties are a great place to store passwords and other script-specific information. UserProperties are useful for storing things like user preferences. For details on using these properties, check out the documentation.

We've added some new functionality to Sites and cleaned up some inconsistencies and bugs. This has greatly simplified the API, while at the same time making it more powerful and flexible. Some of these improvements have required changes to the API, which is documented in the SitesApp reference guide.

Finally, we've updated the Apps Script editor with a bunch of convenient features. You can perform Find & Replace in the editor. Script revisions are now available, so that you can see a history of changes to your scripts. Lastly, we’ve added the ability to change the timezone of a script, something that we hope will make developers’ lives easier.

The remaining items in this release are listed in the Release Notes. We're look forward to hearing your feedback about all the new changes, and would love to see what you do with the new features. Some large improvements and features are in our pipeline, so stay tuned!

Want to weigh in on this topic? Discuss on Buzz

Users love Single Sign-On, but we’ve found the depth and quality of a Marketplace app's integration with Google Apps is a key factor in both the user experience and vendor success in the Marketplace. Deep integration makes users happy, because it helps them avoid entering duplicate data and makes useful information accessible from their day-to-day communication and collaboration tools.

To help you discover ways to integrate your own applications with Google Apps, we added a new section to our developer docs showcasing examples from popular applications in the marketplace. Some examples, like BatchBook’s streamlined sign-up process for users, show simple ways applications can help users get started quicker.


Apps can help users be more productive by displaying information and allowing them to take action right within an e-mail message. Harvest, a time tracking application, allows users to complete their timesheets in gmail when they receive their weekly reminders.


You’ll also find examples for collaboration and document sharing, such as Manymoon’s seamless integration with Google Docs. This makes it easy for users to share information with teams or attach relevant docs to tasks.


You can read more about these and other integrations, or try out the apps yourself by going to the Google Apps Marketplace. Of course these are just a few of many ways to make apps easier for users, and we look forward to seeing even more creative ideas from developers.



P.S. If you want to learn about the APIs which enable these deep integrations, meet with fellow developers and ask questions of Googlers, come to our Google Apps and Apps Marketplace Hackathon at the Google Mountain View campus on August 24th!

What: Google will be holding a hackathon to help you get started integrating with Google Apps and the Google Apps Marketplace! We will be doing short introductions and presentations throughout the day on many of the Apps APIs. There will be plenty of time to try out APIs, ask questions, and get hands-on help from members of the Google team and other local developers. Bring your laptops and come hang out at Google. Food will be provided.

Who: Software developers looking to learn about integrating with Google Apps. Whether you’re a customer integrating with your existing systems, a VAR/SI helping customers integrate or a SaaS software vendor looking to reach the 2 million businesses using Google Apps by selling your integrated app on the Google Apps Marketplace, this event is for you! Of course, if you’re a developer and have already integrated with Google Apps and are just looking to learn more about the latest APIs or meet the Google team and fellow developers, you’re welcome as well!

When: Tuesday, August 24th from 10AM to 5PM.

Where: Google Campus: 1600 Amphitheatre Pkwy, Mountain View, CA 94043. Room to be announced to confirmed attendees.

Sign up here!

If you’re primarily interested in Google Apps Script, we’re having a separate hackathon on September 23rd just for Apps Script. Please see this site for more information.

The Freemium business model is normal for consumer applications, but can it work for enterprise software? Freemium usually means a free service with an "up sell" to paid premium subscriptions. Examples include Skype, LinkedIn, Flickr, Ancestry.com, Typepad, Dropbox, and many others. Freemium differs from Free Trial in that a free trial is the fully functional product but only for a limited time. Freemium is always free, but you can purchase additional features or service for a premium price.

Freemium business models usually involve a Free service, sometimes time limited or feature limited, supported by advertising. The ads rarely cover costs. The goal is to convert these free users to paid subscriptions. Most consumer services start with a $10 per user per month subscription and scale up to $20 or $50 per month based on a small, medium, large usage scale.

Enterprise software is also using the Freemium model, sometimes with higher prices commensurate with the power and functionality of the product. They all have slightly different measurements and cut-off points, but most have some notion of small, medium, large.

Most companies see a 1.5% to 5% conversion rates, with most of them averaging around 3%. That doesn't sound like much but they are reaching tens of thousands to hundreds of thousands of users...sometimes millions.

Here is some math. 100,000 free users convert to 3,000 paid users. If they pay $50 per user per month, that is $150K a month or $1.8M per year. That is an excellent revenue stream for small startups that typically have 3 to 5 employees. And, it is an annuity stream that continues to grow every year. By the 3rd or 4th year these small companies can be generating $5M to $10M a year, still with less than 10 employees. Most of these small companies don't take Venture Capital so they own the whole company. It is a pretty good cash flow business.

Recently at Google IO I moderated an all-star panel of VCs on the subject of Freemium in the enterprise.
Making Freemium work - converting free users to paying customers - Venture Capitalists, Brad Feld (Foundry Group), Dave McClure (500 Startups), Jeff Clavier (SoftTech VC), Matt Holleran (Emergence Capital) and Joe Kraus (Google Ventures) discussed strategies for building free products that can be upgraded to paid versions.

Some key points from the panel;

  • Your initial thoughts about how much customers will pay, and how much they will pay, is probably wrong
  • Start collecting usage statistics from day one, even if you don't have time to analyze them. These stats will help you understand which features customers really use, and what they are likely to pay for.
  • Customers tend to optimize for "least surprise" so they tend to purchase a service level one above what they think they will need. Think cell phone pricing models.
  • Gmail Enterprise is a good example of an enterprise Freemium product based on usage limits. The first 50 users are free, but convert to paid subscription over that.
  • Freemium works best where there is a "network effect" or where more free users contributing content or data makes the service more valuable.
  • Put your business model in beta at the same time you put your product in beta. Test several business model scenarios to see what works best.
  • Consumers don't pay for additional features, turning off advertisements, analytics, etc...but businesses may be very happy to pay for these things
  • Google Apps Marketplace is a great channel to get your product to Google Apps business customers.

Watch the video for more details and insight. This group of VCs has built lots of companies based on the Freemium business model. They have some great insights.