Privilege Separation in Condor

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Overview of local security issues in Campus Grid environments Bruce Beckles University of Cambridge Computing Service.
Current methods for negotiating firewalls for the Condor ® system Bruce Beckles (University of Cambridge Computing Service) Se-Chang Son (University of.
Building a secure Condor ® pool in an open academic environment Bruce Beckles University of Cambridge Computing Service.
1 CS345 Operating Systems Φροντιστήριο Άσκησης 1.
Setting up of condor scheduler on computing cluster Raman Sehgal NPD-BARC.
28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
Phones OFF Please Processes Parminder Singh Kang Home:
1 Network File System. 2 Network Services A Linux system starts some services at boot time and allow other services to be started up when necessary. These.
UNIX Processes. The UNIX Process A process is an instance of a program in execution. Created by another parent process as its child. One process can be.
1 CS503: Operating Systems Part 1: OS Interface Dongyan Xu Department of Computer Science Purdue University.
1 Integrating GPUs into Condor Timothy Blattner Marquette University Milwaukee, WI April 22, 2009.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
Transparent Process Migration: Design Alternatives and the Sprite Implementation Fred Douglis and John Ousterhout.
Process Control. Module 11 Process Control ♦ Introduction ► A process is a running occurrence of a program, including all variables and other conditions.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
CamGrid: Experiences in constructing a university-wide, Condor-based, grid at the University of Cambridge Mark Calleja Bruce Beckles University of Cambridge.
Privilege separation in Condor Bruce Beckles University of Cambridge Computing Service.
© 2004 IBM Corporation IBM ^ z/VM Design considerations > Security > Performance (SIE)
G53SEC 1 Reference Monitors Enforcement of Access Control.
Linux Security. Authors:- Advanced Linux Programming by Mark Mitchell, Jeffrey Oldham, and Alex Samuel, of CodeSourcery LLC published by New Riders Publishing.
14.1/21 Part 5: protection and security Protection mechanisms control access to a system by limiting the types of file access permitted to users. In addition,
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
Distributed System Services Fall 2008 Siva Josyula
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
1 Lecture 19: Unix signals and Terminal management n what is a signal n signal handling u kernel u user n signal generation n signal example usage n terminal.
HTCondor Security Basics HTCondor Week, Madison 2016 Zach Miller Center for High Throughput Computing Department of Computer Sciences.
Chapter 29: Program Security Dr. Wayne Summers Department of Computer Science Columbus State University
Greg Quinn Computer Sciences Department University of Wisconsin-Madison Privilege Separation in Condor.
Multiprogramming. Readings r Chapter 2.1 of the textbook.
Computer System Structures
Securing Network Servers
Manuel Brugnoli, Elisa Heymann UAB
Interrupts and exceptions
Processes and threads.
HTCondor Security Basics
Operating Systems Protection Alok Kumar Jagadev.
Duncan MacMichael & Galen Deal CSS 534 – Autumn 2016
Dynamic Deployment of VO Specific Condor Scheduler using GT4
Process Management Process Concept Why only the global variables?
Chapter 3: Process Concept
Operating Systems (CS 340 D)
Mechanism: Limited Direct Execution
Module 4 Remote Login.
Chapter 2: System Structures
Outline Introduction Characteristics of intrusion detection systems
Intro to Processes CSSE 332 Operating Systems
Operating Systems (CS 340 D)
Chapter 4: Threads.
Chapter 27: System Security
Chapter 14: Protection.
ICS 143 Principles of Operating Systems
HTCondor Security Basics HTCondor Week, Madison 2016
Operating Systems Lecture 6.
Multithreading.
Process & its States Lecture 5.
Memory Management Tasks
Multithreaded Programming
Chapter 2: Operating-System Structures
Chapter 29: Program Security
Controlling Processes
Systems Update
Chapter 2: Operating-System Structures
Preventing Privilege Escalation
In Today’s Class.. General Kernel Responsibilities Kernel Organization
Presentation transcript:

Privilege Separation in Condor Bruce Beckles University of Cambridge Computing Service

What is privilege separation? Isolation of those parts of the code that run at different privilege levels root Condor daemons Condor job No privilege separation: root Condor daemons Condor job Privilege separation:

How do we do this? Privilege switching: root Condor job Condor daemons GNU userv allows one process to invoke another (in either the same or a different user context) in a secure fashion when only limited trust exists between them (see http://www.gnu.org/software/userv/).

Who does what? Execute hosts: Submit hosts: Central manager: Change ownership of any file (CAP_CHOWN capability) Switch to any user context (CAP_SETUID capability) Send signals to any process (CAP_KILL capability) Submit hosts: Central manager: No privilege switching required (unless GSI authentication is being used, in which case need to be able to switch to any user context (CAP_SETUID capability)) (Note that if you have the ability to switch to any user context you effectively have the ability to send signals to any process.)

Current Status (1) Only implemented on execute hosts Uses GNU userv for “privilege switching” Uses standard Condor facility (USER_JOB_WRAPPER) to pass the Condor job to a “wrapper” script, which is then responsible for executing the job Some limitations (details later) In use at the University of Cambridge

Details – Execute host No Condor daemon or process runs as root Condor passes job to our wrapper script Our script installs a signal handler to intercept Condor’s signals to the job Our script changes the ownership of the job’s files (via userv) as necessary at beginning and end of job Our script fork()’s a userv process which runs the job in a different (also non-privileged) user context On receipt of a signal from Condor, our script calls userv to send the signal to the job userv uses pipes to pass the job’s standard output and standard error back to our script (and so to Condor) A cron job (using Condor’s STARTD_CRON mechanism) runs once a minute to make sure that if there is no job executing then there are no processes running in our dedicated “Condor job” user context

What does this gain us? If there is a vulnerability in Condor then the entire machine is not compromised as a result. We do not have any Condor processes, whose real user ID is root, listening to the network. Much greater control over the job’s execution environment – could run the job chroot’d if desired. Our wrapper script can examine the job and make more sophisticated decisions about whether or not to run it (restrict to local executables, etc.) If a Condor job leaves behind any processes running after job completion they will be killed – normally, Condor only does this properly if specially configured (EXECUTE_LOGIN_IS_DEDICATED).

What do we lose? Can no longer suspend jobs (cannot catch SIGSTOP) We now need to handle passing the job environment variables, setting resource limits and scheduling priority, etc., which Condor would normally handle Condor can no longer correctly distinguish between the load Condor processes and Condor jobs are putting on the machine, and the load generated by other processes Information returned by Condor about the job’s CPU utilization, etc. is incorrect Does not yet work with Condor’s Standard universe (although this may not be difficult to fix)

Current Status (2) Implemented using shell scripts and GNU userv No source code changes to Condor In active development Continual testing Scripts available on request (but no support!)

Future plans Many of these limitations can be addressed by modifying the Condor source code Working with the Condor Team to integrate privilege switching into the Condor source code – will hopefully appear in the development series sometime Investigating privilege separation for submit hosts

Questions? Thank you. Questions?