forked from p15670423/monkey
Agent: Add return to get credentials method in Credentials Store
This commit is contained in:
parent
d434c20bcb
commit
ccb0337aef
|
@ -41,6 +41,7 @@ class AggregatingCredentialsStore(ICredentialsStore):
|
||||||
try:
|
try:
|
||||||
propagation_credentials = self._control_channel.get_credentials_for_propagation()
|
propagation_credentials = self._control_channel.get_credentials_for_propagation()
|
||||||
self._aggregate_credentials(propagation_credentials)
|
self._aggregate_credentials(propagation_credentials)
|
||||||
|
return self.stored_credentials
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
self.stored_credentials = {}
|
self.stored_credentials = {}
|
||||||
logger.error(f"Error while attempting to retrieve credentials for propagation: {ex}")
|
logger.error(f"Error while attempting to retrieve credentials for propagation: {ex}")
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import abc
|
import abc
|
||||||
from typing import Iterable
|
from typing import Iterable, Mapping
|
||||||
|
|
||||||
from infection_monkey.i_puppet import Credentials
|
from infection_monkey.i_puppet import Credentials
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ class ICredentialsStore(metaclass=abc.ABCMeta):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def get_credentials(self) -> None:
|
def get_credentials(self) -> Mapping:
|
||||||
"""
|
"""
|
||||||
Method that retrieves credentials from the store
|
Method that retrieves credentials from the store
|
||||||
:return: Credentials that can be used for propagation
|
:return: Credentials that can be used for propagation
|
||||||
|
|
Loading…
Reference in New Issue