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