• Home
  • Gaming
    • Nintendo DS
    • Nintendo
    • PC
    • Playstation 3
      • Move
      • Sony PSP
    • Xbox360
      • Kinect
  • iPhone Themes
  • Wallpapers
    All Wallpapers are free. Here you can find the best collection of quality pictures for Windows, Linux or Apple desktop. Browse from over hundreds of wallpapers to design your computer with your ever changing mood. Requests and submissions are more than welcome. Enjoy!             3D                                    Cars                                Movies & TV           Abstract                        Celebrities                          Music          Animals                          Fantasy                             Romance          Anime                              Games                                 Space          Babies                      …
    • 3D
    • Landscapes
    • Cars
    • Celebrities
  • Mobile
    • Android
    • Apple
  • About
  • Home
  • Gaming
    • Nintendo DS
    • Nintendo
    • PC
    • Playstation 3
      • Move
      • Sony PSP
    • Xbox360
      • Kinect
  • iPhone Themes
  • Wallpapers
    • 3D
    • Landscapes
    • Cars
    • Celebrities
  • Mobile
    • Android
    • Apple
  • About
Previous Next

Testing AJAX applications

Posted by: Robert Allen , February 3, 2011

First, with an AJAX application, you have to view the application as being broken into two parts. In the old Web 1.0 days, we didn’t worry much about “client-side” code in our web apps. That is, there wasn’t much code of significance executing in the web browser. In AJAX applications, there is significant code running in the web browser. It makes decisions, keeps track of state, and controls a lot of the user’s experience. We now must test this code to make sure that our application executes correctly. If we don’t, we’re omitting a significant chunk of the application from our tests.

The next important fact to realize is that AJAX applications require many application programming interfaces (APIs) on the server. Rather than being web pages or servlets that serve up complete HTML, these APIs respond with XML or JSON data that the JavaScript (in the web browser) parses and interprets. In the old days, we could spider a web application and look for all the JSPs, ASPs, or other public pages, and we were pretty confident that we knew all the access points and input points. With AJAX, you now need to know all the individual APIs that different AJAX objects may invoke, and they’re not obvious from spidering a website.

Lastly, you have to realize that failures can happen in both directions. That is, the client can send malicious data to the server, or the server can send malicious data to the client. Either kind of attack can create a security issue. Proxying tools like TamperData, WebScarab, and Burp are essential because they allow you to manipulate both directions of the communications channel.

So what are some common security failures that we test for in AJAX applications? One of the most common failures is in the security design of the APIs. Most big parts of an application (JSPs, ASPs, servlets, etc.) will perform proper authentication and authorization. They might include JavaScript, however, that invokes AJAX APIs with no authentication or authorization. That is, the AJAX APIs may not pay any attention to cookie values, who the user is, or any part of the session’s identity. Imagine a bank application, for example, that uses a servlet to show you a summary page with all your accounts on it. Clicking a plus sign next to the account invokes JavaScript that calls a server API to fetch the five most recent transactions. The JavaScript expands a box on the page to show those recent transactions. A common mistake in a design like this is for that server API to fail to check the authorization of the requesting browser. That is, the server API accepts an account number and returns the most recent five transactions without checking to see if the current session is authorized to view transactions on that account. Such mistakes, though obvious, are unfortunately quite common.

Another key security mistake in AJAX applications is to trust the client’s data without verifying that it is logical and obeys business rules. Imagine that the server sends a list of files and their associated permissions so that the JavaScript code in the web browser will show some files as deletable and others as permanent. Some server applications assume that the JavaScript in the web browser will always execute correctly a false assumption. So when the browser requests to delete a file, the server assumes that the file must be one of the files that was listed as deletable, without actually checking.

One final note about AJAX and Web 2.0: although we have been speaking exclusively about JavaScript executing in a web browser, Flash-based web applications operate in much the same way. The Flash applets make HTTP requests behind the scenes, much the same way that JavaScript objects do. The biggest difference is that Flash applets are opaque to us. We cannot see their source code and know how they work internally, whereas the source code of JavaScript objects is available to us through our web browser. If your web application is Flash-based or has some Flash elements in it, these techniques will work well for you. And the security failings that happen in AJAX applications happen just as often in Flash applications.

Spec India is a Custom Software Application Development and Software Solutions Company based in Ahmedabad, India. Our Services includes iPhone Application Development, Android Application Development, ORACLE, .Net, and Mobile Computing.

Spec India is a Custom Software Application Development and Software Solutions Company based in Ahmedabad, India. Our Services includes iPhone Application Development, Android Application Development, ORACLE, .Net, and Mobile Computing.


Article from articlesbase.com

Find More Ipad Apps Articles

Tags: Ajax, Applications, Testing

Share!
Tweet

Robert Allen

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Archives

  • May 2013
  • April 2013
  • March 2013
  • December 2012
  • September 2012
  • July 2012
  • July 2011
  • June 2011
  • May 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • July 2009
  • June 2009
  • January 2009
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008

Recent Posts

  • Ubisoft & Beyond Gaming Partner Up to launch Social Prizing Hub
  • XboxOne Reveal Full Event Video
  • Exclusive Xbox One Kinect Video from Wired.com
  • Futuristic Third-person Shooter from Tragnarion Studios Headed to Xbox LIVE this July
  • Batgirl available today as a DLC character in Injustice: Gods Among Us

Contact Form


1+1=

Tags

Accessories apple Application Applications apps Best Business Case Company Converter Deals Developer Developers Development download Downloads Features Find Free from game games Insurance Ipad iphone ipod Jailbreak microsoft Mobile nintendo PC phone playstation 3 ps3 review software Store technology Tester Tips Touch Unlock video wii Xbox360
Copyright © 2008-2013
  • Home
  • About
  • News
  • Home