Secure controller to compute communication using HTTP basic authentication

This commit is contained in:
grossmj
2021-11-18 18:37:10 +10:30
parent 55e50dae4b
commit 38388f7ae5
24 changed files with 483 additions and 416 deletions

View File

@ -119,6 +119,7 @@ class Compute:
"""
Set authentication parameters
"""
if user is None or len(user.strip()) == 0:
self._user = None
self._password = None
@ -468,6 +469,8 @@ class Compute:
# FIXME: slow down number of compute events
self._controller.notification.controller_emit("compute.updated", self.asdict())
else:
if action == "log.error":
log.error(event.pop("message"))
await self._controller.notification.dispatch(
action, event, project_id=project_id, compute_id=self.id
)