All Apps and Add-ons

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

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

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

Community Manager
Community Manager

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

Explorer

done, thank you

0 Karma

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

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

SplunkTrust
SplunkTrust

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

0 Karma