You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2016/11/09 22:52:03 UTC
[1/3] libcloud git commit: google: Prevent GCE auth to hide S3 auth
Repository: libcloud
Updated Branches:
refs/heads/trunk 095db8bfd -> a58a6e5fa
google: Prevent GCE auth to hide S3 auth
GoogleAuthType._is_gce() is going to return True on any GCE instance,
but if there are S3 credentials, they should be used.
Closes #921
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/8bedf247
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/8bedf247
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/8bedf247
Branch: refs/heads/trunk
Commit: 8bedf2472401186ca1038719a0cdd66155f833f5
Parents: 3b515f4
Author: Quentin Pradet <qu...@clustree.com>
Authored: Fri Oct 21 16:46:11 2016 +0400
Committer: Anthony Shaw <an...@apache.org>
Committed: Thu Nov 10 09:46:34 2016 +1100
----------------------------------------------------------------------
libcloud/common/google.py | 4 ++--
libcloud/test/common/test_google.py | 13 ++++++++-----
2 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/8bedf247/libcloud/common/google.py
----------------------------------------------------------------------
diff --git a/libcloud/common/google.py b/libcloud/common/google.py
index 52577b8..39d94e4 100644
--- a/libcloud/common/google.py
+++ b/libcloud/common/google.py
@@ -583,10 +583,10 @@ class GoogleAuthType(object):
def guess_type(cls, user_id):
if cls._is_sa(user_id):
return cls.SA
- elif cls._is_gce():
- return cls.GCE
elif cls._is_gcs_s3(user_id):
return cls.GCS_S3
+ elif cls._is_gce():
+ return cls.GCE
else:
return cls.IA
http://git-wip-us.apache.org/repos/asf/libcloud/blob/8bedf247/libcloud/test/common/test_google.py
----------------------------------------------------------------------
diff --git a/libcloud/test/common/test_google.py b/libcloud/test/common/test_google.py
index 2266ddd..1977dab 100644
--- a/libcloud/test/common/test_google.py
+++ b/libcloud/test/common/test_google.py
@@ -223,16 +223,19 @@ class GoogleInstalledAppAuthConnectionTest(GoogleTestCase):
class GoogleAuthTypeTest(GoogleTestCase):
def test_guess(self):
- self.assertEqual(GoogleAuthType.guess_type(GCE_PARAMS[0]),
- GoogleAuthType.SA)
self.assertEqual(GoogleAuthType.guess_type(GCE_PARAMS_IA[0]),
GoogleAuthType.IA)
with mock.patch.object(GoogleAuthType, '_is_gce', return_value=True):
+ # Since _is_gce currently depends on the environment, not on
+ # parameters, other auths should override GCE. It does not make
+ # sense for IA auth to happen on GCE, which is why it's left out.
+ self.assertEqual(GoogleAuthType.guess_type(GCE_PARAMS[0]),
+ GoogleAuthType.SA)
+ self.assertEqual(
+ GoogleAuthType.guess_type(GCS_S3_PARAMS[0]),
+ GoogleAuthType.GCS_S3)
self.assertEqual(GoogleAuthType.guess_type(GCE_PARAMS_GCE[0]),
GoogleAuthType.GCE)
- self.assertEqual(
- GoogleAuthType.guess_type(GCS_S3_PARAMS[0]),
- GoogleAuthType.GCS_S3)
class GoogleOAuth2CredentialTest(GoogleTestCase):
[3/3] libcloud git commit: Merge branch 'trunk' of
https://git-wip-us.apache.org/repos/asf/libcloud into trunk
Posted by an...@apache.org.
Merge branch 'trunk' of https://git-wip-us.apache.org/repos/asf/libcloud into trunk
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/a58a6e5f
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/a58a6e5f
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/a58a6e5f
Branch: refs/heads/trunk
Commit: a58a6e5faa1b30e9057b72a02b3ea19f5e680d74
Parents: 822305c 095db8b
Author: Anthony Shaw <an...@apache.org>
Authored: Thu Nov 10 09:51:51 2016 +1100
Committer: Anthony Shaw <an...@apache.org>
Committed: Thu Nov 10 09:51:51 2016 +1100
----------------------------------------------------------------------
CHANGES.rst | 4 ++++
libcloud/compute/drivers/gce.py | 20 +++++++++++---------
2 files changed, 15 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/a58a6e5f/CHANGES.rst
----------------------------------------------------------------------
diff --cc CHANGES.rst
index e575563,0f1a24e..014f656
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@@ -8,10 -8,10 +8,14 @@@ Changes in current version of Apache Li
Compute
~~~~~~~
+- [google] Prevent GCE auth to hide S3 auth
+ (GITHUB-921)
+ [Quentin Pradet]
+
+ - [google compute] List images fix for projects > 500 images.
+ (GITHUB-939)
+ [Scott Crunkleton]
+
- [ec2] Add st1 and sc1 volume types to valid types
(GITHUB-925)
[Sean Goller]
[2/3] libcloud git commit: changes for #921
Posted by an...@apache.org.
changes for #921
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/822305c4
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/822305c4
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/822305c4
Branch: refs/heads/trunk
Commit: 822305c4e71eae9f71aedfdb3499d84ce7f9eb5b
Parents: 8bedf24
Author: Anthony Shaw <an...@apache.org>
Authored: Thu Nov 10 09:47:45 2016 +1100
Committer: Anthony Shaw <an...@apache.org>
Committed: Thu Nov 10 09:47:45 2016 +1100
----------------------------------------------------------------------
CHANGES.rst | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/822305c4/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 7d0f290..e575563 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -8,6 +8,10 @@ Changes in current version of Apache Libcloud
Compute
~~~~~~~
+- [google] Prevent GCE auth to hide S3 auth
+ (GITHUB-921)
+ [Quentin Pradet]
+
- [ec2] Add st1 and sc1 volume types to valid types
(GITHUB-925)
[Sean Goller]