You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2015/03/11 13:14:50 UTC

[Bug 57687] New: securitymanager: codeBase cannot be denoted if unpackWARs=false

https://bz.apache.org/bugzilla/show_bug.cgi?id=57687

            Bug ID: 57687
           Summary: securitymanager: codeBase cannot be denoted if
                    unpackWARs=false
           Product: Tomcat 8
           Version: 8.0.18
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: gernot_@nurfuerspam.de

Deploying a webapp myapp.war at context path "some/path/myapp"
and unpackWARs is set to "false".
So there's a conf/Catalina/localhost/some#path#myapp.xml with
"<Context docBase="/somewhere/myapp.war">..."

In Tomcat 7 (and also Tomcat 6 and Tomcat 5.5) you can add following codeBase
in catalina.policy for granting permissions:
grant codeBase
"file:${catalina.base}/work/Catalina/localhost/some_path_myapp/-"
or
grant codeBase
"file:${catalina.base}/work/Catalina/localhost/some_path_myapp/WEB-INF/lib/somejar.jar"

In Tomcat 8 these codeBases does not work. 
There's also no info about that in
http://tomcat.apache.org/tomcat-8.0-doc/security-manager-howto.html.

Actually there seems to be no way to denote a codeBase for WARs which are
deployed as unpackWARs=false.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 57687] securitymanager: codeBase cannot be denoted if unpackWARs=false

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57687

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED
                 OS|                            |All

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
WARs use the same format as JARs so the URL for codebase is the same is the URL
for any resource inside a JAR. e.g.:

grant codeBase
"jar:file:${catalina.base}/webapps/bug57687.war!/WEB-INF/lib/test-lib.jar" {
    permission java.security.AllPermission;
};

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org