Open jroper opened 4 years ago
I really liked this suggestion @jroper
@jroper Are there any prior art we can look at for this feature?
I think this should be included in the PR https://github.com/cloudstateio/cloudstate/pull/353
@viktorklang Not that I've been able to find.
Let's say you have an event handler:
Now, these methods you expect to be invoked by the event log, but Cloudstate will allow anything to invoke them via gRPC, allowing any service to effectively inject events that didn't come from the event log. This is obviously not desirable, and in fact in some contexts would be a major security concern. We need to provide a way to make these methods effectively private, my suggestion is that we do this by introducing an Access Control List (ACL) mechanism.
To start with, ACLs may just be used to mark methods as private as not, but in future, we could use them to inject opaque token based authentication, and JWT based authentication and authorization, and other mechanisms eg TLS principal assertions etc. That's way out of scope for now, but the point is, we want to build a mechanism that would be flexible enough to support this in future should we add those features.
Here's an example of what this could look like:
For future compatibility, here's an example of what we might do for implementing JWT based authorization using claims on entity keys: