Our system consists of a self-hosted (non-IIS) WCF service and an Asp.net website which hosts a Silverlight application. The application is supposed to do pretty much everything, the website is just a "shell" in this case.
We have a hard time figuring out how to solve user authentication securely.
To my knowledge, Silverlight can not handle windows authentication, does not have any kind of credentials object. The best we can think of, is to authenticate the user when he requests the page, which hosts the app. Then we can pass the user name to the app in its' init parameters.
That way we have a username which can be sent to the wcf service, and can serve as a base for handling roles. The problem is, anyone can call our service without a silverlight client, and pass in a user name. Also, sending unencrypted sensitive data between the WCF service and the Silverlight app is a bad idea. So, my question is:
How to authenticate the client in this scenario securely?