All Apps and Add-ons

Google Apps for Splunk and OAuth2: How to set up proper authentication?

cmutt78
Explorer

I am trying to get Google Apps for Splunk functioning, but am a bit confused with the authentication method. The instructions in the app don't seem to mesh with Google API credentials. When I generate my credentials I get the following structure:

{
  "private_key_id": "",
  "private_key": "-----BEGIN PRIVATE KEY-----",
  "client_email": "",
  "client_id": "",
  "type": ""
}

...while the app asks for clientid and secret key. What am I missing?

Please advise.

1 Solution

alacercogitatus
SplunkTrust
SplunkTrust

The Google Apps APIs in the case of this app use a Native Client Credential. You do not want API key or Service Account credentials. Create an OAuth 2.0 Client ID in the https://console.developers.google.com interface.

This is the dropdown you should select when adding a new credential in the interface.

alt text

View solution in original post

ppablo
Retired

Hi @cmutt78

Did the answer by @alacercogitatus answer your question? If yes, be sure to click "Accept" directly below his answer. If not, then please comment under his question to provide further information.

0 Karma

cmutt78
Explorer

done, thank you

0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

The Google Apps APIs in the case of this app use a Native Client Credential. You do not want API key or Service Account credentials. Create an OAuth 2.0 Client ID in the https://console.developers.google.com interface.

This is the dropdown you should select when adding a new credential in the interface.

alt text

jaredlaney
Contributor

@cmutt78 - In PKI, the private key can also be called the secret key:

http://searchsecurity.techtarget.com/definition/private-key

The client_id should be more self-explanatory. Also according to Google:

"Public API access: A request that does not provide an OAuth 2.0 token must send an API key. The key identifies your project and provides API access, quota, and reports. The API supports several types of API keys. If the key type that you need does not already exist, create an API key by selecting Create New Key and then selecting the appropriate key type. Then enter the additional data for that key type and click Create."

How that explains it. You might want to look more into PKI in general.

https://developers.google.com/console/help/new/#activatingapis

alacercogitatus
SplunkTrust
SplunkTrust

This is unfortunately not the correct answer. See my answer.

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...