Kinetic Bridgehub Adapter Google Admin
This adapter is used to make bridge calls to the Google admin api endpoints.
Google Admin Bridge Information
Configuration Values
Name |
Description |
Service Account Email |
an account that belongs to your application instead of to an individual end user |
Authorization Type |
Select P12 File or Private Key |
Private Key |
Instructions for getting the private key are below |
P12 File Location |
The path to the P12 File |
Impersonated User Email |
The email of the user that the request will be impersonating |
Domain |
The Google domain associated to the service account |
Example Configuration
Supported Structures
Name |
Description |
Users |
Search for a users |
Fields
Fields that will be returned with the record. If no fields are provided then no fields will be returned. For a list of valid fields visit Google Admin API.
Qualification (Query)
ex: name:'joe'. Visit Google Admin API v1 for additional query options.
Google project setup
Setting up a Google API Project is required. To complete all of the Google project setup steps the user should have Google super admin privileges. The ability to access the Google developer console is required to create the project. Adding domain wide delegation to the service account requires super users privileges.
Create project
- Go to the Google API Console.
- Click Create project
- Enter a name
- Select an organization (if applicable)
- Click Create
Add Service Account to project
A Service account is required for the adapter configuration.
- Open the API Console Dashboard and ensure the newly created project is selected from the top navigation bar.
- Click on Credentials the left side to bring up the credentials page.
- Click + CREATE CREDENTIALS button near the top of the screen.
- Choose Service Account from the dropdown.
- Give the account a name.
- An email for the Service Account is generated. This will be a configuration value for the Plugin later.
- Add a description (optional)
- Click CREATE.
- Click DONE.
- Once the DONE button is clicked you will be redirect to the Service Account table. Continue to Create access key.
Create access key
The adapter has two methods for adding access credentials; P12 file or Private key. The Private Key is generated from the P12 file
- From the Service Account table select the service account to add a key to.
- The Service Account table can be found on the credentials page.
- On the Grant users access to this service account screen
- Scroll down to the Keys key section.
- Click ADD KEY.
- Choose Create new key from the options.
- Choose P12 as the key type and click CREATE.
- This will download a P12 file to your local machine. Store the Private key password in a secure location.
- To configure the bridge adapter to use the P12 file, access to the file system that the Agent is running on is required.
- If you don't have access to the Agent's file system the the P12 file needs to be converted to a Private Key.
Extract Private Key from P12 file
Not all machines are capable of running these commands. Access to the openssl command (which includes OSX and most versions of Linux by default) is required.
- In the terminal run
openssl pkcs12 -info -in INFILE.p12 -nodes -nocerts
command.
- Copy the Private Key to config (Do not edit)
- The Private Key will be used in the configuration of the adapter.
- Below is an example of a successful extraction of the Private Key.
Enable API access for project
- Open the API Console Dashboard and ensure the newly created project is selected from the top navigation bar.
- Click + ENABLE APIS AND SERVICES button near the top of the screen.
- Search for ADMIN SDK and select it from the list.
- Click on the ENABLE button.
Give Service Account Domain-Wide Delegation
Set Delegate domain-wide authority to your service account.
- Open the API Console Credentials
- Select the Service Account from the table to get to the Grant users access to this service account screen.
- Copy the Unique ID. This is used in step 8.
- Go to your domain's Admin Console.
- Open the Admin Console API Controls (hamburger) Main menu > Security > API controls.
- In the Domain wide delegation pane, select Manage Domain Wide Delegation.
- Click Add new.
- In the Client ID field, enter the client ID copied from step 3.
- In the OAuth Scopes field add
https://www.googleapis.com/auth/admin.directory.user
.
Notes
- The adapter is not currently setup to use JSON keys.
- All of the steps above are referencing Google API console. These steps could also be done in a similar way using the Google Cloud Platform consoles.
- It is important to keep the key's tags.
Private Key Example:
-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkw8gSlAgEAAoIBAQCZ7VJdnuZR2w5P
...
TP62zYhLwBIKTVg9+3VQQmc1Lw==
-----END PRIVATE KEY-----