diff --git a/src/cloud/common/CloudAuth.rb b/src/cloud/common/CloudAuth.rb index 3dfbab8246..a6c720c8b7 100644 --- a/src/cloud/common/CloudAuth.rb +++ b/src/cloud/common/CloudAuth.rb @@ -86,7 +86,7 @@ class CloudAuth @token_expiration_time end - def get_password(username) + def get_password(username, non_public_user=false) token = @server_auth.login_token(expiration_time) @oneadmin_client ||= OpenNebula::Client.new(token, @conf[:one_xmlrpc]) @@ -99,6 +99,12 @@ class CloudAuth end end - return @user_pool["USER[NAME=\"#{username}\"]/PASSWORD"] + if non_public_user == true + xp="USER[NAME=\"#{username}\" and AUTH_DRIVER!=\"public\"]/PASSWORD" + else + xp="USER[NAME=\"#{username}\"]/PASSWORD" + end + + return @user_pool[xp] end end \ No newline at end of file diff --git a/src/cloud/common/CloudAuth/SunstoneCloudAuth.rb b/src/cloud/common/CloudAuth/SunstoneCloudAuth.rb index 9122e78b63..9fa855b1d0 100644 --- a/src/cloud/common/CloudAuth/SunstoneCloudAuth.rb +++ b/src/cloud/common/CloudAuth/SunstoneCloudAuth.rb @@ -21,7 +21,7 @@ module SunstoneCloudAuth if auth.provided? && auth.basic? username, password = auth.credentials - one_pass = get_password(username) + one_pass = get_password(username, true) if one_pass && one_pass == Digest::SHA1.hexdigest(password) return username diff --git a/src/cloud/ec2/lib/econe-server.rb b/src/cloud/ec2/lib/econe-server.rb index 63b1d12461..c115bad093 100644 --- a/src/cloud/ec2/lib/econe-server.rb +++ b/src/cloud/ec2/lib/econe-server.rb @@ -28,7 +28,7 @@ else RUBY_LIB_LOCATION = ONE_LOCATION+"/lib/ruby" CONFIGURATION_FILE = ONE_LOCATION+"/etc/econe.conf" TEMPLATE_LOCATION = ONE_LOCATION+"/etc/ec2query_templates" - EC2_AUTH = ONE_LOCATION + "/etc/one/auth/ec2_auth" + EC2_AUTH = ONE_LOCATION + "/etc/auth/ec2_auth" end VIEWS_LOCATION = RUBY_LIB_LOCATION + "/cloud/econe/views" diff --git a/src/cloud/occi/lib/occi-server.rb b/src/cloud/occi/lib/occi-server.rb index 69a6b9207c..36545793e9 100755 --- a/src/cloud/occi/lib/occi-server.rb +++ b/src/cloud/occi/lib/occi-server.rb @@ -33,7 +33,7 @@ else RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" TEMPLATE_LOCATION=ONE_LOCATION+"/etc/occi_templates" CONFIGURATION_FILE = ONE_LOCATION+"/etc/occi-server.conf" - OCCI_AUTH = ONE_LOCATION + "/etc/one/auth/occi_auth" + OCCI_AUTH = ONE_LOCATION + "/etc/auth/occi_auth" end $: << RUBY_LIB_LOCATION diff --git a/src/sunstone/sunstone-server.rb b/src/sunstone/sunstone-server.rb index 8c4d113286..631c90fbb4 100755 --- a/src/sunstone/sunstone-server.rb +++ b/src/sunstone/sunstone-server.rb @@ -32,7 +32,7 @@ else RUBY_LIB_LOCATION = ONE_LOCATION+"/lib/ruby" CONFIGURATION_FILE = ONE_LOCATION+"/etc/sunstone-server.conf" PLUGIN_CONFIGURATION_FILE = ONE_LOCATION+"/etc/sunstone-plugins.yaml" - SUNSTONE_AUTH = ONE_LOCATION + "/etc/one/auth/sunstone_auth" + SUNSTONE_AUTH = ONE_LOCATION + "/etc/auth/sunstone_auth" end SUNSTONE_ROOT_DIR = File.dirname(__FILE__)