admin@glassfish.java.net

Re: Asadmin

From: Tim Quinn <tim.quinn_at_oracle.com>
Date: Wed, 4 May 2011 13:51:41 -0500

By the way, try the same test but use a web browser (at least Firefox)
as the client with

http://host:4848/__asadmin/uptime

and the browser displays the explanation.

We probably need to change RemoteAdminCommand to use the contents of
the connection's error stream, if any, in preparing the exception.

- Tim

On May 4, 2011, at 1:49 PM, Tim Quinn wrote:

> In fact the server-side code sets the action report's message to this:
>
> Remote configuration is currently disabled
>
> (localized of course).
>
>
> RemoteAdminCommand#checkConnect is what detects the 403 and throws a
> CommandException. But that method does not use the additional
> explanatory information, which is delivered in the error stream of
> the URLConnection, in preparing the exception.
>
> - Tim
>
> On May 4, 2011, at 1:37 PM, Tom Mueller wrote:
>
>> We had a discussion about this when enable-secure-admin was being
>> developed, but I haven't been able to find a record of that. The
>> debate was about how much information to give the user in this
>> case. Generally, for security reason you want to give a potential
>> attacker as little information as possible as to why they cannot
>> access the system. On the other hand, for user-friendliness, you
>> might want to tell them to run enable-secure-admin to allow this
>> operation.
>>
>> Tom
>>
>>
>> On 5/4/2011 12:55 PM, Byron Nevins wrote:
>>>
>>> Scenario:
>>>
>>> On MachineB --
>>> asadmin delete-domain domain1
>>> asadmin create-domain --nopassword domain1
>>> asadmin start-domain domain1
>>>
>>> On MachineA --
>>> asadmin --host machineB deploy hello.war
>>> Result:
>>>
>>> HTTP connection failed with code 403, message: Forbidden
>>>
>>> ===============
>>>
>>> Which is fairly easily solved. But there is no hint at all for
>>> the user on how to proceed. Should we give them a clue in the
>>> error message?
>>>
>>>
>>> <mime-attachment.gif>
>>> Byron Nevins | Principal MTS
>>> Phone: +1 6503958992
>>>
>>> <mime-attachment.gif> Oracle is committed to developing practices
>>> and products that help protect the environment
>