Note: This topic applies to the Kenilworth Release.
To create a Google application, you must have:
|||A Google account|
You can find more information here: https://accounts.google.com/SignUp
|||Downloaded and installed the Google App Engine SDK for Python|
For more information, see https://developers.google.com/appengine/downloads
The steps entailed are as follows:
|||Decide on a unique identifier for your Google application and register it|
|||Create the application|
|||Upload the application and set any exceptions|
At the time of writing, Google™ makes available the following guides and FAQs about working with Google applications:
|||Getting Started Guide: https://developers.google.com/appengine/docs/python/gettingstarted/|
|||Developer’s Guide: https://developers.google.com/appengine/docs/|
As your Google app must have a unique identifier, the first step is to decide what you want to call it and then register it.
To register your Google application, do the following:
|2.||Click Create Application.|
If you have created Google applications before, go to Enter the following information:. If this is the first time, you will be prompted to verify your account.
|3.||Enter your mobile number and click Send.|
|4.||When you receive the authentication code, enter it and click Send.|
Google invites you to complete the application.
|5.||Enter the following information:|
|•||Application Identifier — Enter a unique app ID for your Google app.|
|•||Application Title — Enter a name for the app which will be displayed to app users.|
|•||Authentication Options — Select Restricted to the following Google Apps domain and enter your domain name.|
|6.||Click I accept these terms, and then click Create Application. Google registers your app.|
In order to restrict access to your Google application to members of a particular Google Apps domain, you must add the application ID to your Google Apps account using the Google Apps control panel.
To configure access to your Google app, do the following:
|1.||Browse to https://www.google.com/a/<Your Domain>/SelectServices|
|2.||Enter your application’s unique ID, and click Add it now.|
|3.||When prompted, read and accept the Google App Engine terms and conditions, and click Activate this service.|
How you create your Google app and configure its settings file depends on your environment. Microsoft Windows and Apple Mac users can use the graphical user interface provided with their Google App Engine SDK, or use the command line interface. Linux and other platform users can only use the command line interface (CLI).
To cover all users, the following explain how to write your application, and configure settings using the CLI.
Note: Programming language Python version 2.7 is required.
You must create a directory to store your Google application, and its settings file.
Note: You do not need to use the application’s ID as the directory name, or create it in the
google_appengine directory, but doing so makes it easier to identify and maintain applications.
The next step is to create the your Google application’s configuration file.
Settings for your Google application are stored in the configuration file
app.yaml, located in the <your_app_id> directory. The file specifies runtime configuration, such as, how URL paths are associated with request handles, and static files. It also specifies information about the application code, such as, application ID, and version number.
You can either download an example file from http://smoothwall.com/en-gb/get-support/product-manuals/federated-login-guide, or create your own using a text editor. For an example of the
app.yaml configuration file, see app.yaml.
You must customize the
app.yaml configuration file as follows:
|||Ensure you add the application’s unique ID as:|
|||Ensure you add the application’s version number as:|
|||To only allow authorized users to reach the application, add|
Tip: Indentations are vital in Python scripts. Confirm that the indentations are exactly as they are in the example above.
You must create the authentication script that handles the federated login for the Google App Engine application. The script must be named
main.py, and be located in the <your_app_id> directory. You can either download an example file from http://smoothwall.com/en-gb/get-support/product-manuals/federated-login-guide, or create your own using a text editor. For an example of a
main.py file, see main.py.
The following must be considered:
|||A pre-shared key must be set:|
|||Use a GET request to pass through the parameters:|
|||A check should be made to ensure received data is real, and not modified:|
The md5 hash must consist of
|||A new md5 hash must be generated to allow the Smoothwall to check received data validity|
The md5 hash must consist of
|||Encode the parameters to send:|
|||Send parameters as:|
u = user’s email address
o = target URL
d = user data
f = new Federated Login hash