Valhalla Legends Forums Archive | General Programming | .NET Remoting

AuthorMessageTime
K
I've been playing around with remoting for a while. Now that I've actually started a serious project with it, I've run into something important: How can you implement the shared object so that only the server can trigger certain events?
suppose:
[code]
// ...
public delegate void AdminTriggeredEvent(/* .... */ );

public interface IWellKnownInterface
{
/*
....
*/
event AdminTriggeredEvent AdminEvent;
};
[/code]

Without, for example, using a public / private key encryption to verify the sender of every event (which would be very inefficient), any client could trigger this event.

Thoughts?
November 9, 2003, 10:14 PM
St0rm.iD
Add a parameter with a password or something, and asset false if it's incorrect.
November 9, 2003, 10:20 PM
K
I don't see how that would work. A client could simply copy the password from a previous server event. Besides, I was looking more at some sort of encapsulation or hiding technique, since using a password or encryption scheme would just be wasteful.
November 9, 2003, 10:46 PM
Tuberload
[quote author=K link=board=5;threadid=3510;start=0#msg28350 date=1068418000]
I don't see how that would work. A client could simply copy the password from a previous server event. Besides, I was looking more at some sort of encapsulation or hiding technique, since using a password or encryption scheme would just be wasteful.
[/quote]

I don't know if there is a 100% secure solution to this. A malicious client will always be able to break past nearly any security with the right amount of time and effort.
November 9, 2003, 10:48 PM
K
Right, but in this case the time and effort required would simply be one function call.
November 9, 2003, 11:02 PM
St0rm.iD
So what you're saying is you want to use a friend class?
November 10, 2003, 12:06 AM
K
I'm not sure what you mean by that. The server and client share an instance of an object that implements the IWellKnownInterface (in this case) and inherits from MarshalByRefObject. There is no friend class -- they're the same class.
November 10, 2003, 12:26 AM

Search