All Apps and Add-ons

Compatible with Splunk_TA_google-cloudplatform ?

jypyking
Explorer

Hi,

I've installed this add-on on a HF that also have the Splunk_TA_google-cloudplatform add-on. For some reason it looks like this IA is trying to use the oauth2client lib from the Splunk_TA_google-cloudplatform instead of the one from its own folder and fail.
I tried adding the _init_.py file in "/opt/splunk/etc/apps/IA-GSuiteForSplunk/bin" but it doesn't change anything.
Any clue ?
Thanks.

Traceback (most recent call last):
File "/opt/splunk/bin/rest_handler.py", line 79, in
print splunk.rest.dispatch(**params)
File "/opt/splunk/lib/python2.7/site-packages/splunk/rest/init.py", line 149, in dispatch
module = import('splunk.rest.external.%s' % parts[0], None, None, parts[0])
File "/opt/splunk/etc/apps/IA-GSuiteForSplunk/bin/ga_authorize.py", line 14, in
from oauth2client.client import OAuth2WebServerFlow
File "/opt/splunk/etc/apps/Splunk_TA_google-cloudplatform/bin/oauth2client/client.py", line 46, in
from oauth2client import util
ImportError: cannot import name util

0 Karma
1 Solution

alacercogitatus
SplunkTrust
SplunkTrust

Due to App Precedence, Splunk will pull the library from the first path location it finds. This is an issue with the way core Splunk implements the framework. A solution could be to see if Splunk_TA_googlecloudplatform works with the oauth2client that ships with G Suite, and replace the Splunk one. You can also move the util folder from Splunk_TA_gcp and stick it in the GSuite/bin folder so that the import works correctly.

View solution in original post

0 Karma

jypyking
Explorer

Thanks! Actually copying the util.py file from the cloudplatform app to the Gsuite app fixed it 🙂

0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

Due to App Precedence, Splunk will pull the library from the first path location it finds. This is an issue with the way core Splunk implements the framework. A solution could be to see if Splunk_TA_googlecloudplatform works with the oauth2client that ships with G Suite, and replace the Splunk one. You can also move the util folder from Splunk_TA_gcp and stick it in the GSuite/bin folder so that the import works correctly.

0 Karma
Get Updates on the Splunk Community!

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...