Skip to content

Commit

Permalink
mgr/deepsea: always use 'password' parameter for salt-api auth
Browse files Browse the repository at this point in the history
Prior to saltstack/salt@71d5601507, the
salt-api expected the password to be sent using the 'sharedsecret'
parameter if using shared secrets, and the 'password' parameter
for other authentication types.  The above commit unifies this so
that we always only need to use the 'password' parameter.

Signed-off-by: Tim Serong <[email protected]>
  • Loading branch information
tserong committed Mar 12, 2019
1 parent cca5bd5 commit 56880b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pybind/mgr/deepsea/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def _do_request(self, method, path="", data=None, stream=False):
def _login(self):
resp = self._do_request('POST', 'login', data = {
"eauth": self.get_module_option('salt_api_eauth'),
"sharedsecret" if self.get_module_option('salt_api_eauth') == 'sharedsecret' else 'password': self.get_module_option('salt_api_password'),
"password": self.get_module_option('salt_api_password'),
"username": self.get_module_option('salt_api_username')
})
self._token = resp.json()['return'][0]['token']
Expand Down

0 comments on commit 56880b7

Please sign in to comment.