USENIX Update

October 17, 2009

LISA 2009: Rik Farrow on Working with SELinux

Filed under: Interviews — Tags: — msacks @ 12:44 pm

LISA 2009: Rik Farrow on Working with SELinux
By Matthew Sacks

Rik Farrow is a security trainer as well as the Chief Editor for USENIX’s ;login magazine. He is delivering training on SELinux at LISA 2009 and spoke with the USENIX Blog Team about his background and the upcoming SELinux training he will be delivering at LISA 2009; Working with SELinux
http://www.usenix.org/events/lisa09/training/tutonefile.html#m8


Q: Rik, please tell us a bit about your technical background.

Rik Farrow: I began working with UNIX systems in 1982, and became interested in UNIX security in 1984. In 1987, I began teaching UNIX Security classes and was doing so internationally by 1989. I focused on security training from 1994 to 2006, a business that involved way too much travel. In 1999, I created a course for internal use by the NSA.

While my major in college was psychology, I worked for my advisor as a lab tech and a programmer. I really got involved with computers a few years after graduation, as soon as microcomputers made it possible to own my own computer. By 1980, I was a self-employed computer consultant, doing some programming and manual writing at first. By the mid-80s, I was consulting in UNIX sysadmin and security.

I was also the technical editor of UNIXWorld Magazine from 1989-1994, and started editing special editions of USENIX ;login: in 1998. I have written hundreds of magazine articles, most about security, as well as two UNIX-related books.

Q: What inspired you to deliver training on SELinux at LISA?

Rik Farrow: I had a contract where I was building a Linux system for installation in a remote site. The system involved using XEN, and when something didn’t work, the first thing I did was disable SELinux. I did this based on advice I found on the ‘net.

I later found myself wondering why people considered disabling SELinux a useful first step. It didn’t help with my problem at all. So I began to investigate.

I also had some minor involvement in getting SELinux integrated into the Linux kernel. During the first Linux Kernel Developers Summit, I spent a lot of time with Peter Loscocco, one of the key developers of SELinux at the NSA. Loscocco wanted SELinux to become a part of the default Linux kernel, and Torvalds was not interested, but wanted a more flexible set of hooks instead proposed by Crispin Cowan. I encouraged Loscocco to go along with this scheme, which later became Linux Security Modules (LSM).

Q: Why is SELinux a good choice for securing Linux systems?
Rik Farrow: SELinux is one of three popular policy engines that work with LSM. There are others, such as AppArmor (in SuSe and Debian) and LIDS, but SELinux is the most widely used. Because of its ‘popularity’, there is a lot more support for SELinux.

SELinux provides strong isolation for many services and applications. The pre-packaged policy modules do this well out of the box But SELinux alone is not sufficient protection. You still need to practice good security practices, for example, use of strong passwords, proper file/directory ownership/permissions, and patching.

Q: Is SELinux difficult to implement properly?

Rik Farrow: SELinux works well if you stick with the default policy. The default policy is called the targeted policy and focuses on sandboxing services and troublesome applications. You can also download and use the strict policy, but doing so is a lot harder. The targeted policy allows logged in users a lot of flexibility, while the strict policy locks down users as well.

Q: What benefits does a system administrator get by using SELinux?

Rik Farrow: Exploitable bugs in applications are minimized. For example, suppose someone discovers a new bug in BIND’s named that allows shell execution. SELinux prevents named from executing /bin/sh, as well as prohibiting reading and writing any files outside of the few files required by normal named functioning. The same is true for sendmail and many other services.

SELinux also confines the Apache httpd, but the problems with Web servers most often have to do with bugs in applications that interface with Apache. For example, the recent exploits in the Wordpress blogging software would have been severely limited in scope by SELinux. But an attacker using an SQL injection attack would still be able to access a backend database, as this permission must be granted by SELinux so the Web server and database can work together. So there are limitations to what SELinux can do, limitations based on allowing an application to work without interference. SELinux can and does prevent applications from doing things they are not normally expected to do, such as execute shells, read or write files outside of the application, etc.

Q: What are some highlights of interest covered in your training?

Rik Farrow: The focus of the course is really making it easier to work with SELinux. Doing so relies largely on fixing problems with file context, something that can be done with chcon and semanage. I also show how audit2allow is used to patch policy in a safe manner. Getting to the point of being able to do these things involves understanding enough about how SELinux works, as well as a little bit of necessary terminology.

I’ve spent a long time working with UNIX security, some 25 years. This helped me understand both how SELinux works, as well as how best to explain how it works.


Fedora SELinux Home: http://fedoraproject.org/wiki/SELinux

Rik Farrow’s Web Site: http://rikfarrow.com/

Register For LISA 2009: http://www.usenix.org/events/lisa09/registration/

October 16, 2009

Tom Limoncelli’s LISA 2009 Training: “Design Patterns for System Administrators”

Filed under: Update — Tags: — Matt Simmons @ 3:08 pm

Tom Limoncelli is one of the preeminent system administrators in the world right now. He is the co-author of “The Practice of System and Network Administration”, what is considered by many to be something akin to a religious tome, and he has presented training sessions at LISA for several years on the subject of his second book, “Time Management for System Administrators”. This year, he is offering a new training course, titled “Design Patterns for System Administrators”. Tom and I sat down and discussed design patterns, and how they can help system administrators become better and more efficient in their positions.

Q: What exactly is a ‘design pattern’ and what will it do for us?

Tom Limoncelli: “design pattern” is a little bit of knowledge that is worth sharing, and useful for repeating. For example, the design pattern of “a network” or “active-active redundancy” or “RAID-0″ or “helpdesk”. Ever visit an IT shop where there was no way for people to get help? I have. So I explained the design pattern of a “helpdesk” and without having to re-invent the wheel, they were able to implement one.

There are things that we do that are hard to explain all the benefits. Maybe there are a few obvious benefits but there are plenty benefits that can’t be explained. They can only understood through experience. That’s called “tacit knowledge”. In an effort to record “tacit knowledge” researchers developed the concept of recording “design patterns”: the things that experts do, recorded in a way that others can replicate. They don’t have to know 100% of why this is “the right way to do something”, they just have to know that in a certain situation with a certain problem, experts solve it a particular way most of the time. It doesn’t prevent you from doing it your own way, but gives a guide or instruction book.

For example, in architecture there is a design pattern of putting the men’s room and women’s room back-to-back. It makes the plumbing less expensive to install, obviously, but think about the other benefits that one might not readily see until after the building is built: putting signs in the building to lead people to the bathrooms becomes easier, men waiting outside the bathroom for women (and vice versa) have an obvious place to stand, etc. When you hear someone say “it just works better”, they are describing tacit knowledge.

In software engineering an example design pattern is “the iterator”. When you make a data structure that stores multiple things people need a way to iterate over those things. If you don’t provide it, people will make their own iterators constantly reinventing the wheel, usually badly.

In system administration we have design patterns such as, “automate what you do often” and “multiple machines with the same purpose should have one configuration”. These things seem obvious to experienced sysadmins, but are flashes of brilliance to new people. A friend tells me the story of mentoring a new sysadmin who had to set up a package on 5 machines. On each machine she (the new sysadmin) downloaded the source to a different place, ran ./configure, and installed the software. Obviously one improvement would be to download it to the same place on each machine (”do the same thing the same way on multiple machines”). If each machine was a different operating system this would have been less confusing and eased the installation. However, the machines were all the same architecture, so a better pattern would have been to make a binary package and install it on all the machines. The concept of making and using packages is a design pattern.

Design patterns don’t just help new sysadmins. They help experienced sysadmins too. I’m an experienced sysadmin and yet I’ve never directly had to configure a SAN myself. If at my next job I had to build a SAN from scratch I could guess my way through it based on my understanding of RAID and general storage know-how. However, my hope is that I’m able to find a series of SAN patterns that I can use to guide me.

Q: What do you think is the best way to guard against “Design Patterns” becoming “Cargo Cult Administration”?

Tom Limoncelli: Cargo Cult refers to doing something because you’ve seen other people do it, even though you don’t know why. This can lead to disasters, or at least wasted time.

Design Patterns prevent “cargo cult system administration” because it explains why and when to use a pattern. I’m sure there will come a day when design patterns are so pervasive that we find someone using them blindly. I look forward to that kind of problem. In the meanwhile, don’t throw the baby out with the bathwater.

(See Cargo Cult programming (http://en.wikipedia.org/wiki/Cargo_cult_programming) if you’ve never heard of this term.)

Q: What was it that first made you aware that there were patterns in administration that seemed consistent across a range of disciplines?

Tom Limoncelli: I think I’ve always known it but I didn’t have the words for it. Unix/Linux is great because you can configure things any way you want. You have tons of choices. The negative side of this is there are so many decisions to make. Nobody knows enough to get all those decisions right. What I soon learned that there is a difference between having the ability to do things a million different ways and deciding that only certain ways are worth doing. If you look closely at most vendor-based certifications they’re really teaching you the 2-5 configurations that they want to see when you call their tech-support phone line. They’ve taken a product that can be configured a zillion ways (it’s just simple combinatorics), figured out the best configuration for certain situations (usually “small, medium, and large”), and are encouraging people to use those patterns.

In the open source world we’re proud of the flexibility we have. It is part of the freedom we want. However, it gets us in trouble. Instead we should be proud of the fact that we have openly shared our experience and and helped other people benefit. The analogy I make is: What would you do if a stranger asked you, “Can I drink this?” and you knew it was poison. Would you say, “Yes” and be satisfied that you are technically correct (there is no law of physics preventing the person from drinking it, the ramifications are terrible but he can do what he wants) or would you say “No, it is poison. Don’t do it!”. In real life, no sane person would recommend that a person drink poison. In system administration our tools permit us to construct configurations that will come back to bite us. I would rather live in a world where we pride ourselves in sharing our tacit knowledge and experience as freely as we share our source code.

I wish I had understood the power of design patterns when Christine and I wrote The Practice of System and Network Administration. If you read the book, each section describes what we would now call a design pattern, but without the formalism of patterns. A friend recently pointed out that most pattern systems use a template with up to 10 items. He quoted Chin-Hsiang Chang et al., 2008’s list of: (a) name, (b) problem, (c) context, (d) solution, (e) forces, (f) rationale, (g) resulting context, (h) relative pattern, (i) examples, (j) and known use. When you have all that data, the decisions become more scientific. (I have to admit that in the tutorial I usually provide only 2-3 of those elements.)

Q: Do you have a favorite pattern that you’d like to share?

Tom Limoncelli: The checklist is my favorite pattern. I find that repetition is the source of all operational efficiency. If we do something over and over, it can be improved a little each time. It can be taught to others. It can be practiced and we can get better at doing it. A checklist is a simple tool that helps us do all that. It helps us record the right way to do something, improve how we do it over time (by updating the checklist), and helps us convey knowledge (teach a person each item in the checklist, now they can do the task). They are portable: You can keep checklists on a wiki page, in a book, or even put one in your wallet. I have a checklist of who to call and what to do in case of certain major outages. I have a wiki page that is a checklist of the training new co-workers receive. In The Practice of System and Network Administration we include dozens of checklists for various situations (the “Look Inside” text on Amazon includes a chapter that is nothing but checklists http://www.amazon.com/o/ASIN/0321492668/tomontime-20)

Using a checklist it reduces errors and conserves brainpower for more important things. Also, once a checklist exists, delegating to junior people becomes easier taking it off their plate entirely (w00t!). Automation becomes easier. You don’t have to automate the entire process, just the most painful steps!

Sometimes we don’t see the opportunities for repetition because we are too close to the situation. Even smart people miss these opportunities. When we turn chaos into repetition everyone benefits. At a previous company I had a team of highly experienced people that spent half of each meeting deciding when the next meeting would be. They “wanted to be flexible”. I put my foot down and demanded that we set aside 10am each Wednesday and cancel if there was nothing to talk about. It saved us 30 minutes each week (multiplied by 15 people) and the people that “valued their flexibility” (whatever the hell that meant) found they could plan better because they always knew when the next meeting would be. They could save their seemingly biological need for “flexibility” for when they did something important (like write code) instead of when they met to talk about writing code.

Q: Are smaller infrastructures going to be able to take advantage of these techniques, too?

Tom Limoncelli: There are patterns that only work in small companies. Then again, most big companies that I’ve visited are really the amalgamation of many small entities.

Extremely small sites benefit from patterns because it gives them access to knowledge that is otherwise sequestered outside the company. Wouldn’t we all work together better if we had a common language for describing what we are doing? In server architecture we have terms like “active-active”, “load balancer”, and “RAID”. Imagine if we didn’t have those patterns and had to re-explain RAID every time we used multiple disks to simulate a larger volume in a way that increases capacity, reliability, or both? How powerful it will be to expand our vocabulary to other things like helpdesk management, monitoring, and user-notification!

Q: What would you say is the biggest mistake that admins make in their designs?

Tom Limoncelli: I hope that some day the biggest problem is that people are re-inventing the wheel instead of paying attention to the libraries of patterns that are already available. Sadly, first we need to build those libraries.

Q: In what ways, if any, does “Design Patterns…” tie in with your other training session, “Time Management for System Administrators”?

Tom Limoncelli: Time Management is taught in the morning session and Design Patterns is in the afternoon. That’s because one builds on the next. There is a lot of new material in my newly revised Time Management tutorial. The overflow moved into the Patterns tutorial. You’ll see a lot of patterns related to checklists, for example, in the afternoon session.

Each tutorial stands alone. You don’t have to attend one to understand the other.

Q: How do you decide what topics to cover when you only have half a day to present them?

Tom Limoncelli: I carefully study hundreds of IT shops, lovingly hand-picking patterns by hand based on utility, understandability, ripeness, color, texture, shape and flavor.

I spent 5 years writing down patterns when I saw them. My biggest fear is that I won’t be able to get through all the examples. (in that case, people can read the slides)

Q: When we leave the “Design Patterns for System Administrators” training, what new skills and knowledge will we be bringing back to our jobs in the real world?

Tom Limoncelli: Hopefully everyone will have a bunch of new things to try, a dozen new ways to work, and a entirely new way to think about how they do system administration. Most of all, I hope everyone starts recording their own patterns and sharing them.


Tom Limoncelli Blog: Everything Sysadmin

Tom Limoncelli LISA Profile: http://www.usenix.org/event/lisa09/training/tutinstructors.html#limoncelli

Design Patterns for System Administrators Training Program: http://www.usenix.org/events/lisa09/training/tutonefile.html#t11

Register for LISA’09: http://www.usenix.org/event/lisa09/registration/

October 10, 2009

Tobias Oetiker’s LISA 2009 Training: Bringing Your Web Pages to Life with jQuery

Filed under: Update — Tags: — msacks @ 4:40 pm

Tobias Oetiker: Bringing Your Web Pages to Life with jQuery
http://www.usenix.org/event/lisa09/training/tutonefile.html#t8

Tobias Oetiker is delivering training on jQuery this year. Oetiker has been creating Web pages since the first versions of Netscape came out in 1994. Oetiker did not initially have an interest in early JavaScript, but when he discovered that you could write fully functionally applications entirely in JavaScript running entirely in the browser with the Qooxdoo project, it caught his interest. Oetiker was further empowered in using Javascript to bring life to his Web pages using the popular and powerful jQuery Javascript framework, which started as a simple solution to a small problem of embedding Picasa images into Web pages, and has grown into a full-scale training course on learning jQuery.


Q: Can you give a general background about the jQuery training you are going to give at LISA?

Tobias Oetiker: Over time the use of JavaScript in Web pages has been growing and some companies seemed to have found ways of coding complete applications in it. This fascinated me greatly, since the resulting Web pages did look amazing and were highly interactive. Trying to figure how it was done, I was of the impression that it normally involved a bulky Java backend on the server side or an insufferable jumble of php files working their magic on the browser.

It was when I stumbled upon Qooxdoo (www.qooxdoo.org), two years  ago  that I found out that one could really write complete and highly functional applications in JavaScript, running entirely in the browser, calling out to the back-end only when new data was required. And that the backend could be written in any number of languages. Qooxdoo is very good to the programmer, since it lays down all the groundwork for writing large and complex applications with considerable ease. In the process of working intensively with Qooxdoo I got more and more comfortable with JavaScript. Qooxdoo JavaScript applications weigh in with 500 kBytes of code at least. As such they are not well suited for casual addition to a normal webpage.

Being an avid spare time photographer I have been looking for good ways to integrate a photo gallery into my web page. I have written scripts for generating my galleries and also used some open source tools like jAlbum. But it all seemed a bit too tedious for today’s easy going “webbish” ways. As I have been using Picasaweb for some time now, I came to the conclusion that the ideal solution to my problem would be to embed the pictures from Picasaweb directly into my webpage. Having become JavaScript aware, I decided to try my hand at writing some code to do this embedding dynamically. In this project I used jQuery for the first time. Since then I have used it in several other projects and even published several plugins for it: http://plugins.jquery.com/user/21324/track

Q: Why did you decide to give training on jQuery?

Tobias Oetiker: Pretty much as soon as my jQuery gallery was done I found that there must be many people like me at LISA, who have been creating Web pages for ages and know some scripting but have not yet made the jump to applying their programming abilities directly in the browser. With this class this is all going to change. Tons of fun ahead.

Q: In your experience, how has jQuery improved the functionality of Web sites?

Tobias Oetiker: I see both usability as well as maintainability improvements. My initial motivation for the gallery was to make it simple for me to show my latest work on my webpage without having to spend time integrating the pictures, so this is more on the maintenance side. But then again, they way the application works now, only the pictures get loaded as the user navigates the gallery, this makes the site operate faster, so it is also a usability improvement.

Q: In your experience, how has jQuery improved the user experience of Web sites?

Tobias Oetiker: I think apart from the eye candy, it is mainly about latency. While classic cgi based applications have to reload the whole webpage on every turn, jQuery  (and its siblings) allow me to do some processing in the browser without ever bothering the server and in some instances call upon the server for a very specific task and integrate the result right back into the webpage without ever reloading.

Q: What are some examples of how jQuery improved end user experience?

Tobias Oetiker: In my company we have this cgi-based time tracking application we use to log the hours we spend working on our projects. The Web pages it generates are very simple and load quickly, so working with it is quite pleasant, except for the part where I have to select the contract I am working on. It is a huge select box with hundreds of entries. Imagine one of this boxes where you have to select your country when ordering on the web. I have been wondering about this for ages: why does this selectbox widget not support incremental search. I guess non of the browser developers ever has to pick out his country from one of these lits, or maybe they all live in Afghanistan and not in Taiwan. So a few weeks back I write this jQuery plugin, which turns an ordinary selectbox into a selectbox with incremental search. It makes selecting from long selectboxes a pure joy. Try it here:   http://oss.oetiker.ch/jquery/jquery.AddIncSearch.html

I have much more fun logging my hours now.

Q: Will users write a jQuery application in your course?

Tobias Oetiker: I sure hope so. I have included the source code of everything I am going to talk about on the USB stick with the course materials. Since everyone has a browser on their computer, they should be all set to try out the example code and start hacking away at it directly. The cool thing about jQuery is, that quite startling things can be achieved with a single line of code. So application is maybe too daunting a word here.

Q: You mention there will be lots of code examples in the course, can you give a preview into some of the examples and what they do?

Tobias Oetiker: First I will be doing many little and un-attractive JavaScript and jQuery things, which in their unattractiveness have the advantage of being very easy to understand. Once everyone is up to speed I will code walk one or both of the plugins I mentioned above. Discussing the code of a real plugin will get down to the nitty-gritty details, which should make it much easier for you when you start, writing your own stuff.

The jQuery class is spanking new and I am very enthusiastic about teaching it at LISA this year.


Qooxdoo Project: http://qooxdoo.org/

Tobias Oetiker on Qooxdoo: http://lisa.usenix.org/?p=97

Tobias Oetiker LISA Profile: http://www.usenix.org/event/lisa09/training/tutinstructors.html#oetiker

Register for LISA 2009: http://www.usenix.org/event/lisa09/registration/

October 9, 2009

LISA ‘09 Early Bird Registration Deadline: Monday, Oct. 12

Filed under: Update — Tags: — Anne @ 2:11 pm

The Early Bird Registration Deadline is approaching. Please register by Monday, October 12, to receive maximum savings on your LISA ‘09 registration.

You’re invited to join us November 1-6, 2009, in Baltimore, MD, for the 23rd Large Installation System Administration Conference.

Just added! Get the latest in data storage technology and innovation at the Data Storage Day at LISA ‘09.

Training:
Don’t miss out on the in-depth training by experts such as Mark Burgess on Cfengine and David N. Blank-Edelman on Over the Edge System Administration. Back for 2009, training tracks on Solaris and
virtualization will be taught by industry leaders such as James Mauro and Richard McDougall.

Technical Program:
The comprehensive 3-day technical program includes a keynote address by Werner Vogels, CTO of Amazon.com; invited talks and plenaries on “Google Wave” and “Cosmic Computing”; paper presentations, posters, workshops, and more.

Plus:
* Explore the latest commercial innovations at the Vendor Exhibition

* Join your peers for 3 days of focused discussion at the workshops

* Benefit from opportunities for peer interaction, a.k.a. the “Hallway Track

* NEW! Can’t make it during the day? Sign up for the LISA ‘09 Evening Pass

* Additional discounts are available!
Registration (including hardship, government, and non-profit)
Airfare and hotel

* Connect with other attendees and help spread the word!
Facebook
Twitter

Check out the complete program information and register.

« Newer PostsOlder Posts »

Powered by WordPress