House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Serving files outside wwwroot (non-url-accessible)

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Barney,
James Reily
04/30/04 01:42 P
This might be of some help to you...
cf-talk
04/30/04 02:14 P
John,
James Reily
04/30/04 03:58 P
James,
cf-talk
04/30/04 04:26 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James Reily
04/30/2004 12:55 PM

I am looking for functionality in IIS that is similar to <cfcontent> in that I can hand back any file the web server has access to, not just ones that are URL-accessible and mapped within IIS.  Basically I want IIS to be able to serve non-URL-accessible files. Does anyone know a way to do this? -James

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Barney Boisvert
04/30/2004 01:04 PM

IIS is a web server, all it does is serve files that are web accessible. Unless you're performing some kind of logic (user authentication, for example) in conjunction with serving the protected content (which IIS can't do), there is no reason not to make it web accessible directly. The best you can do is extend the web accessible content to other directories with virtual mappings (aliases, in Apache-speak).  That will let you map an arbitrary directory on the server to a specific directory path on the URL, thereby adding that directory to your web space, even though it's not in the web root. Cheers, barneyb ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James Reily
04/30/2004 01:42 PM

Barney, Thanks for the quick reply!  Yes, I do have user authentication in place and serve certain files using <cfcontent> only when the user is logged in.  I am looking for a way to accomplish the <cfcontent> part totally within IIS. Perhaps using an ISAPI filter extension? -James

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James Reily
04/30/2004 01:50 PM

... also, in order to protect the files, I don't want to use virtual mappings. -James

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Barney Boisvert
04/30/2004 01:56 PM

You pretty much have to do the user authentication and the checking of credentials before serving the file with the same system (CF in this case). You can get around it in certain situations (like using basic authentication and the CFLOGIN tag), but mostly you cant. You can certainly offload both tasks to IIS, but I'm pretty sure IIS can only secure stuff based on OS user accounts, which may or may not work in your case.  You'd just set up a virtual mapping to that folder, and then on that mapping, disallow anonymous access.  Then users would have to log in before they could get any files from there. However, if you don't want to use a virtual mapping, and the files aren't in your web root, then IIS can't serve them.  End of story.  You'll have to use some kind of plug in (like ColdFusion or ASP) to do it for you. Cheers, barneyb ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
cf-talk
04/30/2004 02:14 PM

This might be of some help to you... http://www.flicks.com -Novak You pretty much have to do the user authentication and the checking of credentials before serving the file with the same system (CF in this case). You can get around it in certain situations (like using basic authentication and the CFLOGIN tag), but mostly you cant. You can certainly offload both tasks to IIS, but I'm pretty sure IIS can only secure stuff based on OS user accounts, which may or may not work in your case.  You'd just set up a virtual mapping to that folder, and then on that mapping, disallow anonymous access.  Then users would have to log in before they could get any files from there. However, if you don't want to use a virtual mapping, and the files aren't in your web root, then IIS can't serve them.  End of story.  You'll have to use some kind of plug in (like ColdFusion or ASP) to do it for you. Cheers, barneyb ----- Excess quoted text cut - see Original Post for more -----   _____  

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
04/30/2004 02:27 PM

> You pretty much have to do the user authentication and the > checking of credentials before serving the file with the same > system (CF in this case). > You can get around it in certain situations (like using basic > authentication and the CFLOGIN tag), but mostly you cant. I'm sure you realize this, but it's worth pointing out that this doesn't really get around IIS authentication, it just makes it easy to integrate IIS authentication with your CF application. > You can certainly offload both tasks to IIS, but I'm pretty > sure IIS can only secure stuff based on OS user accounts, > which may or may not work in your case.  You'd just set up a > virtual mapping to that folder, and then on that mapping, > disallow anonymous access.  Then users would have to log in > before they could get any files from there. By default, this is correct, although there are third-party ISAPI filters which will allow you to authenticate against something other than the operating system itself. CoolFusion has one, I believe. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
04/30/2004 02:30 PM

> Thanks for the quick reply!  Yes, I do have user > authentication in place and serve certain files using > <cfcontent> only when the user is logged in.  I am looking > for a way to accomplish the <cfcontent> part totally within > IIS. Perhaps using an ISAPI filter extension? You could certainly write an ISAPI filter which would do this - basically, it would take requests for a specific URL pattern, and respond to those requests by returning a specific file. However, I'm not sure why you can't just make those files web-accessible, if you're going to do that. If the point is to rely on IIS authentication, you can enable this within the IIS Management Console on a per-directory or even per-file basis. If the point is to avoid IIS authentication and act as the IIS anonymous login user, the ISAPI filter wouldn't add any useful functionality to that process, as it would then take any request, authenticated or not, and respond the same way. Or am I missing something with your question? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James Reily
04/30/2004 03:32 PM

I want to totally avoid IIS authentication.  I'm using my own non-OS username/password authentication method on a separate server which my download server will invoke when a request is made.  Once the request is authenticated successfully, I want to serve the file out of a non-web-accessible folder on the download server.  Thus I can't make the folders web-accessible because they would be open for anyone to download anonymously. No CF service is installed on my download server; so I suppose the solution would be to use an ASP script to send the file as Barney suggests. -James

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Burns, John D
04/30/2004 03:39 PM

But by serving the file out...doesn't that essentially make it web accessible?  You're accessing the file via the web.  That makes it web accessible.  It may not be directly accessible, but it's still accessible. John I want to totally avoid IIS authentication.  I'm using my own non-OS username/password authentication method on a separate server which my download server will invoke when a request is made.  Once the request is authenticated successfully, I want to serve the file out of a non-web-accessible folder on the download server.  Thus I can't make the folders web-accessible because they would be open for anyone to download anonymously. No CF service is installed on my download server; so I suppose the solution would be to use an ASP script to send the file as Barney suggests. -James

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
04/30/2004 03:39 PM

----- Excess quoted text cut - see Original Post for more ----- There are, of course, always alternatives. You might get a third-party ISAPI filter that lets you perform authentication using your own scheme. Or, you could create symbolic links to specific non-web-accessible directories, and destroy those links after some set period of time. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James Reily
04/30/2004 03:58 PM

John, Yes, in effect they are web-accessible -- but only after the user has been authenticated by my auth server. Dave, I was hoping to avoid the link method because of what's involved with the cleanup overhead.  But that's definitely a possibility.  Thanks for the tip. - Really what I'm after is a compact method of serving non-web-accessible files using my own authentication without too much overhead on ther download server.   If I could have done it all in IIS, that would have been nice.  Apparently that doesn't look possible.  But it looks like the ASP method will take very little overhead.  Don't you think? -James

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
cf-talk
04/30/2004 04:26 PM

James, Did you go and take a look at Authentix or WebQuota over on the Flicks Software site?  I've used that in the past without any problems.  Works well... http://www.flicks.com -Novak John, Yes, in effect they are web-accessible -- but only after the user has been authenticated by my auth server. Dave, I was hoping to avoid the link method because of what's involved with the cleanup overhead.  But that's definitely a possibility.  Thanks for the tip. - Really what I'm after is a compact method of serving non-web-accessible files using my own authentication without too much overhead on ther download server.  If I could have done it all in IIS, that would have been nice.  Apparently that doesn't look possible.  But it looks like the ASP method will take very little overhead.  Don't you think? -James   _____  

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
04/30/2004 04:06 PM

> Really what I'm after is a compact method of serving > non-web-accessible files using my own authentication without > too much overhead on ther download server.  If I could have > done it all in IIS, that would have been nice.  Apparently > that doesn't look possible.  But it looks like the ASP method > will take very little overhead.  Don't you think? I suspect it'll take just as much overhead as using CFCONTENT. What are you using as an "auth server"? Why not look into third-party authentication modules? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James Reily
04/30/2004 04:15 PM

Sorry, but I'm not at liberty to talk about the authentication.  I can't use CFCONTENT because CF will not be installed on my download server. Thanks VERY much guys for all of your help!! -James

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Shawn Grover
04/30/2004 04:39 PM

Haven't really been following the thread, but..... Why not set your files into a file outside the wwwroot, but make sure the CF service account has read access to that folder.  Then, you can use cfcontent to push the file to the client, or use cffile to read the file then use the contents to create the output.  Both these methods would allow you to apply your custom authentication first, yet the end user would not be able to navigate directly to the the file. My appologies if this method has been discussed already. Shawn But by serving the file out...doesn't that essentially make it web accessible?  You're accessing the file via the web.  That makes it web accessible.  It may not be directly accessible, but it's still accessible. John I want to totally avoid IIS authentication.  I'm using my own non-OS username/password authentication method on a separate server which my download server will invoke when a request is made.  Once the request is authenticated successfully, I want to serve the file out of a non-web-accessible folder on the download server.  Thus I can't make the folders web-accessible because they would be open for anyone to download anonymously. No CF service is installed on my download server; so I suppose the solution would be to use an ASP script to send the file as Barney suggests. -James   _____  


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference