ctually, neither Apache nor IIS natively implement the feature you are
talking about.
Apache uses addon modules to implement the functionality and the
configuration is in .htaccess. The author of those modules happen to just
give away the source code for free, so it frequently comes bundled with
Apache.
Many 3rd party vendors have also implemented addon modules for IIS to
implement the functionality with various configuration choices. Their
modules need to be purchased.
I have not found a freely available module to do this on IIS. On IIS6, we
have sample code illustrating other concepts that do about 90% of the work,
but no one has released a free add on module to lookup username/password
securely from a database/file. Even after I posted sample code modification
showing how to lookup username/password from a file with exact lines of code
to change/insert.
FYI: the protection mechanism you are asking for is not terribly secure.
Namely, there is no real user-identity in the underlying OS; you rely on the
Web Server to implement a check to control access. If anyone else happens to
compromise the Web Server, they instantly have access to the resources you
are trying to protect
Meanwhile, using real user identities in the filesystem (something IIS
natively supports), you rely on someone actually authenticating correctly to
control access. If anyone else happens to compromise the Web Server, they do
not have access to this protected content since they did not compromise the
real user identity -- only the web server's identity. On a server like IIS6
where the web server's identity is unprivileged, the server remains secured
even if a worker process gets compromised.
This is the fundamental difference between the two approaches.
Regarding your problem statement:
Basic authentication passes username/password over the network in clear
text, so it is not secure and is counter to your desire to "protect" the
directory.
Furthermore, I do not understand why you need authentication for a "secure
software update directory". I presume users will be downloading their
patches from this "secure software update directory". Why do users even need
to authenticate? You want them to be able to download patches, right? Or is
your program unsecured, so access to this "secure software update directory"
is equivalent to free download to your (possibly licensed) software program,
so you need to control who can access this directory.
--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Fred Hebert" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
I am trying to implement a secure software update directory. My
application checks for and retrieves updates via http from a directory on
our web server. All this works fine, but there is no security. I want to
protect the directory so that any http request will require basic
authentication.
I have done this before at another company that used an Apache server, and
all that was required was creating a .htaccess file that authenticated
users in a SQL database.
The new company uses IIS, and our webmaster does not know how to accomplish
this functionality. He does have ASP protected pages, but they are
protected via a query in the ASP code. In my case I want to protect all
files in the directory, which are mostly binary files. We already have a