dev@glassfish.java.net

Re: Diff for 18235

From: Jason Lee <jason.d.lee_at_oracle.com>
Date: Wed, 24 Apr 2013 09:52:07 -0500

Here's the current status and diff for this issue. With the attached
diff, asadmin and REST traffic are restricted as expected. For this
configuration (with localhost, test1, and test2 all resolving to 127.0.0.1):

<virtual-server id="__asadmin" hosts="localhost, test1"
network-listeners="admin-listener"></virtual-server>

*host/operation*
        *REST**
* *Console**
* *asadmin*
*localhost*
        Expected response
        200 with empty body
        Expected response
*test1*
        Expected response 200 with empty body
        Expected response
*test2*
        404
        404
        404/Command failed


There seems, then, to be more work done on the web-glue side to make
this correct.

One final point: with the current state of this diff, if the
virtual-server configuration is left with its defaults, nothing seems to
work. I'll try to figure that out once the issues above are ironed out.

Many thanks, by the way, to Ryan Lubke for his help on this issue.


On 04/19/2013 10:40 AM, Jason Lee wrote:
> Per Shreedar's request, attached is the diff of my current attempt to
> address http://java.net/jira/browse/GLASSFISH-18235
>
> The changes in addHost() and addContent() is a less than elegant attempt
> to work around the sanity checks mentioned in the source comments.
> Ideally, we'd probably pass the VS in, but these methods override those
> in the Grizzly base class, so it's not that simple, it seems, but
> something that can be addressed once we make it work.
>
> At any rate, the net effect of this change so far is that all traffic to
> port 4848 (Console, REST, and Asadmin) returns a 404, for reasons I've
> not yet been able to determine. If anyone has any tips, I'm all ears. :)
>


-- 
Jason Lee
Principal Member of Technical Staff
GlassFish Team
Oracle Corporation
Phone +1 405-216-3193
Blog http://blogs.steeplesoft.com