mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
bug #847: Auth drivers are set in OpenNebula core. Login tokens do not include the driver, so the hash logic needs update, see #911
This commit is contained in:
1 parent
7683ba8998
commit
cbf64ecf1b
12 files changed
+141
-59
No files matched your search
@@ -161,10 +161,12 @@ class OneUserHelper < OpenNebulaHelper::OneHelper
|
||||
str_h1="%-80s"
|
||||
|
||||
CLIHelper.print_header(str_h1 % "USER #{user['ID']} INFORMATION")
|
||||
puts str % ["ID", user.id.to_s]
|
||||
puts str % ["NAME", user.name]
|
||||
puts str % ["GROUP", user.gid]
|
||||
puts str % ["PASSWORD", user['PASSWORD']]
|
||||
puts str % ["ID", user.id.to_s]
|
||||
puts str % ["NAME", user.name]
|
||||
puts str % ["GROUP", user.gid]
|
||||
puts str % ["PASSWORD", user['PASSWORD']]
|
||||
puts str % ["AUTH_DRIVER", user['AUTH_DRIVER']]
|
||||
|
||||
puts str % ["ENABLED",
|
||||
OpenNebulaHelper.boolean_to_str(user['ENABLED'])]
|
||||
|
||||
|
||||
+11
-2
@@ -105,7 +105,15 @@ cmd=CommandParser::CmdParser.new(ARGV) do
|
||||
:description => "Token duration in seconds, defaults to 3600 (1 h)"
|
||||
}
|
||||
|
||||
create_options = [READ_FILE, PLAIN, SSH, X509, KEY, CERT]
|
||||
DRIVER={
|
||||
:name => "driver",
|
||||
:short => "-d driver_name",
|
||||
:large => "--driver driver_name",
|
||||
:format => String,
|
||||
:description => "Authentication driver to be used with this user"
|
||||
}
|
||||
|
||||
create_options = [READ_FILE, PLAIN, SSH, X509, KEY, CERT, DRIVER]
|
||||
login_options = [SSH, X509, X509_PROXY, KEY, CERT, PROXY, TIME]
|
||||
|
||||
########################################################################
|
||||
@@ -159,7 +167,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do
|
||||
end
|
||||
|
||||
helper.create_resource(options) do |user|
|
||||
user.allocate(args[0], pass)
|
||||
driver = options[:driver] || OpenNebula::User::CORE_AUTH
|
||||
user.allocate(args[0], pass, driver)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user