Commit Graph

721 Commits

Author SHA1 Message Date
Chris PeBenito 4f6f347d4c Module version bump and changelog for hadoop ipsec patch from Paul Nuzzi. 2011-01-13 13:50:47 -05:00
Chris PeBenito 2810bc1455 Rearrange new hadoop/ipsec interfaces. 2011-01-13 13:09:25 -05:00
Chris PeBenito 371908d1c8 Rename new hadoop ipsec interfaces. 2011-01-13 12:56:12 -05:00
Paul Nuzzi 6237b7241b hadoop: labeled ipsec
On 01/05/2011 08:48 AM, Christopher J. PeBenito wrote:
> On 12/16/10 12:32, Paul Nuzzi wrote:
>> On 12/15/2010 03:54 PM, Christopher J. PeBenito wrote:
>>> On 12/10/10 18:22, Paul Nuzzi wrote:
>>>> Added labeled IPSec support to hadoop.  SELinux will be able to enforce what services are allowed to
>>>> connect to.  Labeled IPSec can enforce the range of services they can receive from.  This enforces
>>>> the architecture of Hadoop without having to modify any of the code.  This adds a level of
>>>> confidentiality, integrity, and authentication provided outside the software stack.
>>>
>>> A few things.
>>>
>>> The verb used in Reference Policy interfaces for peer recv is recvfrom
>>> (a holdover from previous labeled networking implementations).  So the
>>> interfaces are like hadoop_recvfrom_datanode().
>>
>> Easy change.
>>
>>> It seems like setkey should be able to setcontext any type used on ipsec
>>> associations.  I think the best thing would be to add additional support
>>> to either the ipsec or corenetwork modules (I haven't decided which one
>>> yet) for associations.  So, say we have an interface called
>>> ipsec_spd_type() which adds the parameter type to the attribute
>>> ipsec_spd_types.  Then we can have an allow setkey_t
>>> ipsec_spd_types:association setkey; rule and we don't have to update it
>>> every time more labeled network is added.
>>
>> That seems a lot less clunky than updating setkey every time we add a new association.
>>
>>> This is definitely wrong since its not a file:
>>> +files_type(hadoop_lan_t)
>>
>> Let me know how you would like to handle associations and I could update the
>> patch.
>
> Lets go with putting the associations in corenetwork.
>
>>  Will the files_type error be cleared up when we re-engineer this?
>
> I'm not sure what you mean.  The incorrect rule was added in your patch.
>

Adds labeled IPSec policy to hadoop to control the remote processes that are allowed to connect to the cloud's services.

Signed-off-by: Paul Nuzzi <pjnuzzi@tycho.ncsc.mil>
2011-01-13 08:22:32 -05:00
Chris PeBenito 1c2e52e43f Module version bump and changelog for hadoop CDH3 patchset. 2011-01-05 10:23:02 -05:00
Chris PeBenito 60ca2bd83b Rearrange some lines in hadoop. 2011-01-05 10:22:10 -05:00
Chris PeBenito a45657403b Whitespace fixes in hadoop. 2011-01-05 09:36:13 -05:00
Paul Nuzzi fcb67e8cef hadoop: update to CDH3
On 12/15/2010 03:17 PM, Christopher J. PeBenito wrote:
> On 12/13/10 10:39, Paul Nuzzi wrote:
>> On 12/11/2010 04:01 AM, Dominick Grift wrote:
>> On 12/11/2010 12:22 AM, Paul Nuzzi wrote:
>>
>> Does hadoop depend on kerberos? If no then kerberos_use should probably
>> be optional.
>>
>>
>>> The new version of hadoop added Kerberos for authentication.
>
> So, to be explicit, its an unconditional requirement?

Yes.  I think all future versions of hadoop will be kerberos enabled.

> It seems like there should be a hadoop_home_t that is
> userdom_user_home_content()

Updated.

Signed-off-by: Paul Nuzzi <pjnuzzi@tycho.ncsc.mil>
2011-01-05 09:35:40 -05:00
Chris PeBenito 7c4fbeba94 Fixes for samhain init_system_domain() usage. 2010-12-16 09:03:51 -05:00
Chris PeBenito e50a2becc6 Fix samhain range transitions for MLS/MCS and a type transition conflict. 2010-12-15 14:06:58 -05:00
Chris PeBenito 5d8270c9e4 Cleanup samhain.if.
* Rearrange rules in the template.
* Remove samhain_etc_t:dir perms since there are no such dirs.
* Add extra docs in samhain_domtrans().
* Include samhaind_t in admin interface process perms.
2010-12-15 11:25:57 -05:00
Chris PeBenito e579703142 Move samhain domain declarations into its template. 2010-12-15 11:13:18 -05:00
Chris PeBenito 40bc40b152 Whitespace fixes in samhain. 2010-12-15 11:01:12 -05:00
Harry Ciao b2f8897d9c Add support for the samhain program.
Note, extra privileges may need to be granted to the samhain domain
if its default configuration file(/etc/samhainrc) is changed.

The samhain program could be used in the following way:

(In secadm_r role)
1. Initialize filesystem signature database:
newrole -l s15:c0.c1023 -p -- -c "samhain -t init"

(Note, the current secadm console will be blocked until
the database is completed)

2. Start samhain deamon to check filesystem integrity
newrole -l s15:c0.c1023 -p -- -c "samhain -t check -D"

3. Update filesystem signature database:
newrole -l s15:c0.c1023 -p -- -c "samhain -t update"

(In sysadm_r role)
1. Start samhain in daemon mode:
run_init /etc/init.d/samhain start

2. Stop samhain daemon:
run_init /etc/init.d/samhain stop

3. Check samhain daemon status:
run_init /etc/init.d/samhain status

4. Read/write samhain log files:
newrole -l s15:c0.c1023 -p -- -c "cat /var/log/samhain_log"

5. Remove samhain database files
newrole -l s15:c0.c1023 -p -- -c "rm /var/lib/samhain/samhain_file"

Note:
1. Stop samhain daemon before updating signature database.
2. Don't try to start samhain daemon twice.
3. Need to toggle SELinux into the Permissive mode in order to remove
   the samhain_log files from /var/log/.

Signed-off-by: Harry Ciao <qingtao.cao@windriver.com>
2010-12-15 10:57:12 -05:00
Chris PeBenito 826d014241 Bump module versions for release. 2010-12-13 09:12:22 -05:00
Chris PeBenito b08f1df144 Module version bump for portreserve. 2010-11-19 14:31:33 -05:00
Jeremy Solt 10143f3432 portreserve patch from Dan Walsh
"Add _admin domain."
2010-11-19 14:26:55 -05:00
Chris PeBenito 9e5e9d677c Module version bump for privoxy. 2010-11-19 14:05:55 -05:00
Jeremy Solt 4eef036424 privoxy patch from Dan Walsh
"split out squid port from http_cache.  Need to allow all places that
connect to httpc_cache to connect to squid_port"

Edits:
 - Removed tunable tabbing
2010-11-19 14:05:55 -05:00
Chris PeBenito aa28f9239a Module version bump for radius. 2010-11-19 11:59:35 -05:00
Chris PeBenito 5c2355147f Module version bump for smokeping. 2010-11-19 11:59:06 -05:00
Jeremy Solt 820ba61d9b smokeping patch from Dan Walsh
"smokeping tries to read shadow"
2010-11-19 11:59:05 -05:00
Jeremy Solt 781393fbe9 radius patch from Dan Walsh
"radious execs ntml_auth
tmpfs /var/run"
2010-11-19 11:59:05 -05:00
Chris PeBenito e6e42cd4c9 Module version bump for ulogd. 2010-11-19 11:39:51 -05:00
Chris PeBenito b9a562446d Move all ulogd networking into the mysql and postgres optionals. 2010-11-19 11:39:36 -05:00
Jeremy Solt a00839dcc1 ulogd patch from Dan Walsh
"communicates with mysql and postgres via the network"
2010-11-18 13:26:19 -05:00
Chris PeBenito 8d4ee022e6 Module version bump for usbmuxd. 2010-11-17 11:00:12 -05:00
Jeremy Solt e6b13f9e1e usbmuxd patch from Dan Walsh
"Lots of stuff labeled var_run_t"
2010-11-17 11:00:12 -05:00
Chris PeBenito 289f1d3c32 Module version bump for uucp. 2010-11-17 10:21:17 -05:00
Jeremy Solt e7d6384c07 uucp patch from Dan Walsh
"Executes ssh to setup connection"
2010-11-17 10:21:17 -05:00
Chris PeBenito 00ea7bbb84 Module version bump for varnishd. 2010-11-17 10:05:36 -05:00
Jeremy Solt 2e2f2cbe04 varnishd patch from Dan Walsh
"Kills it self
+ varnishd_read_lib_files(services_munin_plugin_t)"
2010-11-17 10:02:11 -05:00
Chris PeBenito 239e8e214e AIDE can be configured to log to syslog 2010-11-05 13:13:42 -04:00
Chris PeBenito c1229a8232 Module version bump for oident. Additional comments for kernel loading. 2010-10-27 15:36:01 -04:00
Jeremy Solt 306d488a52 oident patch from Dan Walsh 2010-10-27 15:17:12 -04:00
Chris PeBenito 7ff21090c1 Additional rearrangement in tor and module version bump. 2010-10-27 15:06:13 -04:00
Jeremy Solt 2925b799f6 tor patch from Dan Walsh
Added additional access for dns server (bind on the port shouldn't be enough)
2010-10-27 15:06:13 -04:00
Chris PeBenito f1b2add393 Module version bump for asterisk. 2010-10-21 09:56:49 -04:00
Jeremy Solt c152763d6e asterisk patch from Dan Walsh 2010-10-21 09:56:49 -04:00
Chris PeBenito 1e75e83f2c Module version bump for bitlbee. 2010-10-18 09:51:21 -04:00
Chris PeBenito 5f61db128e Module version bump for apcupsd patch. 2010-10-18 09:51:21 -04:00
Chris PeBenito 51dda6eae0 Module version bump for avahi patch. 2010-10-18 09:51:21 -04:00
Jeremy Solt d20e128bbe Avahi patch from Dan Walsh
Dropped file read from dbus_chat
2010-10-18 09:51:21 -04:00
Jeremy Solt 31c003045e apcupsd patch from Dan Walsh 2010-10-18 09:51:21 -04:00
Jeremy Solt 05ca5f7b59 bitlbee patch from Dan Walsh 2010-10-18 09:51:20 -04:00
Chris PeBenito befc7ec99f Module version bump for Dominick's consoletype cleanup. 2010-10-11 09:27:27 -04:00
Dominick Grift 6ea380d622 consoletype: needs to use system dbus file descriptors.
Signed-off-by: Dominick Grift <domg472@gmail.com>
2010-10-11 09:13:47 -04:00
Chris PeBenito 2f8f8e1368 Typo fix in hadoop. 2010-10-07 12:31:41 -04:00
Chris PeBenito 641ac05468 Hadoop cleanup and module version bump.
* a pass cleaning up the style.
* adjusted some regular expressions in the file contexts: .* is the same as (.*)? since * means 0 or more matches.
* renamed a few interfaces
* two rules that I dropped as they require further explanation

> +files_read_all_files(hadoop_t)

A very big privilege.

and

> +fs_associate(hadoop_tasktracker_t)

This is a domain, so the only files with this type should be the /proc/pid ones, which don't require associate permissions.
2010-10-07 10:57:55 -04:00
Paul Nuzzi bc71a042d8 hadoop 1/10 -- unconfined
On 10/04/2010 02:18 PM, Christopher J. PeBenito wrote:
> On 10/04/10 13:15, Paul Nuzzi wrote:
>> On 10/01/2010 01:56 PM, Christopher J. PeBenito wrote:
>>> On 10/01/10 11:17, Paul Nuzzi wrote:
>>>> On 10/01/2010 08:02 AM, Dominick Grift wrote:
>>>>> On Thu, Sep 30, 2010 at 03:39:40PM -0400, Paul Nuzzi wrote:
>>>>>> I updated the patch based on recommendations from the mailing list.
>>>>>> All of hadoop's services are included in one module instead of
>>>>>> individual ones.  Unconfined and sysadm roles are given access to
>>>>>> hadoop and zookeeper client domain transitions. The services are started
>>>>>> using run_init.  Let me know what you think.
>>>>>
>>>>> Why do some hadoop domain need to manage generic tmp?
>>>>>
>>>>> files_manage_generic_tmp_dirs(zookeeper_t)
>>>>> files_manage_generic_tmp_dirs(hadoop_t)
>>>>> files_manage_generic_tmp_dirs(hadoop_$1_initrc_t)
>>>>> files_manage_generic_tmp_files(hadoop_$1_initrc_t)
>>>>> files_manage_generic_tmp_files(hadoop_$1_t)
>>>>> files_manage_generic_tmp_dirs(hadoop_$1_t)
>>>>
>>>> This has to be done for Java JMX to work.  All of the files are written to
>>>> /tmp/hsperfdata_(hadoop/zookeeper). /tmp/hsperfdata_ is labeled tmp_t while
>>>> all the files for each service are labeled with hadoop_*_tmp_t.  The first service
>>>> will end up owning the directory if it is not labeled tmp_t.
>>>
>>> The hsperfdata dir in /tmp certainly the bane of policy writers.  Based on a quick look through the policy, it looks like the only dir they create in /tmp is this hsperfdata dir.  I suggest you do something like
>>>
>>> files_tmp_filetrans(hadoop_t, hadoop_hsperfdata_t, dir)
>>> files_tmp_filetrans(zookeeper_t, hadoop_hsperfdata_t, dir)
>>>
>>> filetrans_pattern(hadoop_t, hadoop_hsperfdata_t, hadoop_tmp_t, file)
>>> filetrans_pattern(zookeeper_t, hadoop_hsperfdata_t, zookeeper_tmp_t, file)
>>>
>>
>> That looks like a better way to handle the tmp_t problem.
>>
>> I changed the patch with your comments.  Hopefully this will be one of the last updates.
>> Tested on a CDH3 cluster as a module without any problems.
>
> There are several little issues with style, but it'll be easier just to fix them when its committed.
>
> Other comments inline.
>

I did my best locking down the ports hadoop uses.  Unfortunately the services use high, randomized ports making
tcp_connect_generic_port a must have.  Hopefully one day hadoop will settle on static ports.  I added hadoop_datanode port 50010 since it is important to lock down that service.  I changed the patch based on the rest of the comments.

Signed-off-by: Paul Nuzzi <pjnuzzi@tycho.ncsc.mil>
2010-10-07 08:07:16 -04:00