New XML policy generation tool
PATCH 1/1 New XML policy generation tool
I am submitting a patch (both in-line and as an attachment) for a new tool for inclusion in the Xen ACM security tools. This new tool provides 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.
Regards,
Tom
# HG changeset patch
# User [email protected]
# Node ID db5feb4ccc139017454bab0200ebbda988ef033f # Parent bdcb115c667a12a5514517456639142c1273b0f1
Addition of the xensec_gen tool, a web-based tool to aid in the creation/generation of security policy files for the Xen ACM security architecture.
tools/security/Makefile +24 -4
@@ -35,7 +35,7 @@ SRCS_GETD = get_decision.c OBJS_GETD := $(patsubst %.c,%.o,$(filter %.c,$(SRCS_GETD))) -ACM_INST_TOOLS = xensec_tool xensec_xml2bin +ACM_INST_TOOLS = xensec_tool xensec_xml2bin xensec_gen ACM_NOINST_TOOLS = get_decision ACM_OBJS = $(OBJS_TOOL) $(OBJS_XML2BIN) $(OBJS_GETD) ACM_SCRIPTS = getlabel.sh setlabel.sh updategrub.sh labelfuncs.sh
@@ -43,6 +43,12 @@ ACM_CONFIG_DIR = /etc/xen/acm-security ACM_POLICY_DIR = $(ACM_CONFIG_DIR)/policies ACM_SCRIPT_DIR = $(ACM_CONFIG_DIR)/scripts + +ACM_INST_HTML = python/xensec_gen/index.html +ACM_INST_CGI = python/xensec_gen/cgi-bin/policy.cgi \ + python/xensec_gen/cgi-bin/policylabel.cgi +ACM_SECGEN_HTMLDIR= /var/lib/xensec_gen +ACM_SECGEN_CGIDIR = $(ACM_SECGEN_HTMLDIR)/cgi-bin ACM_SCHEMA = security_policy.xsd ACM_EXAMPLES = null chwall ste chwall_ste
@@ -65,6 +71,15 @@ done $(INSTALL_DIR) -p $(DESTDIR)$(ACM_SCRIPT_DIR) $(INSTALL_PROG) -p $(ACM_SCRIPTS) $(DESTDIR)$(ACM_SCRIPT_DIR) + $(INSTALL_DIR) -p $(DESTDIR)$(ACM_SECGEN_HTMLDIR) + $(INSTALL_DATA) -p $(ACM_INST_HTML) $(DESTDIR)$(ACM_SECGEN_HTMLDIR) + $(INSTALL_DIR) -p $(DESTDIR)$(ACM_SECGEN_CGIDIR) + $(INSTALL_PROG) -p $(ACM_INST_CGI) $(DESTDIR)$(ACM_SECGEN_CGIDIR) +ifndef XEN_PYTHON_NATIVE_INSTALL + python python/setup.py install --home="$(DESTDIR)/usr" +else + python python/setup.py install --root="$(DESTDIR)" +endif else all:
@@ -72,22 +87,27 @@ endif build: mk-symlinks $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS) + python python/setup.py build chmod 700 $(ACM_SCRIPTS) xensec_tool: $(OBJS_TOOL) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ xensec_xml2bin: $(OBJS_XML2BIN) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ get_decision: $(OBJS_GETD) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ + +xensec_gen: xensec_gen.py + cp -f $^ $@ clean: $(RM) $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS) $(RM) $(ACM_OBJS) $(RM) $(PROG_DEPS) $(RM) -r xen + $(RM) -r build mrproper: clean
tools/security/example.txt +109 -0
112 lines not on this page · raw message
tools/security/python/setup.py new file +30 -0
@@ -0,0 +1,30 @@ +#!/usr/bin/python +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, +# or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +from distutils.core import setup +import os + +# This setup script is invoked from the parent directory, so base +# everything as if executing from there. +XEN_ROOT = "../.." + +setup(name = 'xensec_gen', + version = '3.0', + description = 'Xen XML Security Policy Generator', + package_dir = { 'xen' : 'python' }, + packages = ['xen.xensec_gen'], + )
tools/security/python/xensec_gen/cgi-bin/policy.cgi new file +1325 -0
1,325 lines not on this page · raw message
tools/security/python/xensec_gen/cgi-bin/policylabel.cgi new file +1396 -0
1,396 lines not on this page · raw message
tools/security/python/xensec_gen/index.html new file +126 -0
72 lines not on this page · raw message
tools/security/python/xensec_gen/main.py new file +185 -0
185 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
# HG changeset patch
# User [email protected]
# Node ID db5feb4ccc139017454bab0200ebbda988ef033f # Parent bdcb115c667a12a5514517456639142c1273b0f1
Addition of the xensec_gen tool, a web-based tool to aid in the creation/generation of security policy files for the Xen ACM security architecture.
tools/security/example.txt +109 -0
109 lines not on this page · raw message
tools/security/python/setup.py new file +30 -0
Lines of this file are not shown. View the raw message.
tools/security/python/xensec_gen/cgi-bin/policy.cgi new file +1325 -0
1,325 lines not on this page · raw message
tools/security/python/xensec_gen/cgi-bin/policylabel.cgi new file +1396 -0
1,396 lines not on this page · raw message
tools/security/python/xensec_gen/index.html new file +126 -0
126 lines not on this page · raw message
tools/security/python/xensec_gen/main.py new file +185 -0
185 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Part of the diff is not shown here. View the raw message.