Bug 777622 (SOA-131)

Summary: SOA-Platform Port 8083, serving all deployed classes
Product: [JBoss] JBoss Enterprise SOA Platform 4 Reporter: Marc Schoenefeld <mschoene>
Component: EAPAssignee: Mike Brock <cbrock>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 4.2 IR5CC: jwulf, rruss
Target Milestone: ---   
Target Release: 4.2 CP01   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-131
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
10:17:26,761 INFO [Server] Starting JBoss (MX MicroKernel)... 10:17:26,773 INFO [Server] Release ID: JBoss [EAP] 4.3.0.GA (build: SVNTag=JBPAPP_4_3_0_GA date=200710252032) Linux mschoene.csb 2.6.18-8.1.8.el5 #1 SMP Mon Jun 25 17:06:19 EDT 2007 i686 i686 i386 GNU/Linux
Last Closed: 2008-04-10 12:11:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 777593    
Attachments:
Description Flags
CP01.txt none

Description Marc Schoenefeld 2007-11-12 14:36:46 UTC
Affects: Release Notes
Date of First Response: 2007-12-13 00:16:26
project_key: SOA

The service on port 8083 serves all internal classfiles, which is not be desired. 
This should be limited to classes that are neccessary for external use (such as RMI/IIOP stubs), 
some class may not be served due to their usage license, some may contain 
confidential information about a deployed application. Seems to 
be related to http://jira.jboss.com/jira/browse/JBAS-4540 but does 
not show a 404 as stated there. 

You can test this as follows:

[mschoene@mschoene soates20071112]$ more getclassin.txt 
GET .org/jboss/web/WebServer.class HTTP/1.1
[mschoene@mschoene soates20071112]$ more getclassfile.sh 
nc 127.0.0.1 8083 <getclassin.txt >getclasstxtout.bin
xxd getclasstxtout.bin
[mschoene@mschoene soates20071112]$ sh getclassfile.sh 
0000000: 4854 5450 2f31 2e30 2032 3030 204f 4b0d  HTTP/1.0 200 OK.
0000010: 0a43 6f6e 7465 6e74 2d4c 656e 6774 683a  .Content-Length:
0000020: 2031 3038 3434 0d0a 436f 6e74 656e 742d   10844..Content-
0000030: 5479 7065 3a20 6170 706c 6963 6174 696f  Type: applicatio
0000040: 6e2f 6a61 7661 0d0a 0d0a cafe babe 0000  n/java..........
0000050: 0031 01ff 0a00 9401 0b09 0090 010c 0900  .1..............
0000060: 9001 0d07 010e 0a00 0401 0b09 0090 010f  ................
0000070: 0900 9001 1009 0090 0111 0900 9001 1209  ................
0000080: 0090 0113 0900 9001 1409 0090 0115 0a00  ................
0000090: 9201 1607 0117 0801 180a 000e 0119 0701  ................
00000a0: 1a0a 0011 011b 0900 9001 1c07 011d 0a00  ................
00000b0: 1401 0b08 011e 0a00 1401 1f0a 0014 0120  ............... 
00000c0: 0a00 1401 210a 0122 0123 0a00 9001 2407  ....!..".#....$.
00000d0: 0125 0701 2608 0127 0a00 1401 2808 0129  .%..&..'....(..)
00000e0: 0a00 1d01 2a07 012b 0a00 1101 2c07 012d  ....*..+....,..-

Comment 1 Mark Little 2007-11-12 16:54:59 UTC
Link: Added: This issue is related to JBAS-4540


Comment 2 Mike Brock 2007-12-13 05:16:26 UTC
This is ultimately a non-issue, because the server does not respond to non-local requests, regardless of the binding address.

Comment 4 Len DiMaggio 2007-12-13 17:24:12 UTC
Link: Added: This issue is a dependency of SOA-101


Comment 5 Mike Brock 2007-12-13 19:26:28 UTC
I'm just not sure we can possibly secure this out of the box.  Certainly, RMI is one of ESB's supported endpoint protocols, and I don't see how we can possibly automatically limit serving the classes across the wire, just based on whatever business classes are present.   That would seem to me, to be something that could only be accomplished programmatically from ESB itself (if possible at all).

It would seem to me that this would have to be something that is documented in the platform documentation, for informing the client on how to secure the server after deploying their projects.



Comment 6 Mike Brock 2007-12-18 06:04:38 UTC
This is fixed in the production config.  Port 8083 still listens, but will only serve deployed EJB remote interfaces by default.  However, this webserver does not throw 404 errors, but rather returns blank content for requests where there is no class found, and this should be understood in testing.

Comment 9 Julian Coleman 2008-02-08 12:21:07 UTC
Link: Added: This issue is related to SOA-406


Comment 10 Julian Coleman 2008-02-08 12:24:09 UTC
Link: Added: This issue is a dependency of SOA-406


Comment 11 Julian Coleman 2008-03-18 17:07:33 UTC
Link: Removed: This issue is a dependency of SOA-406 


Comment 12 Julian Coleman 2008-03-18 17:07:40 UTC
Link: Removed: This issue is related to SOA-406 


Comment 13 Mike Brock 2008-03-25 15:48:57 UTC
documented.

Comment 14 Len DiMaggio 2008-04-02 15:50:30 UTC
Affects: Added: [Release Notes]


Comment 15 Len DiMaggio 2008-04-03 01:07:18 UTC
Same results with CP01 build.

Comment 16 Len DiMaggio 2008-04-03 01:07:18 UTC
Attachment: Added: CP01.txt


Comment 19 Joshua Wulf 2008-04-08 13:29:43 UTC
email from Marc:

Hi Joshua,

 the only reliable workaround is fixing it.
 A fix is available since 20070724,
 see http://jira.jboss.com/jira/browse/JBAS-4540

 For a temporary fix there are some flags in
 the the config for org.jboss.web.WebService mbean
 that promise to disable non-EJB class download.

    <attribute name="Port">8083</attribute>
    <!-- Should resources and non-EJB classes be downloadable -->
    <attribute name="DownloadServerClasses">false</attribute>
    <attribute name="DownloadResources">false</attribute>

Thanks
Marc

Comment 20 Len DiMaggio 2008-04-08 13:30:50 UTC
Link: Added: This issue depends JBPAPP-245


Comment 22 Mark Little 2008-04-08 14:42:53 UTC
I see no reason why the standalone server does not behave in the same way. I suspect that when data and jars have been stripped out during its creation that we lost something.

Comment 24 Mike Brock 2008-04-08 21:08:08 UTC
See last comment, this is a documentation issue.  The setting to serve the classes is needed for some of the RMI quick starts.  The user needs to know that with the standalone server it is necessary to change this setting to false in order to secure the environment for production.

Comment 25 Joshua Wulf 2008-04-09 06:31:05 UTC
Release noted:

3.5.2. Preventing download of non-RMI classes on Port 8083 in the standalone version of the server

If you use RMI (Remote Method Invocation) you will want to make Port 8083 of your server accessible to clients. The EAP version of the server is configured out of the box to restrict the classes that it serves on this port. The standalone server, however, is configured out of the box to serve all deployable classes via this port. This has been done to allow the quickstarts to function correctly by default.

To change this behaviour you need to modify the following line in default/conf/jboss-service.xml:

<!-- Should non-EJB .class files be downloadable -->
<attribute name="DownloadServerClasses">false</attribute>

The value for this attribute is set as true out of the box, and it should be set to false in actual production deployment to prevent the server from serving all deployable classes on Port 8083. 

Comment 26 Len DiMaggio 2008-04-10 12:11:12 UTC
Verified in the release notes here:

https://svn.corp.jboss.com/repos/soa/trunk/build-tools/docs/SOA_Release_Notes.txt

Comment 27 Len DiMaggio 2008-04-10 12:22:05 UTC
It's in the CR3 release note too:

    3.5.2. Preventing download of non-RMI classes on Port 8083 in the
    standalone version of the server

   If you use RMI (Remote Method Invocation) you will want to make
   Port 8083 of your server accessible to clients. The EAP version of
   the server is configured out of the box to restrict the classes
   that it serves on this port. The standalone server, however, is
   configured out of the box to serve all deployable classes via this
   port. This has been done to allow the quickstarts to function
   correctly by default.

   To change this behaviour you need to modify the following line in
   default/conf/jboss-service.xml:

 <!-- Should non-EJB .class files be downloadable -->
 <attribute name="DownloadServerClasses">false</attribute>

   The value for this attribute is set as true out of the box, and it
   should be set to false in actual production deployment to prevent
   the server from serving all deployable classes on Port 8083.