Information Technology Reference
In-Depth Information
Now combine the individual tools into a single program. Mature automation needs log-
ging and sanity checking of input parameters and the return values of all calls. These fea-
tures should be incorporated into each stage as well as the final version. The automation
should check the return value of the previous step and, if it failed, should be able to undo
the prior steps.
Thenextstageistomakeafullyautomatedsystem.IdentifywhatwouldcauseanSAto
run the tool, and have those conditions trigger automation instead. Complete logging and
robust error handling must be in place before this final step is implemented.
In some cases it is appropriate to create a self-service tool so that non-SAs can do this
task.Inthissituation,securitybecomesalargerissue.Thereneedstobeapermissionmod-
el to control who may use the tool. There need to be checks to verify that people can't ac-
cidentally do bad things or circumvent the system to gain privileged access.
12.6 Language Tools
Manyproducts,languages,andsystemsareavailableforcreatingautomation,andeachhas
its own pros and cons. The capabilities of these tools range from basic to quite high level.
12.6.1 Shell Scripting Languages
Shell languages provide the commands one can type at the operating system command-
line prompt. It is easy to turn a sequence of commands typed interactively at the Bash or
PowerShell prompt into a script that can be run as a single command—either manually or
by another process, such as cron .
Shell scripts have many advantages. For example, they allow for very fast prototyping.
They let the programmer work at a very high level. You can combine commands or pro-
gramstomakelarger,morepowerfulprograms.Therearealsodisadvantagestousingshell
scripts for your automation. Most importantly, shell-scripted solutions do not scale as well
as other languages, are difficult to test, and cannot easily do low-level tasks.
The most common UNIX shell is the Bourne Again Shell ( bash ), a superset of the
Bourne Shell (the UNIX /bin/sh command). In the Microsoft Windows world, Power-
Shell is a very powerful system that makes it easy to automate and coordinate all the Win-
dows systems and products.
12.6.2 Scripting Languages
Scriptinglanguagesareinterpretedlanguagesdesignedforrapiddevelopment,oftenfocus-
ing on systems programming.
Search WWH ::




Custom Search