Fallacy My app isnt a target for attackers because it serves a niche audience

Fallacy my app isnt a target for attackers because it

This preview shows page 483 - 485 out of 517 pages.

Fallacy: My app isn’t a target for attackers because it serves a niche audience, experiences low volume, and doesn’t store valuable information. Malicious attackers aren’t necessarily after your app; they may be seeking to compromise it as a vehicle to a further end. For example, if your app accepts blog-style comments, it will become the target of blog spam, in which automated agents (bots) post spammy comments containing links the spammer hopes users will follow, either to buy something or cause malware to be installed. If your app is open to SQL injection attacks, one motive for such an attack might be to influence the code that is displayed by your views so as to incorporate a cross-site scripting attack, for example to cause malware to be downloaded onto an unsuspecting user’s machine. Even without malicious attackers, if any aspect of your app becomes suddenly popular because of Slashdot or Digg, you’ll be suddenly inundated with traffic. The lesson is: If your app is publicly deployed, it is a target. 12.12 Concluding Remarks: Performance, Reliability, Security, and Leaky Abstractions Performance, reliability, and security are systemwide concerns that must be constantly reviewed, rather than problems to be solved once and then set aside. In addition, the database abuses described in Section 12.8 reveal that Rails and ActiveRecord, like most abstractions, are leaky : they try to hide implementation details for the sake of productivity, but concerns about security and performance sometimes require you as a developer to have some understanding of how the abstractions work. For example, the n + 1 select problem is not obvious from looking at Rails code, nor is the solution of providing hints like :include for association queries, nor is the use of attr_accessible or attr_protected to protect sensitive attributes from being mass-assigned by a malicious user. In Chapter 4 we emphasized the importance of keeping your development and production environments as similar as possible. This is still good advice, but obviously if your production environment involves multiple servers and a huge database, it may be impractical to replicate in your development
Image of page 483
environment. Indeed, in this book we started out developing our apps using SQLite3 database but deploying on Heroku with PostgreSQL. Given these differences, will performance improvements made during development (reducing the number of queries, adding indices, adding caching) still apply in production? Absolutely. Heroku and other PaaS sites do a great job at tuning the baseline performance of their databases and software stack, but no amount of tuning can compensate for inefficient query strategies such as the n + 1 query problem or for not deploying caching to ease the load on the database.
Image of page 484
Image of page 485

You've reached the end of your free preview.

Want to read all 517 pages?

  • Spring '19
  • Dr.Marcos

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors