13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

20.3 Be an Enabler, or “Let’s Be Codependent!”445Up to this point, we have largely been c<strong>on</strong>sidering a situati<strong>on</strong> where theJava developer is working <strong>on</strong> an individual workstati<strong>on</strong> where he or she hasroot access. Now that we are talking about applicati<strong>on</strong> servers, we are dealingwith systems where, as the software progresses from development throughrounds of testing to producti<strong>on</strong>, we will want to limit the people who are ableto change certain elements of the system. Often, the “quick and dirty” strategyis to share out the root password to a number of users. This is a serious securityrisk, even when all parties are trusted. Why? Because root isn’t a pers<strong>on</strong>. Whensome<strong>on</strong>e logs in as root, we do not know who that pers<strong>on</strong> is. We <strong>on</strong>ly knowthat it is some<strong>on</strong>e who knows the root password. In some businesses, this isan unacceptable ambiguity in audit.A comm<strong>on</strong> alternative is to restrict root login to the c<strong>on</strong>sole <strong>on</strong>ly, and torequire the use of the su (“set user”) command to promote an already loggedinuser to root status. This provides a link back to the individual, so acti<strong>on</strong>scan be traced to single pers<strong>on</strong>. That improves auditability.This strategy is better, but since root is an all-or-nothing propositi<strong>on</strong>, itis a fairly blunt instrument. Once some<strong>on</strong>e can su to root, that some<strong>on</strong>e cando anything. That’s a lot of power to give to some<strong>on</strong>e who just needs to be ableto install WAR files.Yet another strategy is to set up the sudo system. 4 Using sudo, you canspecify what people can execute which commands as root, and where they maydo it from. In other words, you might let user alice start and stop the Webserver and mount and unmount filesystems when she is logged in to a localmachine, but <strong>on</strong>ly to start the Web server when she is logged in <strong>on</strong> a machineoutside your network. Check out the manpage for sudo to learn more. Eventhis isn’t the best soluti<strong>on</strong> for the present issue.The best soluti<strong>on</strong> is not to require root power at all if you can avoid it.Remember that permissi<strong>on</strong>s <strong>on</strong> files in <strong>Linux</strong> are assigned to users, groups, andothers. Most people do not think about the middle tier, groups. But groups arethe best way to give c<strong>on</strong>trol over parts of the filesystem to a collecti<strong>on</strong> of userswithout requiring them to share an account and password.20.3.1 N<strong>on</strong>root-Installed SoftwareThe problem with all of the power-sharing strategies we outlined earlier is that<strong>on</strong>ce the user escalates to root, there is no way to limit what he or she can do4. Some folks pr<strong>on</strong>ounce this “ess-you doo,” and some “pseudo.” Whatever floats your boat.

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

Saved successfully!

Ooh no, something went wrong!