Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add system tests for service account credentials #51

Merged
merged 2 commits into from
Oct 25, 2016

Conversation

theacodes
Copy link
Contributor

@theacodes theacodes commented Oct 25, 2016

Resolves #42

@theacodes theacodes added this to the 1.0.0 milestone Oct 25, 2016
@theacodes
Copy link
Contributor Author

Hrm. No idea why the certificate verification is failing. I'm gonna poke around and see what's up.


def verify_environment():
"""Checks to make sure that requisite data files are available."""
if not os.path.exists(DATA_DIR):

This comment was marked as spam.

This comment was marked as spam.

assert info['email'] == credentials._service_account_email
assert info['scope'] == (
'https://www.googleapis.com/auth/userinfo.email '
'https://www.googleapis.com/auth/userinfo.profile')

This comment was marked as spam.

This comment was marked as spam.

@theacodes
Copy link
Contributor Author

Holy old OpenSSL version, batman!

OpenSSL 1.0.1 14 Mar 2012

@theacodes
Copy link
Contributor Author

@dhermes I'm not sure what to do here other than disable HTTPS for the system tests. :(

@dhermes
Copy link
Contributor

dhermes commented Oct 25, 2016

@jonparrott We've never had issues with HTTPS on Travis.

@theacodes
Copy link
Contributor Author

@dhermes using httplib2? mild shock

httplib2 doesn't do SNI verification at all. Urllib3 is choking because google uses SNI extensively and since the openssl version is too low to include SNI support, it prefers to raise an SSL error instead of just continuing the request.

@theacodes
Copy link
Contributor Author

theacodes commented Oct 25, 2016

Some research:

With our Python runtime (debian8) using both certifi.where() and OS certs work with SNI. (This is what we do by default in _make_default_http)

With Travis (Ubuntu 12.04 LTS) using certifi.old_where() works but generates an InsecurePlatformWarning. Using OS certs works but generates an SNIMissingWarning. Using OS certs with PyOpenSSL works without warnings.

@dhermes
Copy link
Contributor

dhermes commented Oct 25, 2016

Ha, should've guessed it.

@dhermes
Copy link
Contributor

dhermes commented Oct 25, 2016

LGTM (in light of #52)

@theacodes theacodes merged commit 447c5be into master Oct 25, 2016
@theacodes theacodes deleted the service-account-system-tests branch October 25, 2016 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants