<div dir="ltr"><p class="MsoNormal">Hi,</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">I am  looking below
user cases for role based access control:</p>

<p class="MsoNormal">1.     A user should be able to manage sshd and
apache2  services : when I say manage,
user should be able to configure these services and stop/start/restart.</p>

<p class="MsoNormal">        This user role is to administer ssh and
apache services.  </p>

<p class="MsoNormal"> </p>

<p class="MsoNormal"> 2.    A user
for network administration.   This role
should be able to add/modify ip/route etc. </p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">   </p>

<p class="MsoNormal"> </p>

<p class="MsoNormal"> After refer to some
wiki page docs for RBAC in AppArmor,  I still
don’t find answers to below questions.</p>

<p class="" style="margin-left:54pt">1.<span style="font-stretch:normal;font-size:7pt;font-family:'Times New Roman'">       </span>How
to assign multiple roles to given user</p>

<p class="" style="margin-left:54pt">2.<span style="font-stretch:normal;font-size:7pt;font-family:'Times New Roman'">       </span>How
to switch between the roles </p>

<p class="" style="margin-left:54pt">3.<span style="font-stretch:normal;font-size:7pt;font-family:'Times New Roman'">       </span>Is
it possible to provide roles only of read only access: consider the example of
sshd service. Is it possible to create a role only to check the status of sshd
service and read sshd configuration</p>

<p class="" style="margin-left:54pt">4.<span style="font-stretch:normal;font-size:7pt;font-family:'Times New Roman'">       </span>By
refering to the example given in apparmor wiki (<a href="http://wiki.apparmor.net/index.php/Pam_apparmor_example">http://wiki.apparmor.net/index.php/Pam_apparmor_example</a>)</p>

<p class="" style="margin-left:54pt">After following the steps
mention above,  even root user also needs
to have role profile or else default profile is applied.</p>

<p class="" style="margin-left:54pt"> </p>

<p class="" style="margin-left:54pt">Is there a way by which we
can exclude root user from this RBAC</p>

<p class="" style="margin-left:54pt"> </p>

<p class="" style="margin-left:54pt">how to have some user
outside pam_apparmor control </p>

<p class="" style="margin-left:54pt">how to provide RBAC only
for selected users and not all users on the system.</p><p class="" style="margin-left:54pt"><br></p><p class="" style="margin-left:54pt">Thanks and regards,</p><p class="" style="margin-left:54pt">Adishesh</p><p class="" style="margin-left:54pt"><br></p></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 10, 2016 at 1:27 AM, Seth Arnold <span dir="ltr"><<a href="mailto:seth.arnold@canonical.com" target="_blank">seth.arnold@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, May 09, 2016 at 02:09:09PM +0530, Adishesh M wrote:<br>
> is there any howto document available for updating httpd/apache profile to<br>
> include role based access.<br>
> i need to create two roles : one readonly access for httpd and other httpd<br>
> admin role.<br>
<br>
</span>Hello Adishesh,<br>
<br>
Can you describe what you're trying to accomplish?<br>
<br>
There's a few dozen webservers out there and while there's existing<br>
profiles for e.g. apache[1] those profiles are certainly not "read-only".<br>
<br>
Of course what makes it difficult to prepare a "standard profile" is that<br>
web servers are expected to do so much. If you really just want to serve<br>
static pages, you could start with a profile like:<br>
<br>
/path/to/server {<br>
  #include <abstractions/base><br>
<br>
  capability setgid,<br>
  capability setuid,<br>
  capability net_bind_service,<br>
<br>
  network inet  stream,<br>
  network inet6 stream,<br>
<br>
  /var/www/** r,<br>
  /var/logs/<whatever> rwl,<br>
}<br>
<br>
You'll need to amend this profile to do whatever it is your program needs.<br>
You may be able to use fewer capabilities if it doesn't bind to port 80 or<br>
drop privileges once running (say, if it just runs as a different user<br>
in the first place).<br>
<br>
Updating the web content is another question. You could use a specific<br>
user with a specific shell, and confine that shell. You could use sftp and<br>
confine the ssh daemon. You could use a cronjob to periodically pull<br>
updates via rsync or git and have -those- be confined. What workflow do<br>
you want to support?<br>
<br>
Thanks<br>
<br>
<br>
1: <a href="http://bazaar.launchpad.net/~apparmor-dev/apparmor/master/view/head:/profiles/apparmor.d/usr.sbin.apache2" rel="noreferrer" target="_blank">http://bazaar.launchpad.net/~apparmor-dev/apparmor/master/view/head:/profiles/apparmor.d/usr.sbin.apache2</a><br>
<br>--<br>
AppArmor mailing list<br>
<a href="mailto:AppArmor@lists.ubuntu.com">AppArmor@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/apparmor" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/apparmor</a><br>
<br></blockquote></div><br></div>