Google Apps Integration (Pro)

Version 576.2 by Silvia Macovei on 2020/04/15 15:07

Google Apps Integration (Pro)

This extension allows to connect Google Apps to XWiki

googleapps.png
CategoryApplication
Active Installs42
Rating
0 Votes
LicenseGNU Lesser General Public License 2.1
SourcesIssues
Table of contents

The Google Apps Integration allows you to integrate XWiki with Google's editing application (Google Docs, Spreadsheet, Presentations and Drawing). Thanks to this application it is possible to:

  • log in to XWiki using your Google account
  • easily import a Google Apps document as an attachment in XWiki (in multiple formats)
  • launch editing of an XWiki attachment in Google Apps. Once the editing session is finished you can reimport it in XWiki.

This integration uses the OAuth2 protocol to connect Google Apps with XWiki. It works with individual Google accounts as well as company wide Google Apps accounts.

To activate Google Apps you need to register for OAuth access on Google.com and insert your domain name and key in the settings from the XWki Administration. To see how you can register for OAuth access please read the dedicated section in the Installation instructions.

Once you have properly configured the application, you will be able to log in with your Google credentials and see the feature in the Attachments section of XWiki pages. You can either click on the edit link next to each attachment or use the Import from Google Apps button.

GoogleLogin.png

googleapps.png

You can also use the drive macro to insert (embed) a Google Document in your page.

DriveMacro.png

searchfordocument.png

External Resources

FAQ

How to sync the XWiki profile with the Google Account information?

On the Administration section, the "Permissions to request" options allow the user to specify which information will be copied from the Google Account to the XWiki profile upon login.
PermissionsToRequest.png

For the example below the first name, last name, email and user image were imported from the Google Account.
GoogleApps_profile.png

How to embed a document using the drive macro?

Once you have added the {{drive/}} macro to the wiki pages, you can search for the document to embed inside the Drive:
DriveMacroSearch.png

Upon click on the link "embed this document" the selected document will be included on the page.
EmbeddedDoc.png

How to import a document?

The "Import from Google Apps" feature is available on the "Attachments" tab.
ImportFirstStep.png

The user can search for the document inside his drive.
SearchDocumentToImport.png

Upon click on the desired format. the document will be added as an attachment to the page. PDF in the selected format in the example below.
ImportedFromGoogleApps.png

How to restrict the domain of the users allowed to login to the Wiki?

On the Google Apps Integration Configuration section the domain of the users allowed to login can be restricted by filling in the field XWiki Login Behaviour>Domain. For example, when using xwiki.com only emails like user@xwiki.com will be allowed.
GoogleApps-RestrictDomain.png

Users outside the domain will be informed as below:
GoogleApps-DomainMessage.png

Limitation: The app does not work if you "Prevent unregistered users from viewing pages, regardless of the page rights"

Checking the global-rights checkbox "Prevent unregistered users from viewing pages, regardless of the page rights" prevents Google Apps Login from working.

We recommend only preventing the access to guests as a workaround until the issue is fixed.

The following screenshots display the "Global Administration: Rights" indicate for both:

  • Users - this is where the access to Unregistered Users needs to be denied, as seen below. The checkbox "Prevent unregistered users from viewing pages, regardless of the page rights" will not be checked.
    UsersRights.png
  • Groups
    GroupsRights.png

Installation Steps

This paid extensions requires XWiki 11.10 or above. In order to install the extension, follow the next steps inside your XWiki instance (on cloud or on premise).

Navigate to the Extension Manager

In the Applications Panel click on "More Applications..." and then "Install new applications...". Alternatively navigate directly to the Administration and select the "Extensions" section.

step1.png

Install the Extension

Search for the extension you wish to install and use the Install button to install it.

step2.png

Get a License

Navigate to the "Licenses" section of the Administration, fill your details, look for the extension you just installed in the live table and click the buttons to get a trial license or to buy a license.

step3.png

Install the License

If you have selected a trial license then you're good and there's nothing else to do. Your trial license is automatically installed.

However if you've selected to buy a license you'll be redirected to a page to perform the payment. At the end you need to come back to the "Licenses" administration section and click on the "Check for Updates" button. This will download and apply the license you bought.

Use the Extension

Start using the Extension! Refer to the extension's documentation to know how to use it.

Installing Paid Apps on Subwikis

If you want to install an application on the whole farm (main wiki + subwikis), you can do so directly from the main wiki’s Extension Manager, as seen below:

step4.png

Extensions can also be installed only on a particular subwiki by global admins. Subwiki admins will not be able to install these extensions due to their limited rights.

Register for OAuth access

Create a Google project for your app

Go to https://console.developers.google.com/ (see also https://developers.google.com/identity/protocols/OAuth2?hl=en). Create a Google project for your app as shown below:

CreateGoogleProject.png

Enable the People API

Moving forward, you will need to Enable the Google People API. This API is needed to access the Google account information. To enable it go back to the dashboard and click on ENABLE APIS AND SERVICES, search for Google People API and click ENABLE

AddPeopleAPI.png

Enable the Google Drive API

This API is needed to access Google documents. Similarly, to enable it go back to the dashboard and click on ENABLE APIS AND SERVICES, search for Google Drive API and click ENABLE

GoogleDriveAPI.png

Generate the Google Client ID and Secret

In order to start using the integration, the Google Client ID and Secret will need to be generated and added to the Google Apps Configuration page.

Open the project and go to Credentials > OAuth consent screen

CredentialsOAuth.png

Set up the OAuth client inside the Google project by filling in the following fields:

  • Application name
  • Authorized domains
  • Application Homepage link
  • Application Privacy Policy link

CredentialsOAuth2.png

Note Google does not accept localhost for these fields. This tutorial uses the alias apps.xwiki.com. Depending on your OS you will need to also update the hosts file to which you should add the following IP/Alias pair: your IP   your Application Homepage link (e.g. 127.0.0.1   apps.xwiki.com).

After setting up the OAuth client go back to Credentials and click on Create credentials > Create OAuth client ID.

CreateCredentials

Select "Web Application" and fill in the name and the Authorized redirect URI. The Authorized redirect URI needs to end with GoogleApps/Oauth. Make sure you hit enter after filling in the Authorized redirect URI, otherwise the value will not be saved. Then click the Create button. 

ClientIDWebApplication

A popup will appear with the Client ID and Client Secret. 

IDSecret.png

Next you will need to update the Client ID  and Secret inside the XWiki Administration from the Google Apps Integration Configuration section.

GoogleApps-Administration-XWiki.png

Activate the Google Authentication

Finally, to activate the Groovy Authentication you need to update the following settings in the xwiki.cfg file (webapps > xwiki > WEB-INF) and restart the wiki:

xwiki.authentication.authclass=com.xpn.xwiki.user.impl.xwiki.GroovyAuthServiceImpl
xwiki.authentication.groovy.pagename=xwiki:GoogleApps.AuthService

If you are an XWiki Cloud user you do not have direct access to this file. You will need to contact the XWiki Support team to perform this change for you.

Warning: If you have the Active Directory Application installed, the Google Apps integration will not work. The reason is that this application overwrites the configured authenticator. To try out the Google Apps integration you will need to uninstall the "Active Directory Authenticator" extension. Note that uninstalling only the "Active Directory Application" is not enough because the authenticator is a dependency of the application and the Extension Manager doesn't uninstall the dependencies when you uninstall the application. You may also need to clear the cookies associated to the domain used by your XWiki instance, then try again to sign in with Google.

Options

The price is per year and varies depending on the support level and the number of users.

Support / Users 10 25 50 100 250 500 1000 2500 5000 10000 20000
Silver
Google Apps Integration (Pro) is part of the XWiki Pro package. Purchasing this package you will benefit from more extensions at a better price. Check the full offer in XWiki Pro! The Google Apps Integration (Pro) can be purchased individually only via online order (credit card payment), following the “How to Buy” procedure described below. The application is part of the XWiki Pro package, which can be purchased through manual order (bank transfer payment) by contacting sales@xwiki.com.

Benefits

What do you get when you purchase an XWiki extension?

1 year license

By purchasing an XWiki extension license, you'll benefit from it during one year.

Free updates

You benefit from all the extension updates during one year. You are always up to date.

Support included

If you are facing an issue, you can reach the XWiki support. Our team is always available to help.

How to Buy

To buy, install this extension from inside your XWiki instance and follow the instructions.

Release notes

v2.4.5

Bugs fixed:
#43 GoogleApps breaks if getURL results to absolute URLs.

v2.4.4

Bugs fixed:
#37 Restrict domain for users to login doesn't work.

v2.4.3

Bugs fixed:
#33 Legacy People API needs to be activated.

v2.4.2

Update the Licensing dependency to version 1.14.3.

v2.4.1

Bugs fixed:
#26 Can't install Google Apps.

v2.4

Bugs fixed:
#16 Can't access any document from the Drive while using a "http" instance.
#22 Google Apps Integration shouldn't appear in Navigation on 8.4.5.

Improvements:
#13 Automatically import user photo from google account.
#18 Incomplete localization.
#19 Warn if the authenticator is not configured.

Update the Licensing dependency to version 1.14.3.

Updated translations:

  • French

v2.3.5

Update the Licensing dependency to version 1.13.2.

v2.3.4

Bugs fixed:
#4 Fix the google links from the Administration section.
#9 Extension's homepage description contains a broken link to Google Apps admin section.

Update the Licensing dependency to version 1.13.1.

v2.3.3

Update the Licensing dependency to version 1.13.

v2.3.2

Update the Licensing dependency to version 1.12.2.

v2.3.1

Update the Licensing dependency to version 1.12.1.

v2.3

Improve the message displayed when there is no valid license.
Update the Licensing dependency to version 1.8.

v2.2

Initial paid version.

Extension details

This information is only displayed to Administrators. Your users can't see this tab.

License

  • GNU Lesser General Public License 2.1

Sources

Issues

Type

  • xar

Developed by

Compatibility

  • Requires XWiki 8.4 or above.

Installable with the Extension Manager

Dependencies

  • com.xwiki.licensing:application-licensing-licensor-api 1.14.4
  • com.google.api-client:google-api-client 1.23.0
  • com.google.gdata:core 1.47.1
  • com.google.apis:google-api-services-people v1-rev443-1.23.0
  • com.google.apis:google-api-services-drive v2-rev358-1.23.0
XWiki SAS Copyright © 2024