All of lore.kernel.org
 help / color / mirror / Atom feed
From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [ v3 PATCH 5/8] Gitweb, cgit and the git_content attribute
Date: Wed, 31 Aug 2011 10:48:20 -0400	[thread overview]
Message-ID: <4E5E49B4.5010009@tresys.com> (raw)
In-Reply-To: <20110830171530.GB6861@localhost.localdomain>

On 08/30/11 13:15, Dominick Grift wrote:
> On Tue, Aug 30, 2011 at 09:23:51AM -0400, Christopher J. PeBenito wrote:
>> On 08/26/11 12:14, Dominick Grift wrote:
>>> On Fri, Aug 26, 2011 at 09:35:45AM -0400, Christopher J. PeBenito wrote:
>>>> On 08/24/11 08:35, Dominick Grift wrote:
>>>>> Cgit and gitweb are both cgi web applications that run in the httpd_git_script_t apache CGI domain.
>>>>> The policy in this commit was taken from Fedora. It is well tested i believe.
>>>>> These web applications display Git repositories. And they Should be able to read any Git
>>>>> repository whether shared or personal. We implemented another attribute for it called git_content.
>>>>
>>>> Really all repos?  It seems like access to user repos should be tunable.
>>>
>>> I guess it could be tunable but is it really worth that? i mean these git webapps are made to read git content. thats their sole purpose. We could
>>> +implement a tunable for access to git_user_content_t but it seems a bit overdone.
>>
>> I understand what you're saying, I'm just thinking that there could be a server
>> that has several "system" repos, but have personal user dev repos that shouldn't
>> be exported.
> 
> Ok if you want it that way i can do that to. I can't say i agree. I would call this over engineering. You can configure git to specify which repositories to export and we also have good old dac.

I might agree that it was overengineering except that system and user repos have different trust and integrity levels, otherwise they'd be the same type.  So if you don't trust your users, you might want to enforce that the system daemon can't touch user repos nor risk mixing of system and user repos.  Alternatively, you could argue that user repos are more sensitive than system repos, and you might not want to allow them to be exported.

>>> But if you want it tunable it will be my please to submit a follow up patch to fix this or a replacement.
>>>
>>> By the way i already mentioned this but this httpd cgi domains should be in httpd.te. because it makes for example the git module dependent on the
>>> +apache module whilst, git can work fine without httpd.
>>
>> You could put that all in an optional.
> 
> You cannot make a file context specification optional.
> 
> if you make an apache content template call optional, for example:
> 
> optional_policy(`
> apache_content_template(git)
> ')
> 
> /var/www/cgi-bin/git\.pl -- gen_context(system_u:object_r:httpd_git_script_exec_t,s0)
> 
> Than it is effectively not optional, because if you decide to disable or de-install the apache module, then the git module will blow up due to the type used in the file context file specification (httpd_git_script_exec_t)
> 
> it should be in the apache module instead.

A valid point.  I guess you have to make it unconditional.  Or move it into a separate module.  I can live with that.

-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

  reply	other threads:[~2011-08-31 14:48 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-24 12:35 [refpolicy] [ v3 PATCH 0/8] Git daemon domain Dominick Grift
2011-08-24 12:35 ` [refpolicy] [ v3 PATCH 1/8] Git inetd service domain and a primage Git shared repository type Dominick Grift
2011-08-24 12:35 ` [refpolicy] [ v3 PATCH 2/8] Git personal repositories Dominick Grift
2011-08-26 13:18   ` Christopher J. PeBenito
2011-08-26 13:30     ` Dominick Grift
2011-08-30 13:37       ` Christopher J. PeBenito
2011-08-30 17:31         ` Dominick Grift
2011-08-24 12:35 ` [refpolicy] [ v3 PATCH 3/8] Git shell users Dominick Grift
2011-08-25  9:07   ` Dominick Grift
2011-08-26 13:28     ` Christopher J. PeBenito
2011-08-26 15:36       ` Dominick Grift
2011-08-26 17:26       ` Dominick Grift
2011-08-24 12:35 ` [refpolicy] [ v3 PATCH 4/8] Git session daemon Dominick Grift
2011-08-26 13:33   ` Christopher J. PeBenito
2011-08-26 15:30     ` Dominick Grift
2011-08-30 13:50       ` Christopher J. PeBenito
2011-08-30 17:20         ` Dominick Grift
2011-08-31 14:36           ` Christopher J. PeBenito
2011-08-31 14:49             ` Dominick Grift
2011-08-31 15:14               ` Christopher J. PeBenito
2011-08-31 15:38                 ` Dominick Grift
2011-08-24 12:35 ` [refpolicy] [ v3 PATCH 5/8] Gitweb, cgit and the git_content attribute Dominick Grift
2011-08-26 13:35   ` Christopher J. PeBenito
2011-08-26 16:14     ` Dominick Grift
2011-08-30 13:23       ` Christopher J. PeBenito
2011-08-30 17:15         ` Dominick Grift
2011-08-31 14:48           ` Christopher J. PeBenito [this message]
2011-08-24 12:35 ` [refpolicy] [ v3 PATCH 6/8] Git shared repository separation and custom shared repository types Dominick Grift
2011-08-26 13:46   ` Christopher J. PeBenito
2011-08-26 15:46     ` Dominick Grift
2011-08-24 12:35 ` [refpolicy] [ v3 PATCH 7/8] Git session daemons binding TCP sockets to unreserved ports Dominick Grift
2011-08-24 12:35 ` [refpolicy] [ v3 PATCH 8/8] I am not sure about this but it might prove useful for NIS? Dominick Grift

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E5E49B4.5010009@tresys.com \
    --to=cpebenito@tresys.com \
    --cc=refpolicy@oss.tresys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.