GeezerVison is showing github.com — core: service account auth · Issue #104 · googleapis/google-cloud-python
core: service account auth #104Activityadded this to the This milestone has been deleted milestone on Jul 29, 2014jgeewax commented on Aug 1, 2014 This is functional and you authenticate using the provided .p12 key. silvolu commented on Aug 1, 2014 There has been a recent change on the format of the key, tackled in this bug on the node client.
We might want to do the same for Python, given that now when you create a new service account, the download offered is for the .json file instead of the .p12. tseaver commented on Oct 3, 2014 The 'apiui/credential' page on the developer's console offers both P12 creds (the default) and JSON creds. oauth2client 1.3 cannot process the P12 creds:
File "gcloud/datastore/connection.py", line 56, in _request
method='POST', headers=headers, body=data)
File "/home/tseaver/projects/agendaless/Google/lib/python2.7/site-packages/oauth2client-1.3-py2.7.egg/oauth2client/util.py", line 129, in positional_wrapper
return wrapped(*args, **kwargs)
File "/home/tseaver/projects/agendaless/Google/lib/python2.7/site-packages/oauth2client-1.3-py2.7.egg/oauth2client/client.py", line 515, in new_request
self._refresh(request_orig)
File "/home/tseaver/projects/agendaless/Google/lib/python2.7/site-packages/oauth2client-1.3-py2.7.egg/oauth2client/client.py", line 727, in _refresh
self._do_refresh_request(http_request)
File "/home/tseaver/projects/agendaless/Google/lib/python2.7/site-packages/oauth2client-1.3-py2.7.egg/oauth2client/client.py", line 751, in _do_refresh_request
body = self._generate_refresh_request_body()
File "/home/tseaver/projects/agendaless/Google/lib/python2.7/site-packages/oauth2client-1.3-py2.7.egg/oauth2client/client.py", line 1274, in _generate_refresh_request_body
assertion = self._generate_assertion()
File "/home/tseaver/projects/agendaless/Google/lib/python2.7/site-packages/oauth2client-1.3-py2.7.egg/oauth2client/client.py", line 1401, in _generate_assertion
private_key, self.private_key_password), payload)
File "/home/tseaver/projects/agendaless/Google/lib/python2.7/site-packages/oauth2client-1.3-py2.7.egg/oauth2client/crypt.py", line 238, in from_string
'PKCS12 format is not supported by the PyCrypto library. '
NotImplementedError: PKCS12 format is not supported by the PyCrypto library. Try converting to a "PEM" (openssl pkcs12 -in xxxxx.p12 -nodes -nocerts > privatekey.pem) or using PyOpenSSL if native code is an option.
Converting via the suggested 'openssl' command line does not fix it, either. dhermes commented on Dec 30, 2014 This seems to be working as intended via gcloud.credentials.get_for_service_account_p12.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|