views:

57

answers:

2

Please suggest me the best authentication way to implement in the scenario mentioned below:

The requirement is I have to deploy a WCF web service in multiple countries across the world.

NOTE : All the machines on which the service is deployed are on the same domain.

1.The clients that access this service should fall in the same domain else the authentication should fail.

Currently I am using Message Security mode using "Windows"

+1  A: 

I am curous why you would want the domain to be the same if it needs to be deployed in different countries around the world. Unless you are talking about hosting the service on an internal network that is not publicly exposed, enforcing the same domain name might be difficult. Different countries have different domain standards. America has a much richer set of domain roots to choose from. Other countries often have a country specific root, possibly with a regional subroot.

I would not couple your service to the domain that hosts it, nor would I recommend using the domain as a factor in authentication. If your service needs to be publicly exposed on the internet in each of these countries, I would recommend using something other than Windows security. A Claims-based security mechanism might work best. Internally inside the service implementation, claims can be checked, and if necessary, the windows identity can be authenticated separately from WCF authentication. Claims also allow you to utilize more than just a username/password or certificate to fully authenticate and authorize a client request. You can request the callers domain, country, region, and other evidence be included in the claim, allowing you to verify that calls are being made from the appropriate location and by the appropriate clients with much more flexibility than with Windows authentication (and if you publicly expose your service, Windows authentication will likely not be available anyway.)

jrista
Not disagreeing with what you wrote but it sounds to me like the poster is talking about deploying on a private WAN with servers located around the world and not the internet.
Tuzo
Yes Tuzo is right.. The service is deployed on WAN not on internet
Ashish Ashu
If its on a WAN, then same domain should obviously not be a problem. If the behavior provided by the service requires an authenticated windows account to function, then I would use Windows security. However, if the behavior does not require a windows account, I would look into using some other authentication mechanism, such as certificates. Windows authentication is entirely dependent upon the domain, and can be laggy. Certificates are generally more appropriate for non-human entities who need authentication, and can be managed independently of a domain.
jrista
+1  A: 

Since you are running on an intranet and assuming that your Windows application will connect directly to the service, I would go with Transport Security using Windows authentication.

For some guidance consult patterns & practices Improving Web Services Security Guide.

I still question whether or not you need authorization. If you go with Windows authentication without any authorization it will simplify your service but will allow any domain user to access your service whether or not they are using the Windows application. Granted, they would have to have knowledge of the endpoint and the message structure but it would still be possible for them to do.

If Windows authentication is really all that is required, I would still raise the authorization issue and document it (and get sign off if applicable). On the one hand this covers you but also makes people explicitly aware of the decision and the possible risks.

Tuzo
Thanks Tuzo for your response.. Yes I do authorization through AD.Once I do authentication , I will look the groups in which that user belongs and based on the group , I will set the roles of that particular user. Can you suggest on authorization ??
Ashish Ashu