You can secure many Adobe ColdFusion resources using password authentication and configure sandbox security.
About ColdFusion security
Security is especially important in web-based applications, such as those you develop in ColdFusion. ColdFusion developers and administrators must fully understand the security risks that could affect their development and runtime environments so they can enable and restrict access appropriately.
Whether you have an e-commerce site where customers enter credit card information or a global collaboration site where users share confidential data, you should understand the security risks that could threaten your web applications.
- Snooping and eavesdropping: Someone can monitor data sent over the public connections of the web.
- User impersonation: Someone can impersonate a trusted user to gain access to information that only the trusted user should see or download.
- Unauthorized access: Unauthorized users can gain access to sensitive information. This security risk is the most complex because the Internet links every computer to one large network. Completely allowing or disallowing access to a given system or data source is relatively straight-forward, but allowing the partial access required for an application to be useful remains risky. For example, a bank can easily publish a public, freely accessible site with general banking information. Creating an account maintenance site where users have exclusive access to their own personal account information is more difficult.
ColdFusion provides a highly secure environment for web application development and deployment. It helps you reduce security risks in the following ways: - Encryption: Use of the Secure Sockets Layer (SSL) protocol prevents snooping, eavesdropping, and message tampering as information passes between clients and servers. SSL, which is supported by most web servers, encrypts Internet protocols (such as HTTP) with public key cryptography. A private key resides on the server to decrypt inbound data and encrypt outbound data.After the key is installed, the web server automatically handles encryption and decryption.
- Authentication: Authentication checks whether someone is a valid system user. It prompts a user for a unique login or user name, and a password or personal identification number (PIN).
- Access Control: Authenticated users have access to particular features or components based on security clearance, group affiliation, or other criteria specified by the developer.
You can implement development security by requiring a password to use the ColdFusion Administrator and a password for Remote Development Services (RDS), which allows developers to develop CFML pages remotely. You implement runtime security in your CFML pages and in the ColdFusion Administrator. ColdFusion has the following runtime security categories: - User security Programmatically determine the logged-in user and allow or disallow restricted functionality based on the roles assigned to that user. For more information about user security, see ColdFusion security features in Securing Applications in the Developing ColdFusion Applications.
Sandbox security Using the ColdFusion Administrator, define the actions and resources that the ColdFusion pages in and below a specified directory can use.
Note: In ColdFusion 11, you can configure multiple security sandboxes irrespective of the edition that you are using. However, for the previous versions (ColdFusion 10 or older), you can configure multiple security sandboxes only when you are using the Enterprise Edition.
The Security area in the Administrator lets you do the following tasks:
- Configure password protection for the ColdFusion Administrator. For more information, see Using password protection.
- Configure password protection for RDS access. For more information, see RDS password protection.
- Enable, disable, and customize ColdFusion security, on the Security > Sandbox Security page (called Resource Security page in the Standard edition). For more information, see Using sandbox security.
Using password protection
Password protection restricts access to the ColdFusion Administrator and to a ColdFusion server when you attempt access through RDS security.
ColdFusion Administrator password protection
Secure access to the ColdFusion Administrator is enabled by default. The password that you enter during installation is saved as the default. You are prompted to enter this password whenever you open the Administrator.
Password protection for accessing the Administrator helps guard against unauthorized modifications of ColdFusion, and Adobe recommends using passwords. You can disable or change the Administrator password on the Security > CF Admin Password page.
Configurable seed for password encryption
You can specify a new seed value to encrypt data source passwords.
To modify the default seed value assigned by ColdFusion or to change the value you specified,
- In the ColdFusion Administrator, got to Security > Administrator and then in the Password Seed section, specify the new seed value between 8-500 characters.
Click Submit Changes.
Note: When you modify the seed value, all data source connections are reset. Therefore, Adobe recommends that you perform this task when the server is idle or at the initial phase (after installation).
RDS password protection
If you configured password protection for RDS access when you installed ColdFusion, you are prompted for the password when you attempt to access ColdFusion from Dreamweaver MX 2004, HomeSite+, or the ColdFusion Report Builder.
You can disable RDS or change the RDS password on the Security > RDS Password page.
Note: Disabling RDS also disables the applet that the ColdFusion Administrator uses in file-related dialog boxes. |
If you use RDS security, you rely on web server and operating system security settings to set permissions for ColdFusion application and document directories.
Enhancing ColdFusion Security on Windows
To enhance security for the ColdFusion server on Windows, restrict access to the following files to selected ColdFusion users:
- /cfusion/lib/seed.properties
- /cfusion/lib/password.properties
- /cfusion/lib/license.properties
- /cfusion/bin/passwordreset.bat
- /cfusion/bin/cf-passwordreset.jar
Exposing services to users
ColdFusion exposes many existing enterprise services as web services. You can access these services using SOAP and AMF/Flash remoting.
The following are the exposed services:
- cfpdf
- cfImage
- cfdocument
- cfmail
- cfpop
- cfchart
- upload service
You can secure the exposed services to prevent access by unknown applications or users. This can be done by configuring the client IP address range to which services are accessible. Also, you can set up user access control for the services.
On the Security > User Manager page, you can select the services available to a user from the Exposed Services section.
By default, all the services are listed in the Prohibited Services drop-down list. Press CTRL and select the services that you want the user to avail and click the << button.
Now, click Edit User to implement the changes to the user settings.
Configure IP address to access exposed services
To configure IP addresses to access exposed services:
- Go to Security > Allowed IP Addresses
- To add an IP address, specify the IP address in the IP addresses field and click Add.
- To remove an IP address, select the IP address from the View/Remove Selected IP Addresses for Exposed Services list.
- Click Remove Selected to remove the IP addresses.
Restricting access to ColdFusion Administrator
You can restrict access to ColdFusion Administrator.
Note: By default, localhost and all IP addresses can access ColdFusion server. |
To add IP addresses that must be allowed access:
- Go to Security > Allowed IP Addresses > Add/Remove IP Addresses which will have Administrator access.
- In the IP Address text box, specify the IP addresses.
- Click Add.
- Repeat the procedures to add more IP addresses.
Regular expressions are supported. That is, if you specify 10...*, all IP addresses starting with 10. are allowed access.
Enabling Secure Profile for ColdFusion Administrator
ColdFusion allows you to secure ColdFusion server furthermore by enabling or disabling selected settings on the ColdFusion Administrator. When installing ColdFusion, you can enable Secure Profile by selecting the option when prompted on the Secure Profile screen. Further, you could provide a comma separate list of IP addresses that may be allowed to access the ColdFusion Administrator.
Administrator settings affected by enabling Secure Profile
|
Administrator Settings |
Path |
Default Admin Profile |
Secure Profile |
Changes to the setting post migration to ColdFusion 10 |
---|---|---|---|---|---|
1 |
Use UUID for cftoken |
Server Settings > Settings |
Enabled |
Enabled |
Overwritten |
2 |
Disable access to internal ColdFusion Java components |
Server Settings > Settings |
Disabled |
Enabled |
Overwritten |
3 |
Enable Global Script Protection |
Server Settings > Settings |
Enabled |
Enabled |
Overwritten |
4 |
Maximum size of post data |
Server Settings > Settings |
20MB |
20MB |
Overwritten |
5 |
Missing Template Handler |
Server Settings > Settings |
No Value |
Custom missing error template |
Retained if specified |
6 |
Site-wide Error Handler |
Server Settings > Settings |
No Value |
Custom site-wide error template |
Retained if specified |
7 |
Request Queue Timeout Page |
Server Settings > Request Tuning |
No value |
Custom error template |
Retained if specified |
8 |
Cookie Timeout |
Server Settings > Memory Variables |
15767000 minutes |
1440 minutes |
N/A |
9 |
Disabling updating of ColdFusion internal cookies using ColdFusion tags/functions |
Server Settings > Memory Variables |
Disabled |
Enabled |
N/A |
10 |
Enable WebSocket Server |
Server Settings > WebSocket |
Enabled |
Disabled |
N/A |
11 |
Start Flash Policy Server |
Server Settings > WebSocket |
Enabled |
Disabled |
N/A |
12 |
Allowed SQL (all settings) |
Data & Services > Data Sources > database > Advanced Settings |
Enabled |
Create, Drop, Alter, Grant, Revoke, Stored Procedures are disabled |
Retained if specified |
13 |
Enable Robust Exception Information |
Debugging & Logging > Debug Output Settings |
Disabled |
Disabled |
Overwritten |
14 |
Enable CFSTAT |
Debugging & Logging > Debug Output Settings |
Enabled |
Disabled |
Overwritten |
15 |
Select the type of Administrator authentication |
Security > Administrator |
Use a single password only |
Separate user name and password authentication (allows multiple users) |
N/A |
16 |
Enable RDS Service |
Security > RDS |
Configurable at install time |
Disabled |
N/A |
17 |
Select the type of RDS authentication |
Security > RDS |
Use a single password only |
Separate user name and password authentication (allows multiple users) |
N/A |
18 |
Enable ColdFusion Sandbox Security |
Security > Sandbox Security |
Disabled |
Disabled |
Overwritten |
19 |
Allowed IP addresses for ColdFusion Administrator access |
Security > Allowed IP Addresses |
Not available at install time |
Available at install time |
N/A |
Note: Secure Profile disables Directory Browsing for a stand alone ColdFusion installation with built-in web server. |
COMMUNITY CONTRIBUTED HELP
The page above explains that if the "secure profile" option is taken during installation, ColdFusion will set the 3 error handlers to a value that is shown above merely as "Custom missing error template".
More specifically, and particularly if anyone may remove them from the CF Admin and need to add them back, the three templates can be found in this directory in your installation: C:\ColdFusion10\cfusion\wwwroot\CFIDE\administrator\templates, and are named (in the order listed above):
- secure_profile_error.cfm
- missing_template_error.cfm
- request_timeout_error.cfm
So for instance, to put the "default" "secure" sitewide error handler back in place, provide this value for the CF Admin>Settings>Site-wide Error Handler:
- /CFIDE/administrator/templates/secure_profile_error.cfm
Changes in Secure Profile (ColdFusion 11)
When installing ColdFusion Server, you can enable Secure Profile by selecting the option when prompted on the Secure Profile screen. Further, you could provide a comma separate list of IP addresses that may be allowed to access the ColdFusion Administrator. This feature has been available from ColdFusion 10. In ColdFusion 11, Secure Profile has been enhanced to handle access to other internal components too. For instance, you can set restrictions for following URLs:
- CFIDE/main/*
- CFIDE/adminapi/*
- CFIDE/administrator/*
- CFIDE/componentutils/*
- CFIDE/wizards/*
- CFIDE/servermanager/*
To allow IP addresses to access the internal ColdFusion components, perform the following tasks:
- Login to ColdFusion Administrator
- Click Security > Allow IP Addresses
- Go to Allow IP Addresses for accessing ColdFusion Administrator and ColdFusion Internal Directories section and add grant access to individual IP address to access the internal components as shown in the following figure: