Getting the logged-in user of a message on the Event Server?

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!

1 Like

The APIs on the Event Server will ensure that the calling user is allowed to make the call (sending the message) but there is unfortunately no way for plug-ins listening for messages to safely do specific authorization checks as the identity of the caller is not passed on.

Ok thanks