ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 14th, 2006, 09:45 AM
chasAFD chasAFD is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Austin, Texas, USA
Posts: 4 chasAFD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 8 m 19 sec
Reputation Power: 0
Cool Scheduled tasks won't run when authentication turned on

Scheduled tasks have run fine for years. Now I need access to #cgi.auth_user# variable so I turned off anonymous login in IIS for the cf projects directory. Now my scheduled tasks won't run. Can I put something in the username/password fields in the schedule task form so they'll authenticate? The folder is set for "Integrated windows authentication".

Thanks for your help

Reply With Quote
  #2  
Old September 14th, 2006, 10:50 AM
kiteless kiteless is offline
Moderator
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 5,091 kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 2 h 53 m 27 sec
Reputation Power: 966
Not that I know of. If you've set it to integrated windows authentication (NTLM), not only will CF not be able to log in but no one not using Windows or IE will be able to log in. If you change the security to the "plain text" option then these problems should go away. Basically, NTLM authentication is a Windows-only protocol.

Reply With Quote
  #3  
Old September 14th, 2006, 11:46 AM
chasAFD chasAFD is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Austin, Texas, USA
Posts: 4 chasAFD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 8 m 19 sec
Reputation Power: 0
Quote:
Originally Posted by kiteless
Not that I know of. If you've set it to integrated windows authentication (NTLM), not only will CF not be able to log in but no one not using Windows or IE will be able to log in. If you change the security to the "plain text" option then these problems should go away. Basically, NTLM authentication is a Windows-only protocol.


Thanks for the info. Sorry I didn't mention this is on an Intranet where all users are in the same domain and all use IE. What's the danger in using "plain text" option in this type of environment?

Reply With Quote
  #4  
Old September 14th, 2006, 02:16 PM
kiteless kiteless is offline
Moderator
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 5,091 kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 2 h 53 m 27 sec
Reputation Power: 966
Nothing that I can see, and if you are worried about it you can use SSL, which encrypts everything (even the plain text uw/password).

Reply With Quote
  #5  
Old September 15th, 2006, 08:59 AM
chasAFD chasAFD is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Austin, Texas, USA
Posts: 4 chasAFD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 8 m 19 sec
Reputation Power: 0
I'm thinking my best solution is to put the scheduled task scripts into a separate folder on the server. Then I can leave anonymous access ON for that folder so CF can execute them, but require authentication on the CF applications that users run.

Reply With Quote
  #6  
Old September 15th, 2006, 01:26 PM
Ebot's Avatar
Ebot Ebot is offline
Meatball Surgeon
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 2004
Location: Elbow deep in code
Posts: 2,056 Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)  Folding Points: 87885 Folding Title: Advanced FolderFolding Points: 87885 Folding Title: Advanced FolderFolding Points: 87885 Folding Title: Advanced FolderFolding Points: 87885 Folding Title: Advanced FolderFolding Points: 87885 Folding Title: Advanced Folder
Time spent in forums: 2 Weeks 3 Days 7 h 58 m 28 sec
Reputation Power: 1319
As an FYI. I find that i can't run any pages as a scheduled job if that file is secured with SSL. I did the same as you plan, i just made a generic folder for scheduled jobs only.

Reply With Quote
  #7  
Old September 26th, 2006, 02:21 PM
kiteless kiteless is offline
Moderator
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 5,091 kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 2 h 53 m 27 sec
Reputation Power: 966
Did you try specifying port 443 as the port? I believe you should be able to use SSL (even if the certificate is not a pubic cert). Some more info here:

http://www.adobe.com/cfusion/knowle...fusion_9987e902

Reply With Quote
  #8  
Old September 27th, 2006, 11:11 AM
vlakbbo vlakbbo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Posts: 3 vlakbbo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 27 sec
Reputation Power: 0
I'm just throwing this on top of my head here but anything the <cfntauthenticate> could do since you're using "Integrated Windows authentication"?

Reply With Quote
  #9  
Old September 27th, 2006, 03:33 PM
kiteless kiteless is offline
Moderator
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 5,091 kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 2 h 53 m 27 sec
Reputation Power: 966
No, that tag just checks the user name and password and returns group names, etc. It won't actually maintain an authenticated connection.

Reply With Quote
  #10  
Old September 28th, 2006, 08:12 AM
Ebot's Avatar
Ebot Ebot is offline
Meatball Surgeon
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 2004
Location: Elbow deep in code
Posts: 2,056 Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)Ebot User rank is General 5th Grade (Above 100000 Reputation Level)  Folding Points: 87885 Folding Title: Advanced FolderFolding Points: 87885 Folding Title: Advanced FolderFolding Points: 87885 Folding Title: Advanced FolderFolding Points: 87885 Folding Title: Advanced FolderFolding Points: 87885 Folding Title: Advanced Folder
Time spent in forums: 2 Weeks 3 Days 7 h 58 m 28 sec
Reputation Power: 1319
Stating the port didn't help either, I tried to call a file 6 ways to sunday, and the only way i could get it to work was outside of an ssl dir.

Reply With Quote
  #11  
Old September 28th, 2006, 10:58 AM
kiteless kiteless is offline
Moderator
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 5,091 kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 2 h 53 m 27 sec
Reputation Power: 966
I haven't had to do this so I'm not sure how to make it work, but from my Google searches it appears that it is definitely possible. Anyway, if you're fine just using a non-SSL directory that's probably the easiest choice for now.

Reply With Quote
  #12  
Old September 30th, 2006, 09:33 PM
usachrisk usachrisk is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 23 usachrisk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 4 m 21 sec
Reputation Power: 0
To the original post, ColdFusion wont authenticate to IIS. I have a folder setup for my tasks that I leave unprotected. But if any user came across them somehow, it wouldn't be any risk that they ran them independently of CF. This may not be the case for all projects.

If you need a little more protection on these files before they're run, you could do something like look at the user agent to see who is running the task, ColdFusion runs them as CFSCHEDULE, so it's easy to test for (but not difficult to hack). If you want to authenticate for everyone but CFSCHEDULE, take peek at this post - you can force users with any other string to authenticate with IIS: http://www.coldfusionusers.com/cfbl...mous-access-on/

You might also do something like look at the URL params and pass some secret key in CFADMIN that only you know, and have them abort if the key isn't run (something like mytask.cfm?oktorun=wham, and have the task verify url.oktorun = 'wham').

Reply With Quote
  #13  
Old May 31st, 2012, 02:51 PM
bwyckoff bwyckoff is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 1 bwyckoff User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 21 sec
Reputation Power: 0
You may want to try:

For IIS only:

I have an application that uses windows authentication, and faced the same problem. I think building on what most others here have posted - you have your answer (if acceptable by your network security requirements).

Try the following - works fine for me:

1) Store any scheduled task cfm files in a common directory on your server or within your application.

2) In IIS - navigate to the specific directory where your task cfm files are stored and enable basic authentication. (ONLY FOR THIS DIRECTORY)

3) When you create your scheduled tasks - specify a UN and PW in the arguments. (A good practice would be to create an account which only CF would use for this purpose. This is generally a local account on your web server with minimal access to anything but select areas of your webroot.) IIS basic authentication will accept the UN and PW and allow you access.

If you are using SSL when you (with basic authentication it's kind of a must) you have to be sure that you have installed the certificate for your web server in CF using 'keytool'. There are a number of threads out there that explain how to do this, so I won't go into it here, but that might be your ticket.

The ultimate goal here is to leverage automated tasks and still keep your attack surface small. If you enable basic authentication and use SSL to run your HTTPRequests to your tasks, you should be able to get what you want without being exposed.

Hope that helps!!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Scheduled tasks won't run when authentication turned on

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap