Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 1881

Set up a Web service with basic authentication and LocalService calls

$
0
0

Hi,

Is it possible to configure a web service so that you need basic authentication but it allows the "NT AUTHORITY\LocalService" account too? It's an MVC application deployed on a IIS 8.5, all the site's authentication is basic (already working) and its located in 'Default web site/app/WebServices/ws.asmx'. 

I've tried writing a powershell (v4) script retrieving my credentials:

$Username = "user"$Password = "password" | ConvertTo-SecureString -AsPlainText -Force$Url = "http://localhost/app/WebServices/ws.asmx"$UserCreds =  New-Object System.Management.Automation.PSCredential($Username, $Password)$proxy = New-WebServiceProxy -Uri $url -Credential $UserCreds$response = $proxy.Method("Param")

Is there a way to do the same but allowing "NT AUTHORITY\LocalService" account to call only the web service? Then I think I could get its credentials with this code and use them instead of mine:

$Username = "NT AUTHORITY\LocalService"$Password = "anything" | ConvertTo-SecureString -AsPlainText -Force

I can't remove basic authentication though.

Thanks


Viewing all articles
Browse latest Browse all 1881

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>