User Guide

Table Of Contents
380 Chapter 16: Securing Applications
About application authentication
With application authentication, you do not rely on the web server to enforce application
security. The application performs all user authentication and authorization. The application
displays a login page, checks the users identity and login against its own authorization store, such
as an LDAP directory or database, and logs the user into ColdFusion using the
cfloginuser tag.
The application can then use the
IsUserInRole and GetAuthUser functions to check the users
roles or identity for authorization before running a ColdFusion page or specific code on a page.
For an example of application authentication use, see An application authentication security
scenario” on page 387.
ColdFusion authentication storage and persistence
How ColdFusion application authentication information is maintained by the browser and
ColdFusion, and therefore how long it is available, depends on the following:
Whether the user’s browser enables cookies
Whether the application supports the Session scope for login storage
Note: For detailed information on Session scope, see “Configuring and using session variables”
on page 352. Cookie scope contains the cookies that are sent by the browser; for more information
on using cookies, see
cfcookie in CFML Reference.
Authentication and cookies
Because HTTP is connectionless, a login can last beyond a single web page viewing only if the
browser provides a unique identifier that software on the server can use to confirm that the
current user is authenticated. Normally, this is done by using memory-only cookies that are
automatically destroyed when the user closes all open browser windows. The specific cookies and
how they are used depend on whether the application supports the Session scope for login
storage.
Note: For information on user logins without cookies, see “Using ColdFusion security without
cookies” on page 381.
Using the Session scope
If you do the following, ColdFusion maintains login information in the Session scope instead of
the Cookie scope:
Enable the Session scope in the ColdFusion MX Administrator and the Application.cfc
initialization code or
cfapplication tag.
Specify loginStorage="Session" in the Application.cfc initialization code or
cfapplication tag.