You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Coty Sutherland <cs...@redhat.com> on 2017/06/02 18:15:35 UTC
Manager applications and the Security Manager
Hi,
I'm sure this has been brought up before, but I can't find it so I
figured I'd ask...
A vanilla installation of tomcat fails to start the admin webapps with
the Security Manager enabled. This is because the manager and
host-manager webapps ship with a context.xml. The behavior isn't
documented anywhere that I see, so I'm curious if it's intentional or
has been flying under the radar. Are there reasons why we would not
trust an application that we ship when running under the Security
Manager? Is there a reason we can't move the context.xml for each app
into the appropriate conf/[Engine]/[Host] directory to fix this?
If you guys think this is a bug I can file a BZ and fix it :D Or, mark
it as "Beginner" since it's trivial.
Thanks,
Coty
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Manager applications and the Security Manager
Posted by Coty Sutherland <cs...@redhat.com>.
I went ahead and submitted
https://bz.apache.org/bugzilla/show_bug.cgi?id=61154 so I didn't
forget :)
On Fri, Jun 2, 2017 at 6:41 PM, Coty Sutherland <cs...@redhat.com> wrote:
> On Fri, Jun 2, 2017 at 4:41 PM, Mark Thomas <ma...@apache.org> wrote:
>> On 02/06/2017 21:29, Christopher Schultz wrote:
>>> Coty,
>>>
>>> On 6/2/17 2:15 PM, Coty Sutherland wrote:
>>>> Hi,
>>>
>>>> I'm sure this has been brought up before, but I can't find it so I
>>>> figured I'd ask...
>>>
>>>> A vanilla installation of tomcat fails to start the admin webapps
>>>> with the Security Manager enabled. This is because the manager and
>>>> host-manager webapps ship with a context.xml.
>>>
>>> Why is that a problem?
>>>
>>> (I'm honestly asking... I've never looked much into the details of how
>>> Tomcat + SM works.)
>>
>> If a SecurityManager is enabled, any META-INF/context.xml is ignored
>> since that file can be used by bypass some of the constraints imposed by
>> the SecurityManager.
>>
>>
>>>> The behavior isn't documented anywhere that I see, so I'm curious
>>>> if it's intentional or has been flying under the radar.
>>
>> It is known and it hasn't been changed so I guess that makes it intentional.
>>
>>>> Are there
>>>> reasons why we would not trust an application that we ship when
>>>> running under the Security Manager?
>>
>> No. But the 'don't use META-INF/context.xml' rule is a general one, not
>> a per application one.
>>
>>>> Is there a reason we can't
>>>> move the context.xml for each app into the appropriate
>>>> conf/[Engine]/[Host] directory to fix this?
>>>
>>> We probably can, but that makes the app(s) a little less
>>> trivially-relocatable.
>>
>> It would be better if they were self-contained. It is easier for folks
>> to remove them.
>
> I was going to suggest copying them into conf or using a symlink, but
> copying them breaks tomcat when they are removed from webapps and a
> symlink causes an NPE in o.a.c.startup.HostConfig.deployDescriptor().
> I guess we should leave it up to the user to decide and maybe document
> it somewhere a bit more clearly?
>
>> A better solution would be to switch to the corresponding filter.
>>
>>>> If you guys think this is a bug I can file a BZ and fix it :D Or,
>>>> mark it as "Beginner" since it's trivial.
>>
>> Enhancement request to switch to the filter works for me. The fix is
>> still fairly trivial in with that solution.
>
> Filter? Did I miss something? This email and the BZ that I filed about
> the filter attribute are two separate things.
>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Manager applications and the Security Manager
Posted by Mark Thomas <ma...@apache.org>.
On 2 June 2017 23:41:00 BST, Coty Sutherland <cs...@redhat.com> wrote:
>On Fri, Jun 2, 2017 at 4:41 PM, Mark Thomas <ma...@apache.org> wrote:
>> On 02/06/2017 21:29, Christopher Schultz wrote:
>>> Coty,
>>>
>>> On 6/2/17 2:15 PM, Coty Sutherland wrote:
>>>> Hi,
>>>
>>>> I'm sure this has been brought up before, but I can't find it so I
>>>> figured I'd ask...
>>>
>>>> A vanilla installation of tomcat fails to start the admin webapps
>>>> with the Security Manager enabled. This is because the manager and
>>>> host-manager webapps ship with a context.xml.
>>>
>>> Why is that a problem?
>>>
>>> (I'm honestly asking... I've never looked much into the details of
>how
>>> Tomcat + SM works.)
>>
>> If a SecurityManager is enabled, any META-INF/context.xml is ignored
>> since that file can be used by bypass some of the constraints imposed
>by
>> the SecurityManager.
>>
>>
>>>> The behavior isn't documented anywhere that I see, so I'm curious
>>>> if it's intentional or has been flying under the radar.
>>
>> It is known and it hasn't been changed so I guess that makes it
>intentional.
>>
>>>> Are there
>>>> reasons why we would not trust an application that we ship when
>>>> running under the Security Manager?
>>
>> No. But the 'don't use META-INF/context.xml' rule is a general one,
>not
>> a per application one.
>>
>>>> Is there a reason we can't
>>>> move the context.xml for each app into the appropriate
>>>> conf/[Engine]/[Host] directory to fix this?
>>>
>>> We probably can, but that makes the app(s) a little less
>>> trivially-relocatable.
>>
>> It would be better if they were self-contained. It is easier for
>folks
>> to remove them.
>
>I was going to suggest copying them into conf or using a symlink, but
>copying them breaks tomcat when they are removed from webapps and a
>symlink causes an NPE in o.a.c.startup.HostConfig.deployDescriptor().
>I guess we should leave it up to the user to decide and maybe document
>it somewhere a bit more clearly?
>
>> A better solution would be to switch to the corresponding filter.
>>
>>>> If you guys think this is a bug I can file a BZ and fix it :D Or,
>>>> mark it as "Beginner" since it's trivial.
>>
>> Enhancement request to switch to the filter works for me. The fix is
>> still fairly trivial in with that solution.
>
>Filter? Did I miss something? This email and the BZ that I filed about
>the filter attribute are two separate things.
Use the equivalent filter rather than the Valve.
Mark
>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: dev-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Manager applications and the Security Manager
Posted by Coty Sutherland <cs...@redhat.com>.
On Fri, Jun 2, 2017 at 4:41 PM, Mark Thomas <ma...@apache.org> wrote:
> On 02/06/2017 21:29, Christopher Schultz wrote:
>> Coty,
>>
>> On 6/2/17 2:15 PM, Coty Sutherland wrote:
>>> Hi,
>>
>>> I'm sure this has been brought up before, but I can't find it so I
>>> figured I'd ask...
>>
>>> A vanilla installation of tomcat fails to start the admin webapps
>>> with the Security Manager enabled. This is because the manager and
>>> host-manager webapps ship with a context.xml.
>>
>> Why is that a problem?
>>
>> (I'm honestly asking... I've never looked much into the details of how
>> Tomcat + SM works.)
>
> If a SecurityManager is enabled, any META-INF/context.xml is ignored
> since that file can be used by bypass some of the constraints imposed by
> the SecurityManager.
>
>
>>> The behavior isn't documented anywhere that I see, so I'm curious
>>> if it's intentional or has been flying under the radar.
>
> It is known and it hasn't been changed so I guess that makes it intentional.
>
>>> Are there
>>> reasons why we would not trust an application that we ship when
>>> running under the Security Manager?
>
> No. But the 'don't use META-INF/context.xml' rule is a general one, not
> a per application one.
>
>>> Is there a reason we can't
>>> move the context.xml for each app into the appropriate
>>> conf/[Engine]/[Host] directory to fix this?
>>
>> We probably can, but that makes the app(s) a little less
>> trivially-relocatable.
>
> It would be better if they were self-contained. It is easier for folks
> to remove them.
I was going to suggest copying them into conf or using a symlink, but
copying them breaks tomcat when they are removed from webapps and a
symlink causes an NPE in o.a.c.startup.HostConfig.deployDescriptor().
I guess we should leave it up to the user to decide and maybe document
it somewhere a bit more clearly?
> A better solution would be to switch to the corresponding filter.
>
>>> If you guys think this is a bug I can file a BZ and fix it :D Or,
>>> mark it as "Beginner" since it's trivial.
>
> Enhancement request to switch to the filter works for me. The fix is
> still fairly trivial in with that solution.
Filter? Did I miss something? This email and the BZ that I filed about
the filter attribute are two separate things.
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Manager applications and the Security Manager
Posted by Mark Thomas <ma...@apache.org>.
On 02/06/2017 21:29, Christopher Schultz wrote:
> Coty,
>
> On 6/2/17 2:15 PM, Coty Sutherland wrote:
>> Hi,
>
>> I'm sure this has been brought up before, but I can't find it so I
>> figured I'd ask...
>
>> A vanilla installation of tomcat fails to start the admin webapps
>> with the Security Manager enabled. This is because the manager and
>> host-manager webapps ship with a context.xml.
>
> Why is that a problem?
>
> (I'm honestly asking... I've never looked much into the details of how
> Tomcat + SM works.)
If a SecurityManager is enabled, any META-INF/context.xml is ignored
since that file can be used by bypass some of the constraints imposed by
the SecurityManager.
>> The behavior isn't documented anywhere that I see, so I'm curious
>> if it's intentional or has been flying under the radar.
It is known and it hasn't been changed so I guess that makes it intentional.
>> Are there
>> reasons why we would not trust an application that we ship when
>> running under the Security Manager?
No. But the 'don't use META-INF/context.xml' rule is a general one, not
a per application one.
>> Is there a reason we can't
>> move the context.xml for each app into the appropriate
>> conf/[Engine]/[Host] directory to fix this?
>
> We probably can, but that makes the app(s) a little less
> trivially-relocatable.
It would be better if they were self-contained. It is easier for folks
to remove them.
A better solution would be to switch to the corresponding filter.
>> If you guys think this is a bug I can file a BZ and fix it :D Or,
>> mark it as "Beginner" since it's trivial.
Enhancement request to switch to the filter works for me. The fix is
still fairly trivial in with that solution.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Manager applications and the Security Manager
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Coty,
On 6/2/17 2:15 PM, Coty Sutherland wrote:
> Hi,
>
> I'm sure this has been brought up before, but I can't find it so I
> figured I'd ask...
>
> A vanilla installation of tomcat fails to start the admin webapps
> with the Security Manager enabled. This is because the manager and
> host-manager webapps ship with a context.xml.
Why is that a problem?
(I'm honestly asking... I've never looked much into the details of how
Tomcat + SM works.)
> The behavior isn't documented anywhere that I see, so I'm curious
> if it's intentional or has been flying under the radar. Are there
> reasons why we would not trust an application that we ship when
> running under the Security Manager? Is there a reason we can't
> move the context.xml for each app into the appropriate
> conf/[Engine]/[Host] directory to fix this?
We probably can, but that makes the app(s) a little less
trivially-relocatable.
> If you guys think this is a bug I can file a BZ and fix it :D Or,
> mark it as "Beginner" since it's trivial.
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBCAAGBQJZMcq6AAoJEBzwKT+lPKRYPOcQAMGnmT6iPKblBtdISy/YbOzX
A+VKvxGsP2H1RJAI8n8uuUsSQP91wYio5ZPlyEe0kteimQrmR/Q9Avgo5omxQB5o
Xi9CbqZq5Nxh/53zwwp5CNHE4CUMGqpQopH1617+M+1OBH8pDGRP+9GstcDAAIU5
a+2FeDge0fufmawfEW2FFpQ59FB3u0FRckkPXTNPvZSU/HmT77U3D2opidpTELtU
mkh4g7U8ouEQ2oam6cMEts86Oa7pkon45t3enfO2yUsskFl8vk/jQ3TGjby0VUVf
lSVDCZFMcWGs1bBdQgqCpHeM9oTyTtBV3xbHIUKQMYgCEKepZ9baYO3+Se0B+++/
ENX83PnvqsLpqfI+rYsLvkWSdVfOuV/NNkdbt+U2GbqkRrOkj+ACbtIj6RXYn3ST
E70bTdHJLci2LJJhFQ0S7Ns8nIaDBjzzPS1xJmwflwtev+EgZPdPs+eHpvY8c00X
xFwiOjm0P4YTJMVvQcAq9xbmpzO6RnK+1iKXhUXGWHjHxX1QhAymNLqomz2u3oF4
UO8usmtYtpnxegeqy2Jax86sFfxv0YnKd+FhIW/xVUxF1wsN0qf50JgBIAzmMzO8
Jfu3rJiqxTKEVXCjNkIx2C+tFO2grlhm1qeBR2I7xz5QkAGQeHfWjJs4QUrfOyfl
Wa7d1YBTLDTIWrmB6Of6
=4rCb
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Manager applications and the Security Manager
Posted by Coty Sutherland <cs...@redhat.com>.
On Fri, Jun 2, 2017 at 2:29 PM, Igal @ Lucee.org <ig...@lucee.org> wrote:
> Coty,
>
> On 6/2/2017 11:15 AM, Coty Sutherland wrote:
>>
>> If you guys think this is a bug I can file a BZ and fix it :D Or, mark
>> it as "Beginner" since it's trivial.
>
>
> If it's trivial then please mark it as a Beginner if you open a ticket. It
> will give new contributors like myself a chance to get better acquainted
> with the Tomcat code base, and allow you to take care of things that require
> more experience.
Will do, assuming everyone thinks its a bug.
> Best,
>
> Igal Sapir
> Lucee Core Developer
> Lucee.org <http://lucee.org/>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: Manager applications and the Security Manager
Posted by "Igal @ Lucee.org" <ig...@lucee.org>.
Coty,
On 6/2/2017 11:15 AM, Coty Sutherland wrote:
> If you guys think this is a bug I can file a BZ and fix it :D Or, mark
> it as "Beginner" since it's trivial.
If it's trivial then please mark it as a Beginner if you open a ticket.
It will give new contributors like myself a chance to get better
acquainted with the Tomcat code base, and allow you to take care of
things that require more experience.
Best,
Igal Sapir
Lucee Core Developer
Lucee.org <http://lucee.org/>