Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 3 Next »

This document describes how to configure Google Workspace to use with Spacewell Reservation Sync Interface.

1. Scope

This configuration guide is applicable for the Google Workplace setup needed for the integration with Workplace Management.

2. Who is this document for?

  • Google Workspace Administrator who will prepare the Google Suite environment for sync with Reservation Sync Interface.

  • Information Security Official who will review the administrative actions performed on the customer’s side as part of the above role.

3. Pre-requisites - Google Administration

The following steps implement and/or validate few settings in Google Workspace that are required by the Reservation Sync Interface to establish connectivity with Spacewell Workplace

The following steps require administrative access to Google Workspace, ensure your Google account has the necessary access rights.

3.1 Creation of Service account

3.1.1 Create a Project

The Google Cloud console can be accessed via: https://console.cloud.google.com/

In the menu, select IAM & AdminCreate a Project.

image-20240902-082727.png

Fill in a Project name and select a Location. Then press Create.

image-20240902-082940.png

3.1.2 Enable API Access

In the menu, select API’s & ServicesEnabled APIs & Services.

image-20240902-083156.png

Click on + Enable APIs and Services.

image-20240902-083347.png

Search for ‘calendar’ in the search bar and select Google Calendar API.

image-20240902-083533.png

Press on Enable. You should be returned to the Google Calendar API overview screen.

image-20240902-083717.png

Search for ‘admin’ in the search bar and select Admin SDK API.

image-20240902-083829.png

Press on Enable. You should be returned to the Admin SDK API overview screen.

image-20240902-083919.png

3.1.3 Service account creation

In the menu, select Credentials followed by + Create Credentials Service account.

image-20240902-084241.png

Fill in the Service account details and press Create and Continue.

The Service account name will be visible in the Google reservation ‘Created by’ field. Enter the service account name ‘Workplace Management’.

image-20240902-084521.png

Grant access for the created service account. Select the role Owner and press on Continue.

image-20240902-084911.png

Click Done to finish creating service account.

3.1.4 Delegating domain-wide authority to the service account

The Google Admin console can be accessed via: https://admin.google.com/

Select in the main menu Security Access and data controlAPI Controls.

image-20240902-085321.png

In the Domain-wide delegation pane, select Manage Domain-Wide Delegation.

image-20240902-085411.png

Click Add new.

  • In the Client ID field, enter the service account's Client ID. (You can find your service account's client ID in the Service accounts page.)

  • In the OAuth scopes (comma-delimited) field, enter the list of scopes that your application should be granted access to. In our case, application needs domain-wide full access to the Google Directory API and the Google Calendar API.

https://www.googleapis.com/auth/admin.directory.resource.calendar
https://www.googleapis.com/auth/calendar
  • Copy the above scopes and paste in the required field(s).

  • Click Authorise.

Please use below screenshot for reference.

image-20240902-085621.png

Note: Only above two scopes are needed to perform calendar & resource operations. However in order to manage users or domains, the below scopes maybe needed. So add the below only if absolutely required!

https://www.googleapis.com/auth/admin.directory.domain
https://www.googleapis.com/auth/admin.directory.user

Your application now has the authority to make API calls as users in your Workspace domain (to "impersonate" users). When you prepare to make these delegated API calls, you will explicitly specify the user to impersonate. The user to impersonate can be an admin or non-admin with a valid email ID in the current domain (example: random-user@spacewell-test.com).

It is recommended to use Non-Admin account as impersonating user to avoid unauthorized access to irrelevant sections within Google API Management!

It usually takes a few minutes for impersonation access to be granted after the client ID was added, but in some cases, it might take up to 24 hours to propagate to all users of your Google Account.

3.2 Building and Resources

Select in the main menu Directory Buildings and resources → Manage resources

image-20240902-090707.png

3.2.1 Creating Buildings

Select Buildings from the Resource Management dropdown.

image-20240902-090803.png

Click Add building and then fill Name and Floors, then click on Add Building button.

image-20240902-091149.png

3.2.2 Creating Resources

Select Resources from the Resource Management dropdown.

image-20240902-091243.png

Click Add new resource (via the yellow + circle).

image-20240902-091456.png

Enter the Category, Building, Category, Floor and Resource name.

Click Add Resource to confirm the added resource.

image-20240902-091728.png

Add all applicable resources via the above steps.

4. Application access

4.1 Delegate user

Google Workspace doesn’t allow modification of resources' calendar without a valid delegate user. The delegate user is actually a user account with valid email under the same organization in Google Workspace. Any modification to resources' calendars like create, modify or delete reservation shall be done on behalf of this delegate user.

4.1.1 Create a new delegate user

Open the Google Admin console (https://admin.google.com/)

In the menu, select DirectoryUsers.

image-20240910-091325.png

Click Add new user to create a new delegate user.

Enter the First name, Surname, Primary email and the Organizational unit. Automatically generate or enter a Password.

Click Add New User to confirm (blue button in the bottom right corner).

image-20240910-091442.png

Copy the Primary email from this screen. This email address is needed for configuration in a later chapter.

4.1.2 Use an existing delegate user

Open the Google Cloud console (https://console.cloud.google.com/)

In the menu, select DirectoryUsers.

image-20240910-091944.png

Open the desired delegate user and copy the email address from this screen. This email address is needed for configuration in a later chapter.

4.2 Set calendar sharing options

Admins can control how much calendar information is shared with users external to the organization.

Select in the main menu Apps → Google Workspace → Calendar.

image-20240902-092625.png

Select General Settings.

image-20240902-092753.png

Select External Sharing options for Secondary Calendars, then select Share all information, and outsiders can change calendars (modify and create events in the room calendar).

image-20240902-093004.png

Then click Save.

Changes in the external sharing can take up to 24 hours to take affect.

4.3 Share resources to allow delegate user to manage events

4.3.1 Add resources to ‘My calendars' section in Google calendar

Login with the admin user in Google Calendar. The Google Calendar can be accessed via: https://calendar.google.com/

Go to Other calendars+Browse resources.

image-20240902-094056.png

The buildings and resources created in chapter 3.2 Buildings and resources are shown.

Select all applicable resources (per building) which need to be available to be reserved.

image-20240902-094138.png

Selecting all applicable resources will result in the resources being added to the 'My calendars' section. Via here you can allow the service account to manage events for every resource.

4.3.2 Add delegate to resource

Go to the Google Calendar of the admin user and hover over the resource (in the ‘My calendars’ section) → click on the 3 dotsSettings and sharing.

image-20240902-094213.png

Scroll down and go to Share with specific people or groups and click + Add people and groups.

Select the delegate user (chapter 4.1 Delegate user) from the drop-down list and select the permission ‘Make changes to events’ and click Send. The permission of the delegate user is crucial for the impersonation account to manage events on a resources calendar.

image-20240902-094342.pngimage-20240910-095329.png

Please repeat the steps above for all the available/needed resources by sharing the calendar to all Delegate users (impersonate) manually.

If a delegate user is not correctly configured for any resource, the reservation sync for that resource may fail partially or entirely. Therefore, it is essential to ensure that a valid delegate user with appropriate permissions is set up for all necessary resources.

4.4 Generate keys

Open the Google Cloud console (https://console.cloud.google.com/)

In the menu, select IAM & AdminService accounts.

image-20240910-105359.png

Select the service account created in 3.1.3 Service account creation

image-20240910-105552.png

Go to Keys Add keyCreate new key.

image-20240910-105838.png

Select key type JSON and click Create.

image-20240910-110200.png

The JSON file is downloaded to the local machine and the key is displayed in the service account key overview:

image-20240910-115223.png

Please save the downloaded JSON file that contains the key at a safe/secure location.

Losing the key may result in repetition of tasks done in Section 4.3 and Section 4.4

4.5 Share credentials

The above generated key serves as the only copy of the private key. You are responsible for storing it securely. If you lose this key pair, you will need to generate a new one.

Upon completing the above steps, the credentials generated for the project must now be shared securely with Spacewell Integration team which will then be configured in the Reservation Sync interface for automated API access.

The following details must be shared in the given format

Attribute

Value

client_email

 

Secret Expiry Date

 

Email Domains

 

private_key

impersonated user email

impersonated user email - a super user which belongs to your Workspace account

client_email and private_key from section 4.1 above

It is recommended that the key is shared securely. A single-use expirable link can be a good way to share this information.

A secure link can be created via for example: https://onetimesecret.com/?locale=en

  • Enter the Client Secret in the Secret content goes here text box

  • Enter a passphrase

  • Enter a lifetime of the secret link

  • Click on Create a secret link

  • Share the link with Spacewell Integration Team

  • Share the passphrase Spacewell Integration Team

 

Share the secret link, the passphrase and the other information mentioned above and mail it to integration@spacewell.com. Use your organization name and the Application ID in the email subject.

If we find that the link has been already used, we will ask you to delete the secret generated in chapter 4.2 and repeat the process of generating a new client secret.

This is just a recommended approach to securely share credentials. You can alternately follow any other secure information transmission channel of your choice and policy.

  • No labels