From: Ondrej Lichtner olichtne@redhat.com
This adds some basic security parameters that will be used by the lnst-slave and lnst-ctl applications.
On the Controller it's just 2 options: identity - a name that the controller uses to identify to the Slave, Slave stores public keys of controllers with their identification privkey - the path to the private key of the Controller
Both of options are only used in case we're using the pubkey authetication of the Slave.
On the Slave it's these options: auth_types - the accepted authentication types, at this moment it only takes a single value but in the future it will be a list of authentication types provided to Controllers. Possible values are: none, password, pubkey, ssh auth_password - if auth_types == password then this password will be used for authentication privkey - path to the Slaves private key that will be used when auth_types == pubkey ctl_pubkeys - path to directory where the Slave should look for public keys of Controllers when auth_types == pubkey
Signed-off-by: Ondrej Lichtner olichtne@redhat.com --- lnst/Common/Config.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
diff --git a/lnst/Common/Config.py b/lnst/Common/Config.py index de7ba4a..31481b2 100644 --- a/lnst/Common/Config.py +++ b/lnst/Common/Config.py @@ -97,6 +97,18 @@ class Config():
self._options['pools'] = dict()
+ self._options['security'] = dict() + self._options['security']['identity'] = {\ + "value" : "", + "additive" : False, + "action" : self.optionPlain, + "name" : "identity"} + self._options['security']['privkey'] = {\ + "value" : "", + "additive" : False, + "action" : self.optionPath, + "name" : "privkey"} + self.colours_scheme()
def slave_init(self): @@ -132,6 +144,28 @@ class Config(): "action" : self.optionTimeval, "name" : "expiration_period"}
+ self._options['security'] = dict() + self._options['security']['auth_types'] = {\ + "value" : "none", + "additive" : False, + "action" : self.optionPlain, #TODO list?? + "name" : "auth_types"} + self._options['security']['auth_password'] = {\ + "value" : "", + "additive" : False, + "action" : self.optionPlain, + "name" : "auth_password"} + self._options['security']['privkey'] = {\ + "value" : "", + "additive" : False, + "action" : self.optionPath, + "name" : "privkey"} + self._options['security']['ctl_pubkeys'] = {\ + "value" : "", + "additive" : False, + "action" : self.optionPath, + "name" : "ctl_pubkeys"} + self.colours_scheme()
def colours_scheme(self):