mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-23 17:33:56 +03:00
feature #4411: Change AUTH_DRIVER_CONF to AUTH_MAD_CONF. Added defaults
for AUTH_MAD_CONF
This commit is contained in:
parent
217aa53dd5
commit
d482d967aa
@ -445,7 +445,7 @@ public:
|
||||
const string& driver_name,
|
||||
const VectorAttribute* &value) const
|
||||
{
|
||||
return get_conf_attribute("AUTH_DRIVER_CONF", driver_name, value);
|
||||
return get_conf_attribute("AUTH_MAD_CONF", driver_name, value);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -133,6 +133,11 @@ private:
|
||||
*/
|
||||
void set_conf_market(const std::string& name,
|
||||
const std::string& required_attrs);
|
||||
/**
|
||||
* Sets a the defaults for a Auth drivers
|
||||
*/
|
||||
void set_conf_auth(const std::string& name,
|
||||
const std::string& change_password);
|
||||
};
|
||||
|
||||
|
||||
|
@ -1003,44 +1003,44 @@ MARKET_MAD_CONF = [
|
||||
#*******************************************************************************
|
||||
# Authentication Driver Behavior Definition
|
||||
#*******************************************************************************
|
||||
# The configuration for each driver is defined in AUTH_DRIVER_CONF. These
|
||||
# The configuration for each driver is defined in AUTH_MAD_CONF. These
|
||||
# values must not be modified since they define the driver behavior.
|
||||
# name : name of the auth driver
|
||||
# password_change : allow the end users to change their own password. Oneadmin
|
||||
# can still change other user's passwords
|
||||
#*******************************************************************************
|
||||
|
||||
AUTH_DRIVER_CONF = [
|
||||
AUTH_MAD_CONF = [
|
||||
NAME = "core",
|
||||
PASSWORD_CHANGE = "YES"
|
||||
]
|
||||
|
||||
AUTH_DRIVER_CONF = [
|
||||
AUTH_MAD_CONF = [
|
||||
NAME = "public",
|
||||
PASSWORD_CHANGE = "NO"
|
||||
]
|
||||
|
||||
AUTH_DRIVER_CONF = [
|
||||
AUTH_MAD_CONF = [
|
||||
NAME = "ssh",
|
||||
PASSWORD_CHANGE = "YES"
|
||||
]
|
||||
|
||||
AUTH_DRIVER_CONF = [
|
||||
AUTH_MAD_CONF = [
|
||||
NAME = "x509",
|
||||
PASSWORD_CHANGE = "NO"
|
||||
]
|
||||
|
||||
AUTH_DRIVER_CONF = [
|
||||
AUTH_MAD_CONF = [
|
||||
NAME = "ldap",
|
||||
PASSWORD_CHANGE = "YES"
|
||||
]
|
||||
|
||||
AUTH_DRIVER_CONF = [
|
||||
AUTH_MAD_CONF = [
|
||||
NAME = "server_cipher",
|
||||
PASSWORD_CHANGE = "NO"
|
||||
]
|
||||
|
||||
AUTH_DRIVER_CONF = [
|
||||
AUTH_MAD_CONF = [
|
||||
NAME = "server_x509",
|
||||
PASSWORD_CHANGE = "NO"
|
||||
]
|
||||
|
@ -153,6 +153,28 @@ void OpenNebulaTemplate::set_multiple_conf_default()
|
||||
set_conf_market("s3", "ACCESS_KEY_ID,SECRET_ACCESS_KEY,REGION,BUCKET");
|
||||
|
||||
register_multiple_conf_default("MARKET_MAD_CONF");
|
||||
/*
|
||||
#*******************************************************************************
|
||||
# Auth Manager Configuration
|
||||
#*******************************************************************************
|
||||
# core
|
||||
# public
|
||||
# ssh
|
||||
# x509
|
||||
# ldap
|
||||
# server_cipher
|
||||
# server_x509
|
||||
#******
|
||||
*/
|
||||
set_conf_auth("core", "YES");
|
||||
set_conf_auth("public", "NO");
|
||||
set_conf_auth("ssh", "YES");
|
||||
set_conf_auth("x509", "NO");
|
||||
set_conf_auth("ldap", "YES");
|
||||
set_conf_auth("server_cipher", "NO");
|
||||
set_conf_auth("server_x509", "NO");
|
||||
|
||||
register_multiple_conf_default("AUTH_MAD_CONF");
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
@ -289,6 +311,22 @@ void OpenNebulaTemplate::set_conf_market(const std::string& name,
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
void OpenNebulaTemplate::set_conf_auth(const std::string& name,
|
||||
const std::string& password_change)
|
||||
{
|
||||
VectorAttribute * vattribute;
|
||||
std::map<std::string,std::string> vvalue;
|
||||
|
||||
vvalue.insert(make_pair("NAME", name));
|
||||
vvalue.insert(make_pair("PASSWORD_CHANGE", password_change));
|
||||
|
||||
vattribute = new VectorAttribute("AUTH_MAD_CONF", vvalue);
|
||||
conf_default.insert(make_pair(vattribute->name(), vattribute));
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
void OpenNebulaTemplate::set_conf_default()
|
||||
{
|
||||
VectorAttribute * vattribute;
|
||||
|
Loading…
Reference in New Issue
Block a user