wasmCloud / wascc-host

Library for hosting actors and capability providers in a host process
Apache License 2.0
201 stars 15 forks source link

ways to update binding to the wascc-host #76

Closed amar123deep closed 4 years ago

amar123deep commented 4 years ago

Is there a way to update binding to the wascc-host without restarting it? For example, one case could be to subscribe to a new topic. In case there is way to dynamically reset the topic, then we don't need to restart the host, but just update the host with a new manifest file.

autodidaddict commented 4 years ago

There is currently no way to modify an existing binding. I'm very wary of enabling this kind of behavior. I am a huge proponent of the idea of the immutable production environment, because a mutable one can, by definition, be mutated by malicious actors. If you could change a binding at runtime without being either the actor or the provider in that scenario, then you could potentially perform all kinds of attacks.

So to implement something like this, we'd have to find a way to secure the "modify binding" operation such that it can only be performed by a suitably authorized entity... and waSCC doesn't currently have the concept of superusers/admins/etc.

I'll do some more thinking on this

autodidaddict commented 4 years ago

I think for now, at least until I can find a concrete use case that requires this, I'm going to avoid allowing in-place modification of bindings because it's a security risk. The workaround for now is to remove the old binding and replace it with the new one containing the new values.