Configuration Management with Cfengine Steven Kreuzer NYC BSD Users Group July 2008.

Slides:



Advertisements
Similar presentations
Presented by Nikita Shah 5th IT ( )
Advertisements

ITR3 lecture 7: more introduction to UNIX Thomas Krichel
Current methods for negotiating firewalls for the Condor ® system Bruce Beckles (University of Cambridge Computing Service) Se-Chang Son (University of.
Chapter 20 Oracle Secure Backup.
COMPREHENSIVE APPROACH TO INFORMATION SECURITY IN ADVANCED COMPANIES.
Firewall Simulation Teaching Information Security Using: Visualization Tools, Case Studies, and Hands-on Exercises May 23, 2012.
T-FLEX DOCs PLM, Document and Workflow Management.
DESIGNING A PUBLIC KEY INFRASTRUCTURE
14.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft Windows Server 2003 Active Directory Infrastructure.
Security Management IACT 918 July 2004 Gene Awyzio SITACS University of Wollongong.
Silberschatz, Galvin and Gagne  Operating System Concepts Common System Components Process Management Main Memory Management File Management.
Firewall 2 * Essential Network Security Book Slides. IT352 | Network Security |Najwa AlGhamdi 1.
MCTS Guide to Microsoft Windows Server 2008 Network Infrastructure Configuration Chapter 11 Managing and Monitoring a Windows Server 2008 Network.
© 2010 VMware Inc. All rights reserved VMware ESX and ESXi Module 3.
Slide 1 of 9 Presenting 24x7 Scheduler The art of computer automation Press PageDown key or click to advance.
NDT Tools Tutorial: How-To setup your own NDT server Rich Carlson Summer 04 Joint Tech July 19, 2004.
Default: Zoom 65% then screenshot. DB XStudio tests Launcher DB XStudio XAgent tests Backup DB tests Launcher.
11 MAINTAINING THE OPERATING SYSTEM Chapter 5. Chapter 5: MAINTAINING THE OPERATING SYSTEM2 CHAPTER OVERVIEW Understand the difference between service.
Presented by INTRUSION DETECTION SYSYTEM. CONTENT Basically this presentation contains, What is TripWire? How does TripWire work? Where is TripWire used?
© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company All rights reserved. Security Strategies in Linux Platforms and.
Hands-on Networking Fundamentals
Maintaining a Microsoft SQL Server 2008 Database SQLServer-Training.com.
Term 2, 2011 Week 3. CONTENTS The physical design of a network Network diagrams People who develop and support networks Developing a network Supporting.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
ITEC224 Database Programming
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
11 MANAGING AND DISTRIBUTING SOFTWARE BY USING GROUP POLICY Chapter 5.
June 6 th – 8 th 2005 Deployment Tool Set Synergy 2005.
Module 10: Monitoring ISA Server Overview Monitoring Overview Configuring Alerts Configuring Session Monitoring Configuring Logging Configuring.
Unix System Administration Chuck Hauser
CGI Security COEN 351. CGI Security Security holes are exploited by user input. We need to check user input against Buffer overflows etc. that cause a.
INSTALLATION HANDS-ON. Page 2 About the Hands-On This hands-on section is structured in a way, that it allows you to work independently, but still giving.
TELE 301 Lecture 10: Scheduled … 1 Overview Last Lecture –Post installation This Lecture –Scheduled tasks and log management Next Lecture –DNS –Readings:
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Linux Networking Security Sunil Manhapra & Ling Wang Project Report for CS691X July 15, 1998.
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
Distributed System Concepts and Architectures 2.3 Services Fall 2011 Student: Fan Bai
Linux Security. Authors:- Advanced Linux Programming by Mark Mitchell, Jeffrey Oldham, and Alex Samuel, of CodeSourcery LLC published by New Riders Publishing.
Computing Division Requests The following is a list of tasks about to be officially submitted to the Computing Division for requested support. D0 personnel.
INFORMATION SYSTEM-SOFTWARE Topic: OPERATING SYSTEM CONCEPTS.
THE VISION OF AUTONOMIC COMPUTING. WHAT IS AUTONOMIC COMPUTING ? “ Autonomic Computing refers to computing infrastructure that adapts (automatically)
Chapter 2 Securing Network Server and User Workstations.
1 Linux Security. 2 Linux is not secure No computer system can ever be "completely secure". –make it increasingly difficult for someone to compromise.
Member: Wei-Jie Hsiao 、 Hui-Hsiung Chung Advisor: Quicy Wu Date: Mar.23 1.
SMS Software Distribution. Overview  Explaining How SMS Distributes Software  Managing Distribution Points  Configuring Software Distribution and the.
1 Chapter 9 Intruders. 2 Outline Intruders –Intrusion Techniques –Password Protection –Password Selection Strategies –Intrusion Detection Statistical.
INTRUSION DETECTION SYSYTEM. CONTENT Basically this presentation contains, What is TripWire? How does TripWire work? Where is TripWire used? Tripwire.
Mobile Agent Security Presented By Sayuri Yonekawa October 17, 2000.
Cyber Security Review, April 23-24, 2002, 0 Operated by the Southeastern Universities Research Association for the U.S. Depart. Of Energy Thomas Jefferson.
Distributed System Services Fall 2008 Siva Josyula
System Center Lesson 4: Overview of System Center 2012 Components System Center 2012 Private Cloud Components VMM Overview App Controller Overview.
© 2006 ITT Educational Services Inc. Linux Operating System :: Unit 3 :: Slide 1 Downloading and Installing Software yum pirut Bit Torrent rmp.
Trusted Operating Systems
Linux Operations and Administration
Configuring, Managing and Maintaining Windows Server® 2008 Servers Course 6419A.
Introduction to Operating Systems Prepared by: Dhason Operating Systems.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
By the end of this lesson you will be able to: 1. Determine the preventive support measures that are in place at your school.
Career Oriented SAP BASIS training in India,uk,usa Online | classroom| Corporate Training | certifications | placements| support CONTACT US: MAGNIFIC TRAINING.
1 Example security systems n Kerberos n Secure shell.
Lecturer: Eng. Mohamed Adam Isak PH.D Researcher in CS M.Sc. and B.Sc. of Information Technology Engineering, Lecturer in University of Somalia and Mogadishu.
System Components Operating System Services System Calls.
1.3 Operating system services An operating system provide services to programs and to the users of the program. It provides an environment for the execution.
SQL Database Management
Chapter 2: System Structures
IS3440 Linux Security Unit 6 Using Layered Security for Access Control
TRIP WIRE INTRUSION DETECTION SYSYTEM Presented by.
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Presentation transcript:

Configuration Management with Cfengine Steven Kreuzer NYC BSD Users Group July 2008

Configuration Management Configuration management facilities provide efficient solutions to complex problems. For example:  How do I manage configuration files?  How do I know maintenance tasks, such as, backups are completed at the right times in the right places?  How do I ensure that important system files are properly protected against unauthorized access and modification?

Host life cycle

What is Cfengine? “Cfengine … is an autonomous agent and a middle to high level policy language and agent for building expert systems to administrate and configure large computer networks.”

What to do with a tool like this… Ensure that files altered by package managers are correctly tailored and adjusted to perform in your environment. Verify that processes are (or aren’t) running. Monitor disk usage and provide warning when file-systems are full Search and identify file changes to maintain system security or for locating human error.

Components cfagent - interprets policy and implements in a convergent manner cfexecd – is a scheduler and wrapper, sends you . cfservd - server daemon for remote copy and execution cfrun - trivial helper app that polls hosts and tells them to run cfagent

Additional components cfenvd - state monitor, collects statistics for anomaly detection cfkey - generates public-private key pairs (once) on a host

Commonly Used Terms… Host – Server of any kind Classes – Group of hosts sharing a common policy (www_servers, db_servers, freebsd7_servers, openbsd41_servers) Policy – The description of a configuration Configuration – The state of files, processes, system resources on a host

Getting started Installing  On FreeBSD (and possibly OpenBSD) pkg_add –r cfengine cd /usr/ports/sysutils/cfengine && make install  From Source tar zxf cfegnine-${VERSION}.tar.gz cd cfengine-${VERSION}./configure make install

Getting it running on one host Things to think about  Writing a policy / configuration  Getting trusted communication working Autonomy: Always have a local copy of policy to minimize dependencies  Each host has /var/cfegine  bin, inputs, outputs, state Ultimately let Cfengine configure itself

Testing on a single host $ vi /var/cfengine/inputs/cfagent.conf control: actionsequence = ( shellcommands ) shellcommands: “/bin/echo Hello, World!” $ /usr/local/sbin/cfagent –f./cfagent.conf cfengine:erdinger:/bin/echo Hello: Hello, World!

Quick setup for multiple hosts Decide policy: cfagent.conf Distribute policy: cfservd.conf Setup clients to install themselves: update.conf Suppose /24 network

cfservd.conf control: domain = ( lab.exit2shell.com ) MaxConnections = ( 50 ) AllowConnectionsFrom = ( /24 ) TrustKeysFrom = ( /24 ) admit: /var/cfengine/inputs * /var/cfengine/ppkeys/localhost.pub *

cfagent.conf control: domain = ( lab.exit2shell.com ) schedule = ( Min10_15 Min30_35 Min50_55 ) ChecksumUpdates = ( on ) import: any:: cf.groups cf.site freebsd:: cf.freebsd

update.conf control: actionsequence = ( copy tidy ) domain = ( lab.exit2shell.com ) policyhost = ( erdinger ) master_cfinput = ( /var/cfengine/inputs ) workdir = ( /var/cfengine ) SplayTime = ( 10 ) # minutes copy: $(master_cfinput) dest=$(workdir)/inputs r=inf mode=700 type=checksum include=cf.* include=*.conf exclude=*.lst exclude=*.bak exclude=.* exclude=*~ exclude=#* server=$(policyhost) trustkey=true tidy: $(workdir)/outputs pattern=* age=7

cf.groups groups: web_servers = ( www0 www1 www2) db_servers = ( db0 db1 db2 )

cf.site (part 1) control: actionsequence = ( files tidy editfiles ) editfilesize = ( 0 ) any:: tmpdir = ( /tmp ) freebsd|openbsd:: shadowfile = ( /etc/master.passwd ) shadowpermissions = ( 600 ) filegroup = ( wheel ) crondir = ( /var/cron/tabs ) linux:: shadowfile = ( /etc/shadow ) shadowpermissions = ( 400 ) filegroup = ( root ) crondir = ( /var/spool/cron )

cf.site (part 2) files: any:: ${shadowfile} mode=$(shadowpermissions) owner=root group=$(filegroup) action=fixall /etc/passwd mode=644 owner=root group=$(filegroup) action=fixall

cf.site (part 3) tidy: any:: $(tmpdir) pattern=* age=7 recurse=inf rmdirs=sub /var/tmp pattern=* age=7 recurse=inf rmdirs=sub editfiles: any:: { /etc/services AppendIfNoSuchLine "cfengine 5308/tcp“ AppendIfNoSuchLine "cfengine 5308/udp“ }

cf.freebsd (part 1) control: ActionSequence = ( packages editfiles) DefaultPkgMgr = ( freebsd) FreeBSDInstallCommand = ( "/usr/sbin/pkg_add ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/ packages-7-stable/All/%s" ) FreeBSDRemoveCommand = ("/usr/sbin/pkg_delete %s" )

cf.freebsd (part 2) packages: freebsd.any:: pdksh p2_2.tbz action=install sudo _1.tbz action=install vim-lite _1.tbz action=install freebsd.web_servers:: apache tbz action=install memcached tbz action=install p5-DBD-Pg tbz action=install mod_perl _3,3.tbz action=install varnish tbz action=install freebsd.db_servers:: postgresql-client tbz action=install postgresql-server tbz action=install

cf.freebsd (part 3) editfiles: freebsd.any:: { /etc/rc.conf Backup "false" AppendIfNoSuchLine "sshd_enable=\"YES\"“ } freebsd.web_servers:: { /etc/rc.conf Backup "false“ AppendIfNoSuchLine "apache2_enable=\"YES\“” }

Special Thanks Mark Burgess  Wrote Cfengine  Borrowed heavily from his talks Jeremy Mates  Borrowed some slides from his talk

Questions