Book description
Over 70 hands-on recipes to develop fully functional policies to confine your applications and users using SELinux
In Detail
In SELinux Cookbook, we cover everything from how to build SELinux policies to the integration of the technology with other systems and look at a wide range of examples to assist in creating additional policies. The first set of recipes work around file labeling as one of the most common and important SELinux administrative aspects. Then, we move on to custom policy development, showing how this is done for web application confinement, desktop application protection, and custom server policies. Next, we shift our focus to the end user, restricting user privileges and setting up role-based access controls. After that, we redirect our focus to the integration of SELinux with Linux systems, aligning SELinux with existing security controls on a Linux system. Finally, we will learn how applications interact with the SELinux subsystem internally; ensuring that whatever the challenge, we will be able to find the best solution.
What You Will Learn
- Manage resource labels and fine-tune your policies to automatically handle labeling
- Gain an insight into how to tune the web server SELinux policy for secure web application hosting
- Learn how to confine desktop applications through custom-built policies
- Protect a server's assets by creating your own service-specific SELinux policies
- Discover how to restrict users without hindering them by installing role-based access control
- Troubleshoot and debug the behavior of SELinux-enabled applications
Table of contents
-
SELinux Cookbook
- Table of Contents
- SELinux Cookbook
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Preface
- 1. The SELinux Development Environment
- 2. Dealing with File Labels
-
3. Confining Web Applications
- Introduction
- Listing conditional policy support
- Enabling user directory support
- Assigning web content types
- Using different web server ports
- Using custom content types
- Creating a custom CGI domain
- Setting up mod_selinux
- Starting Apache with limited clearance
- Mapping HTTP users to contexts
- Using source address mapping to decide on contexts
- Separating virtual hosts with mod_selinux
-
4. Creating a Desktop Application Policy
- Introduction
- Researching the application's logical design
- Creating a skeleton policy
- Setting context definitions
- Defining application role interfaces
- Testing and enhancing the policy
- Ignoring permissions we don't need
- Creating application resource interfaces
- Adding conditional policy rules
- Adding build-time policy decisions
- 5. Creating a Server Policy
- 6. Setting Up Separate Roles
- 7. Choosing the Confinement Level
- 8. Debugging SELinux
-
9. Aligning SELinux with DAC
- Introduction
- Assigning a different root location to regular services
- Using a different root location for SELinux-aware applications
- Sharing user content with file ACLs
- Enabling polyinstantiated directories
- Configuring capabilities instead of setuid binaries
- Using group membership for role-based access
- Backing up and restoring files
- Governing application network access
-
10. Handling SELinux-aware Applications
- Introduction
- Controlling D-Bus message flows
- Restricting service ownership
- Understanding udev's SELinux integration
- Using cron with SELinux
- Checking the SELinux state programmatically
- Querying SELinux userland configuration in C
- Interrogating the SELinux subsystem code-wise
- Running new processes in a new context
- Reading the context of a resource
- Index
Product information
- Title: SELinux Cookbook
- Author(s):
- Release date: September 2014
- Publisher(s): Packt Publishing
- ISBN: 9781783989669
You might also like
book
SELinux
The intensive search for a more secure operating system has often left everyday, production computers far …
book
SELinux by Example: Using Security Enhanced Linux
SELinux: Bring World-Class Security to Any Linux Environment! SELinux offers Linux/UNIX integrators, administrators, and developers a …
book
Linux Security Cookbook
Computer security is an ongoing process, a relentless contest between system administrators and intruders. A good …
book
CentOS Quick Start Guide
A concise walk-through of CentOS 7, starting from installation to securing it's environment. Key Features No …