Init an Auth instance :param dict opts: Options for this server :return: Auth instance :rtype: Auth
(self, opts, io_loop=None)
| 1791 | |
| 1792 | # an init for the singleton instance to call |
| 1793 | def __singleton_init__(self, opts, io_loop=None): |
| 1794 | """ |
| 1795 | Init an Auth instance |
| 1796 | |
| 1797 | :param dict opts: Options for this server |
| 1798 | :return: Auth instance |
| 1799 | :rtype: Auth |
| 1800 | """ |
| 1801 | self.opts = opts |
| 1802 | self.cache = salt.cache.Cache(opts, driver=opts["keys.cache_driver"]) |
| 1803 | self.token = salt.utils.stringutils.to_bytes(Crypticle.generate_key_string()) |
| 1804 | self.pub_path = os.path.join(self.opts["pki_dir"], "minion.pub") |
| 1805 | self.rsa_path = os.path.join(self.opts["pki_dir"], "minion.pem") |
| 1806 | self._private_key = None |
| 1807 | self._creds = None |
| 1808 | if "syndic_master" in self.opts: |
| 1809 | self.mpub = "syndic_master.pub" |
| 1810 | elif "alert_master" in self.opts: |
| 1811 | self.mpub = "monitor_master.pub" |
| 1812 | else: |
| 1813 | self.mpub = "minion_master.pub" |
| 1814 | if not os.path.isfile(self.pub_path): |
| 1815 | self.get_keys() |
| 1816 | |
| 1817 | @property |
| 1818 | def creds(self): |
no test coverage detected