13.09.2016 Views

PHP and MySQL Web Development 4th Ed-tqw-_darksiderg

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Identifying the Threats We Face<br />

363<br />

Monitoring Security<br />

After we finish developing our web application <strong>and</strong> deploy it to production servers for<br />

people to begin using, our job is not complete. Part of security is monitoring the system<br />

as it operates, looking at logs <strong>and</strong> other files to see how the system is performing <strong>and</strong><br />

being used. Only by keeping a close eye on the operation of the system (or by writing<br />

<strong>and</strong> running tools to do portions of this for us), can we see whether ongoing security<br />

problems exist <strong>and</strong> find areas where we might need to spend some time developing<br />

more secure solutions.<br />

Security is, unfortunately, an ongoing battle <strong>and</strong>, in a certain hyperbolic sense, a battle<br />

that can never be won. Constant vigilance, improvements to our system, <strong>and</strong> rapid reaction<br />

to any problems are the price to be paid for a smoothly operating web application.<br />

Our Basic Approach<br />

To give ourselves the most complete security solution possible for reasonable effort <strong>and</strong><br />

time, we will describe a twofold approach to security.The first part will fall along the<br />

lines of what we have discussed thus far: how to plan for securing our application <strong>and</strong><br />

designing features into it that will help keep it safe.Were we compulsive labelers, we<br />

might call this a top-down approach.<br />

In contrast, we might call the second part of our security approach a bottom-up<br />

approach. In this phase we look at all the individual components in our application, such<br />

as the database server, the server itself, <strong>and</strong> the network on which it resides.We ensure<br />

that not only are our interactions with these components safe, but that the installation<br />

<strong>and</strong> configuration of these components is safe. Many products install with configurations<br />

that leave us open to attack, <strong>and</strong> we would do well to learn about these holes <strong>and</strong> plug<br />

them.<br />

Identifying the Threats We Face<br />

In Chapter 15,“E-commerce Security Issues,” we saw a number of security threats to<br />

our e-commerce applications. In this chapter we focus on a few of these <strong>and</strong> look at<br />

how to change our development practices with them in mind.<br />

Access to or Modification of Sensitive Data<br />

Part of our job as web application designers <strong>and</strong> programmers is to ensure that any data<br />

the user entrusts to us are safe, as are any data that we are given from other departments.<br />

When we expose parts of this information to users of our web application, it must be in<br />

such a way that they see only the information that they are permitted to see, <strong>and</strong> they<br />

most certainly cannot see information for other users.<br />

If we are writing a front end for an online stock or mutual funds trading system, people<br />

who can get access to our account tables might be able to find out such information<br />

as users’ taxpayer identification numbers (Social Security Numbers, or SSN, in the USA),

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!