Commit Graph
41 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain 7f6d8fe5c9 acm: Provide the possibility to choose the VM label of domain-0 in the
kernel line in grub.conf. The format is
ssidref=<ssidref>:sHype:<policy name>:<vm label>. The name of the
policy specified here must be the same name as the in the policy
provided as a module during boot, otherwise the policy will not be
accepted and the system then starts without a policy. The user tool
for 'xm dumppolicy' has been adapted to show which entry in the binary
policy is used by domain-0.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-03-29 19:26:13 +01:00
kfraser@localhost.localdomain a10e171a41 [ACM] Allow version information to be embedded in the XML representation of
the ACM policy. The translation tool has been adapted to parse the
version found in the XML representation and put it into the binary
policy. Xen has been adapted to remember the version information and
report it when asked for the current policy.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-03-28 14:00:56 +01:00
Ewan Mellor 1bf63f099d This patch replaces tab with 4 whitespaces in xensec_gen/main.py.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-03-26 14:10:19 +01:00
kfraser@localhost.localdomain 9de4f0c67d tools: Clean up use of 'install' command.
- convert raw "install" command to use $(INSTALL)
- convert some $(INSTALL) to $(INSTALL_DATA) as appropriate
- modify the specific $(INSTALL) definitions to use -p.

Original patch by Ben Thomas <ben@virtualiron.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-07 10:49:20 +00:00
Christian Limpach b4dd69c689 [tools] Use auxbin.py to determine libpath at build time.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2007-03-05 19:22:21 +00:00
kfraser@localhost.localdomain 5c4256ca47 [ACM] Update the xensec_ezpolicy ACM policy generation tool so
that it works with wxPython under Python 2.5.
Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2007-02-15 14:20:05 +00:00
Ian Campbell 8e84e3f524 [TOOLS] Fix foreign header build breakage.
Having both the Xen tree and the tools tree recurse into the foreign
headers directory causes headaches in parallel builds and when
building 32-bit tools + 64 bit Xen in the same tree.

Therefore we cause mk-symlinks to symlink in the foreign headers build
bits and generate a local version of the headers and checker tool.

Only libxc needs to do this since the other tools were actually
picking up the libxc version of the headers anyway so the mk-symlinks
calls can be removed from these components.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-31 10:25:12 +00:00
kfraser@localhost.localdomain 5ed80a6a52 [ACM] Documentation cleanup.
This patch eliminates redundant security tools information that was
integrated into the Xen user guide and the xm man page.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-10-20 10:48:34 +01:00
kfraser@localhost.localdomain 81ba8bb990 [ACM] Fix binary alignment in tools.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-10-18 17:29:08 +01:00
kfraser@localhost.localdomain 2f04c3f01e [ACM] Keep stream aligned.
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-10-18 17:17:15 +01:00
kaf24@localhost.localdomain b643712258 [XEND] Move all of the various log files created by xen to
be under /var/log/xen instead of under /var/log directly.  This has
the advantage of cleaning things up a little and also can make it
easier to restrict the permissions needed by xend.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2006-08-28 13:05:00 +01:00
kfraser@localhost.localdomain 33ac7e69c8 [ACM] A wxPython GUI tool for sHype/ACM in Xen. It is used
and described in the user guide to demonstrate how to quickly create, 
enforce, and test workload protection policies in Xen. The tool is aimed 
to improve usability of sHype/ACM for Xen.It is included in a single 
file to make it easy to try it out on different platforms (it inherits 
the look and feel of the base platform). It is tested on Linux and 
Windows. Please read the new user guide section about how to start and 
use the tool (section 10.2).

Requirements: python (www.python.org), wxPython (www.wxpython.org or
try 'yum install wxPython').

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-07-31 18:12:53 +01:00
kaf24@firebug.cl.cam.ac.uk ffa0b25d43 [ACM] Complete the conversion of acm_ops using Xen handles instead
of void pointers. It also fixes a recently slipped in acm bug that hangs 
Xen when a domain is destroyed.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-06-17 08:38:35 +01:00
kaf24@firebug.cl.cam.ac.uk df70dfb525 [ACM] Provide the framework needed for resource labeling.
Subsequent patches will follow in the coming weeks that will enable 
Xen ACM to control assignment of resources (e.g., block devices and 
networking) to virtual machines based on resource labels and the 
active security policy.

Signed-off-by: Bryan D. Payne <bdpayne@us.ibm.com>
Signed-off-by: Reiner Sailer <sailer@us.ibm.com>
2006-06-13 15:38:58 +01:00
kaf24@firebug.cl.cam.ac.uk 630ad4e0ad [ACM] Replace the union structure parameter of the ACM hypercalls
with command-specific request structures. It aligns the ACM
hypercalls with the way parameters are passed in the event channel
hypercalls.

Advantages include backward-compatibility regarding old guests when
new calls are added and clarity of the code.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-05-21 19:05:31 +01:00
kaf24@firebug.cl.cam.ac.uk 1d7579804b This small patch fixes new make-dependencies of the secpol_tool
Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-05-10 15:49:47 +01:00
kaf24@firebug.cl.cam.ac.uk 2d0922d515 Move Linux-specific privcmd code into private libxc implementations.
Make header path for kernel's privcmd/evtchn headers generic.
Remove pointless xi_*() interface that was using private libxc
interfaces.

Signed-off-by: John Levon <john.levon@sun.com>
2006-05-02 15:12:06 +01:00
smh22@firebug.cl.cam.ac.uk 2c04b08df9 Add new xml files for policy.
Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 11:01:41 +01:00
smh22@firebug.cl.cam.ac.uk 655ead6573 This patch updates the documentation and extends the 'xm' man page with
the integrated access control management commands. The man page is a 
good place to start exploring these commands.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:59:57 +01:00
smh22@firebug.cl.cam.ac.uk e7f4f3a1de This patch adds new python access control management scripts, which
integrate into Xen Management and which support the new access control 
labels (labels replace the ssidref numbers at the management user 
interface).

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:58:25 +01:00
smh22@firebug.cl.cam.ac.uk 2d59e34fc2 This patch deletes the old shell-based security tools.
Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:54:47 +01:00
smh22@firebug.cl.cam.ac.uk 1f11fdecb1 This patch adds support for managing and creating the simplified
policies to the policy generation tools.

Signed-off by: Thomas Lendacky <toml@us.ibm.com>
Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:52:19 +01:00
smh22@firebug.cl.cam.ac.uk 30476c8dba This patch adds support in the hypervisor for the policy name attribute
introduced into security policies. It also fixes a minor problem related 
to handling unsupported boot policies.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:51:50 +01:00
smh22@firebug.cl.cam.ac.uk c462e5c2f0 This patch adds a policy name to the policy definition. This policy name
must be unique and must change if the content of the file changes. The 
policy name is used to ensure that the XM tools and the hypervisor work 
on the same policy, i.e., interpret the security information on domains 
consistently. This patch also simplifies the policy management by moving 
policy and labels into a single file.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:50:38 +01:00
emellor@leeni.uk.xensource.com 6b884f9876 This fixes a path problem with the current ACM scripts.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-04-19 22:52:34 +01:00
kaf24@firebug.cl.cam.ac.uk b5fa90ac8e build: Clean up use of .PHONY
* Move .PHONY directives next to targets,
  this makes them a lot harder to miss
* Add missing .PHONY directives
* Remove nonexistent .PHONY directives
* Hopefully I didn'T miss anything...

Signed-Off-By: Horms <horms@verge.net.au>
2006-04-10 17:02:49 +01:00
kaf24@firebug.cl.cam.ac.uk d27fbb0061 Move 'debug' build option into the outermost Config.mk file.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-09 22:31:45 +01:00
kaf24@firebug.cl.cam.ac.uk 326450f67e Clean up the usage of CFLAGS. This is nice for packagers, who would
like to control the base compilation flags from a central place.

Signed-off-by: Charles Coffing <ccoffing@novell.com>
2006-03-09 21:17:45 +01:00
toml@tomlt2.austin.ibm.com 0e6f8cf5f7 Adding __init__.py file to remove build warning.
It turns out the hg export command does not include zero
size files in the generated diff and this was overlooked.
2006-01-24 17:59:54 +01:00
kaf24@firebug.cl.cam.ac.uk f0756c96a0 A new ACM security tool providing support to aid in the
creation/generation of the XML security policy files for the Xen ACM
security architecture.  It is a python- based, web-based tool named
xensec_gen that allows users to create or modify XML policy files
through a browser.  The resulting XML policy files can then be copied
or moved to the appropriate location in the /etc/xen/acm-security
directory structure in order to be translated into binary and used
within the Xen system.

Signed-off-by: Tom Lendacky <toml@us.ibm.com>
2005-12-13 17:12:59 +01:00
emellor@leeni.uk.xensource.com 548733e866 The attached patch makes a couple of changes to the ACM security tools
and installation. Particularly it does the following:
- the Makefile installs the ACM security-related tools
into /etc/xen/acm-security
- improves and cleans up some of the tools
- updates the documentation

Signed-off-by: Tom Lendacky <toml@us.ibm.com>
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-12-08 18:21:05 +00:00
cl349@firebug.cl.cam.ac.uk 016ef02e87 Move mk-symlinks target into tools/Rules.mk.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-11-28 18:07:22 +01:00
kaf24@firebug.cl.cam.ac.uk ac5d4d868f Enable the Xen hypervisor ACM security policy to be determined at boot
time (instead of at compile time). Allows a single xen.gz binary to
run under different security policy types, which simplifies
distributions considerably. To this end, we replace the current single
compile switch in Config.mk with the following two:

1. ACM_SECURITY (y/n) if "n", then the ACM is not compiled and no security 
policies can be configured at boot time. If "y", then the ACM is compiled 
and can be configured into any of the available policy types (null, 
chwall, ste, chwall_ste) by specifying a valid boot policy .bin file in 
the grub boot configuration.

2. ACM_DEFAULT_SECURITY_POLICY (null / chwall / ste / chwall_ste) 
specifies the policy into which Xen defaults in the case that security is 
enabled but no boot policy file is specified, or the specified policy file 
is invalid (wrong version, magic, corrupted, ...)

While the type of the enabled policy (null, ste, ...) is decided once 
during boot for the whole boot cycle, the policy instantiation can be 
changed during operation as usual with the security tools.

Signed-off by: Tomas Lendacky <toml@us.ibm.com>
Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2005-11-19 10:35:38 +01:00
kaf24@firebug.cl.cam.ac.uk a7da7a4ecb The attached patch fixes 2 issues with the scripts written for the Xen
access control module and makes the tools more self-explanatory.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-10-27 17:27:04 +01:00
kaf24@firebug.cl.cam.ac.uk cc677c9d4e This patch to the Xen access control module (ACM) and tools:
1. adapts ACM hooks to the slightly changed event channel structure
  2. introduces an ACM_GETDECISION command, which enables authorized 
domains to retrieve policy decisions regarding the sharing of resources 
(STE policy) from the Xen hypervisor
  3. includes cleanup (warnings I found when applying  analysis tools such 
as beam or flawfinder to the ACM code)

 The get_decision function is useful to enforce:
   *  the security policy on network traffic  in the network backends in 
domain 0; currently there is no enforcement in Dom0 and all packets flow 
freely
   *  the security policy in block device backends to control which 
domains can access which vdisk resources

I have added a small test program that shows how to use the get_decision 
ACM interface call, it is in tools/security/get_decision.c and will be 
compiled together with the policy tools. As usual, the ACM is unconfigured 
until you switch on a security policy on in Config.mk.

Signed-off: Reiner Sailer <sailer@us.ibm.com>
2005-10-20 21:37:15 +01:00
kaf24@firebug.cl.cam.ac.uk d8263e8dba Fix Xen public interfaces and the tools to consistently
use stdint-format bitsize types (uint32_t and friends).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-12 11:07:37 +01:00
kaf24@firebug.cl.cam.ac.uk 4e84295e08 New scripts I missed from previous security patch. 2005-09-02 08:06:59 +00:00
kaf24@firebug.cl.cam.ac.uk 7e9596058b This patch:
* adds a get_ssid ACM command that allows privileged domains to retrieve 
types for either a given ssid reference or a given domain id (of a running 
domain); this command can be used to extend access control into device 
domains, e.g., to control network traffic currently moving through Domain 
0 uncontrolled by the ACM policy

* adds a script getlabel.sh that allows users inside Dom0 to retrieve the 
label for a given ssid reference or a given domain id (multiple labels 
might map onto a single ssid reference)

* cleans up label-related code in tools/security by merging common 
functions into labelfuncs.sh

* cleans up ACM code related to above changes (eventually approximating a 
common coding style)

Signed-off-by Reiner Sailer <sailer@us.ibm.com> 
Signed-off by Stefan Berger <stefanb@us.ibm.com>
2005-09-02 07:59:12 +00:00
kaf24@firebug.cl.cam.ac.uk 39ec3e6c6a This patch:
* adds a C-based security policy translation tool to Xen (secpol_xml2bin) 
and removes the current Java 
security policy translator (Java dependencies).  The C-based tool 
integrates into the Xen source tree build 
and install (using gnome libxml2 for XML parsing). See install.txt.

* introduces security labels and related tools. Users can now use 
semantic-rich label names to put security-tags 
on domains. See example.txt, policy.txt.

* moves the security configuration (currently ACM_USE_SECURITY_POLICY) 
from xen/Rules.mk 
into a separate top-level Security.mk file  (it is needed by the 
tools/security and xen/acm).

Both xen/acm and tools/security are built during the Xen build process 
only if ACM_USE_SECURITY_POLICY 
is not ACM_NULL_POLICY (which is the default setting).

Signed-off-by Reiner Sailer <sailer@us.ibm.com>
Signed-off by Stefan Berger <stefanb@us.ibm.com>
Signed-off by Ray Valdez <rvaldez@us.ibm.com>
2005-08-19 09:03:17 +00:00
kaf24@firebug.cl.cam.ac.uk 3184c77cda Memory leak in xc_linux_save, and uninitialised var
in secpol_tool.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
2005-08-11 22:12:11 +00:00
smh22@firebug.cl.cam.ac.uk 6b3b33d853 Remainder of ACM patch (hgrrrr).
Signed-off-by: Reiner Sailer <sailer@watson.ibm.com>
Signed-off-by: Steven Hand <steven@xensource.com>
2005-08-02 10:15:17 +00:00