@@ -0,0 +1,1169 @@
+'''%0AThe simpleauth module allows for a standalone authentication session to be%0Aopened against the master. This means that the minion can communicate freely%0Awith the master once the minion's public key has been accepted.%0A'''%0A%0A# Import Python libs%0Aimport sys%0A%0A# Import salt libs%0Aimport salt.crypt%0A%0Aclass SAuth(object):%0A    '''%0A    Set up an object to maintain the standalone authentication session with%0A    the salt master%0A    '''%0A    def __init__(self, opts):%0A        self.opts = opts%0A        self.crypticle = self.__authenticate()%0A%0A    def authenticate(self):%0A        '''%0A        Authenticate with the master, this method breaks the functional%0A        pardigmn, it will update the master information from a fresh sign in,%0A        signing in can occur as often as needed to keep up with the revolving%0A        master aes key.%0A        '''%0A        auth = salt.crypt.Auth(self.opts)%0A        creds = auth.sign_in()%0A        if creds == 'retry':%0A            print 'Failed to authenticate with the master, verify that this'%5C%0A                + ' minion%5C's public key has been accepted on the salt master'%0A            sys.exit(2)%0A        return salt.crypt.Crypticle(creds%5B'aes'%5D)%0A

Add simpleauth module