I want to restrict the access to a service method to the local message service in ServiceStack v3. I do not want to allow any request from external machines.
I am using the in memory IMessageService
so all pub/sub is being done within the same machine.
I have registered the ServiceController.ExecuteMessage
handler to the dto.
I have tested different configurations but the pub/sub is only working when I use the following attribute:
[Restrict(InternalOnly=true)]
or
[Restrict(AccessTo=EndpointAttributes.LocalSubnet | EndpointAttributes.MessageQueue)]
It does not work when using LocalhostOnly=true
or AccessTo=EndpointAttributes.Localhost
or EndpointAttributes
.
I wonder if this is the expected behaviour. So it is not possible to limit, further, the access to a service that it is going to be executed by the IMessageService
controller?