How do I correctly authorize a message in the ES when it comes from the SC or MC? Putting the SID into the message envelope isn’t safe: a low-privileged user could hand-craft the command with an admin SID, since the SID can be obtained by iterating over the users in the configuration.
So I wonder what the correct way is to get the SID from the real sender in order to perform the SecurityAccess.CheckPermission check.
With map/alarm actions this is clear, the TriggerCommand arrives with the sender as a Kind.User FQID that has the SID, but with normal MIP messaging I don’t get that. And I can’t trust the sender argument of PostMessage(message, destination, sender) either, because the client sets it itself, so anyone could just pass an admin FQID there.
Thanks!