Securing a web service

S

Scott McChesney

Folks -

We are running around and around here on a project we're developing, and I'm
getting to the point that I don't know what I do and don't know. So I need
some assistance.

We are developing a web service that connects to an external LDAP server to
validate a username/password that the user enters from a login page. Right
now, we're concerned about interaction with an ASP.NET website, but this web
service will also be used by some ColdFusion (and possibly other non-MS)
clients as well. I should point out now that we're running on Windows 2000
(SP4) and Windows XP Pro (SP2) workstations to test (with local IIS
installed), and this will probably be initially deployed to a W2K server,
but eventually this should end up on a W2K3 server. We're also on .NET 1.1
and VS2K3.

Because of the way our LDAP server is configured, we are able to connect and
retrieve information when the web service is running under anonymous access
(and the standard IUSR account) on IIS. However, because of the way we were
thinking the service was going to be used, we included some public-key RSA
encryption of the password in our service, and a method for the client to
retrieve the key from the web service. This is where everything went to
pot...

No matter how hard we try, we cannot get the RSA encryption (set up to use a
MachineKey store) to run under anonymous access. We have been setting
rights for IUSR to all the folders we can think of, and nothing works. We
tried creating a local-machine account, granting that the appropriate
rights, and changing the anonymous-access User ID to that account - nothing.
Eventually, I found that it appears that without appropriate credentials for
the web service, user rights don't make a difference. Since anonymous
access doesn't appear to pass credentials, the rights of the service account
user don't seem to matter.

Then, I read an MSDN article about security for ASP.NET web services, and it
said that if we expect our web service to be used by non-MS toolkits (which
we do), the best method for security is SSL and Basic Authentication on IIS.
I've never used Basic authentication, and I'm not a huge fan of it, but it
does seem to work. It also forces us to pass credentials every time we call
anything in the web service - even opening the project in VS.

One of my developers is swearing that the RSA encryption won't work over
SSL, though I don't understand why. Either way, using SSL kinda makes the
RSA encryption moot anyway (right?), though I don't think it will hurt.

Bottom line: what is the "best" way to set up this web service? We don't
have to use SSL, and I'm pretty sure that ColdFusion supports SOAP and web
services well enough that they should have little problem working with the
web service, no matter how we set it up. We don't want to make the users
pass credentials, but it's not the end of the world if that's how it has to
be. More importantly, we don't want to have to manage a bunch of
local-machine accounts just for this, and creating a single local-machine
account and giving that username/password to the world doesn't seem very
secure. If we could get this to work under anonymous access, however, then
the specific account makes much more sense...

We are not using WSE, and I don't know whether we can or not. Either way,
we may not have time - we've got to get this worked out ASAP. Any help
would be appreciated.

TIA

- Scott
 
M

Mujtaba Syed

Then, I read an MSDN article about security for ASP.NET web services, and it
said that if we expect our web service to be used by non-MS toolkits (which
we do), the best method for security is SSL and Basic Authentication on
IIS.

If there are N users, Basic Auth will need you to create N windows a/c on
your server. Obviously this gets cumbersome when N increases.
IMO, the best way is to use custom SOAP header auth.

Mujtaba.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top