From 32b8d4262edc2ba9535660c9680b5fe6148492ea Mon Sep 17 00:00:00 2001 From: Hyun Woo Kim Date: Tue, 28 Oct 2014 15:29:45 +0100 Subject: [PATCH] Add support for proxy certificates to X509 Cloud Auth --- src/cloud/common/CloudAuth/X509CloudAuth.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cloud/common/CloudAuth/X509CloudAuth.rb b/src/cloud/common/CloudAuth/X509CloudAuth.rb index e58f26acc2..0a2191ca81 100644 --- a/src/cloud/common/CloudAuth/X509CloudAuth.rb +++ b/src/cloud/common/CloudAuth/X509CloudAuth.rb @@ -34,8 +34,12 @@ module X509CloudAuth end # Password should be DN with whitespace removed. - username = get_username( - OpenNebula::X509Auth.escape_dn(cert.subject.to_s)) + username = get_username(OpenNebula::X509Auth.escape_dn( + cert.subject.to_s)) + + # For proxy certificates look at the issuer + username = get_username(OpenNebula::X509Auth.escape_dn( + cert.issuer.to_s)) if username.nil? return username if username