0

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?

Scott
  • 21,211
  • 8
  • 65
  • 72
jruizaranguren
  • 12,679
  • 7
  • 55
  • 73
  • Maybe try creating a custom request filter? – iamruss Apr 30 '14 at 12:02
  • A custom pre-request filter could be used to customize access, although I prefer to used builtin functionality whenever I can. I just can't find a reason why message services require Subnet permission. – jruizaranguren Apr 30 '14 at 20:00

0 Answers0