How to secure my wcf service with AWS authentication

Can I protect my WCF service with AWS authentication. I am trying to figure this out by searching google and finding articles about calling a service that is already protected using AWS authentication. Not an article on how to provide WCF using AWS. Is it not possible, my understanding of AWS authentication and the wrong signing. Please provide me with an article to get you started.

+7
authentication c # authorization amazon-web-services wcf
source share
1 answer

I'm going to assume that you intend to create a WCF REST service that uses an HMAC-based authentication scheme , such as Amazon S3 .

A way to implement this is to create your own WebServiceHost and override ApplyConfiguration . In this method, you install the new ServiceAuthorizationManager .

 this.Authorization.ServiceAuthorizationManager = new MyServiceAuthorizationManager(); 

Derive the MyServiceAuthorizationManager class from the WCF ServiceAuthorizationManager and override the CheckAccessCore method.

 class MyServiceAuthorizationManager : ServiceAuthorizationManager { protected override bool CheckAccessCore(OperationContext operationContext) { // check the validity of the HMAC // return true if valid, false otherwise; return IsValidHMAC(WebOperationContext.Current); } } 

For more information on the implementation of the algorithm, see this answer .

+1
source share

All Articles