@itentialopensource/adapter-google_drive
Version:
This adapter integrates with system described as: google drive
50 lines (42 loc) • 2.69 kB
Markdown
This document will go through the steps for authenticating the Google Drive adapter with Google Token Security. Properly configuring the properties for an adapter in Itential Platform is critical for getting the adapter online. You can read more about adapter authentication <a href="https://docs.itential.com/opensource/docs/authentication" target="_blank">HERE</a>.
Companies periodically change authentication methods to provide better security. As this happens this section should be updated and contributed/merge back into the adapter repository.
The Google Drive adapter authenticates with Google Token Authentication. You must provide
STEPS
1. Ensure you have access to a Google Drive server and that it is running
2. Follow the steps in the README.md to import the adapter into Itential Platform if you have not already done so
3. Use the properties below for the ```properties.authentication``` field
```json
"authentication": {
"auth_method": "no_authentication",
"service_account": {
"type": "service_account",
"project_id": "",
"private_key_id": "",
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file"
],
"private_key": "-----BEGIN PRIVATE KEY-----\n-----END PRIVATE KEY-----\n",
"client_email": "",
"client_id": "",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": ""
}
}
```
you can leave all of the other properties in the authentication section, they will not be used for Google Drive Google token authentication.
4. Restart the adapter. If your properties were set correctly, the adapter should go online.
- Make sure you copied over the correct Googgle properties as these are used to retrieve the token.
- Turn on debug level logs for the adapter in Itential Platform Admin Essentials.
- Turn on auth_logging for the adapter in Itential Platform Admin Essentials (adapter properties).
- Investigate the logs - in particular:
- The FULL REQUEST log to make sure the proper headers are being sent with the request.
- The FULL BODY log to make sure the payload is accurate.
- The CALL RETURN log to see what the other system is telling us.
- Credentials should be ** masked ** by the adapter so make sure you verify the username and password - including that there are erroneous spaces at the front or end.
- Remember when you are done to turn auth_logging off as you do not want to log credentials.