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!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...