Home > Ask the Security Experts > Application Security Questions & Answers > Application development best practices
Ask The Security Expert: Questions & Answers
EMAIL THIS

Application development best practices

Michael Cobb, featured expert EXPERT RESPONSE FROM: Michael Cobb, featured expert

Pose a Question
Other Security Categories
Meet all Security Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 14 February 2006
What is your opinion on guidelines for Web application development in terms of time-out settings, caching and other best practices in account log out from a security perspective?

>

Web applications have to establish sessions to keep track of a user's requests and account logout is a critical aspect of managing active sessions. Your application should have a method, such as a logout button or link, located on every page, which allows the user to log out. Also, users who have not logged in for a while should be locked out until they have reregistered.

You should base your timeout settings on how users are likely to interact with Web applications as well as how sensitive this data is. For example, some banking sites time-out after ten minutes due in part to the sensitive data accessed by its users. In addition, because "Remember Me" options can negate the timeout settings, you should ban automatic log ons or keep-alive features.

Unfortunately, you'll have limited control over client-side caching of your application's content. If you don't want browsers to cache your content, set the cache control directives in the server response headers to influence how client-side caching is handled. If you don't want browsers to cache your pages, set the cache-control response header to no-store. This will instruct the browser cache not to store the response or any request for it. Unfortunately, no-cache and no-store are HTTP 1.1 headers and therefore are not supported by HTTP 1.0 caches. Additionally, non-HTML content, such as PDFs and Excel spreadsheets, is often cached even when the above tags are set. Another concern is that some browsers have the ability to store user-supplied form data, often insecurely. If any of your Web forms collect sensitive data, add the attribute AUTOCOMPLETE=FALSE, to warn the browser not to store the data. I say warn, because this attribute is not part of the HTML specification. If the user is on a shared PC and you consider your application high-risk, ask him or her to clear the browser's cache and history.

It is also critical that you clear the server-side session state, destroy the session on the server and overwrite any session cookies on the browser when the user logs out or the session expires, because a browser only destroys session cookies when its thread actually terminates it. This ensures that session replay attacks cannot occur after idle timeout or user log off. Also, session IDs in the URL should not be included because they can be seen by shoulder surfers, cached by the browser and stored in the referrer logs of other sites. Ideally, a user's entire session, including session identifiers, should be SSL-protected to prevent session ID exposure through network interception. Session IDs should be long, complicated, random numbers and should be expired and regenerated prior to any significant transaction, or after a certain number of requests or period of time, especially when switching to SSL. This will reduce the risk from session-hijacking and brute-force attacks. Finally, be sure to document the goals of managing application sessions and the mechanisms implemented to achieve them in your security policy.


BROWSE BY TAG
Application Security,   Web Security Tools and Best Practices,   Web Application Security,   Application and Platform Security,   VIEW ALL TAGS

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Application Security
Do Facebook URL security concerns justify blocking social networks?
Is there a way to block iPhone widgets that bypass Web filters?
Should enterprises be concerned with Twitter in the workplace?
Are there still Google Desktop security problems?
Can an IP spoofing tool be used to spam SPF servers?
Will an application usage policy best control network bandwidth?
How can URL-shortening services be manipulated?
Is my security program ready for Web application firewall deployment?
How to ensure the security of a shopping cart application
When to use the service features of the Metasploit hacking tool

Web Application Security
Black box and white box testing: Which is best?
InZero Systems launches hardware-based security gateway
Web application vulnerability assessment shows patching progress
Preventing SQL injection attacks: A network admin's perspective
Cisco acquires SaaS security vendor ScanSafe
Web application firewall use goes beyond compliance, company finds
Gumblar Trojan drive-by exploits spike following Adobe update
Some Facebook applications lead to Russian attack sites
Barracuda acquires Purewire expanding Web security reach
An enterprise strategy for Web application security threats

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
anonymous Web surfing  (SearchSecurity.com)
buffer overflow  (SearchSecurity.com)
cache cramming  (SearchSecurity.com)
cookie poisoning  (SearchSecurity.com)
dictionary attack  (SearchSecurity.com)
distributed denial-of-service attack  (SearchSecurity.com)
JavaScript hijacking  (SearchSecurity.com)
National Computer Security Center  (SearchSecurity.com)
threat modeling  (SearchSecurity.com)
trigraph  (SearchSecurity.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Find Security Solutions for Your Business
TechTarget Security Media
Information Security View this month\\'s issue and subscribe today.
Information Security Decisions Apply online for free conference admission.
SearchSecurity.com
HomeNewsMagazineMultimediaWhite PapersLearningAdviceTopicsEventsAbout Us

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts