admin@glassfish.java.net

Re: Anonymous User Enabled AdminCommand

From: Ludovic Champenois <ludovic.champenois_at_oracle.com>
Date: Fri, 22 Oct 2010 16:00:56 -0700

On 10/22/10 2:24 PM, Bill Shannon wrote:
> And what credentials are required to execute this command?
Normal ones...
The issue is for this scenario only:

1/ Anon is on
2/ you are connected to the admin GUI as anonymous,
3/ so there is no logout button on the admin gui
4/ you use admin gui to set yourself a password
5/ you are still connected to admin gui but you are not anonymous
anymore: the admin gui needs this cli to test if the logout button
should be shown

Corner case, but...
Ludo
>
>
> Jason Lee wrote on 10/22/10 01:40 PM:
>> This is mostly of interest to the console, but for those that might
>> be curious
>> (or happen to have a need), I have implemented a (hidden)
>> AdminCommand to
>> determine if an anonymous user is enabled:
>>
>> $ asadmin __anonymous-user-enabled
>> The anonymous user is enabled: admin
>>
>> Command __anonymous-user-enabled executed successfully.
>>
>> This has also been exposed via REST:
>>
>> $ get http://localhost:4848/management/domain/anonymous-user-enabled
>> {
>> "message": "The anonymous user is enabled: admin",
>> "command": "__anonymous-user-enabled AdminCommand",
>> "exit_code": "SUCCESS",
>> "extraProperties": {
>> "anonymousUserEnabled": true,
>> "anonymousUserName": "admin"
>> }
>> }
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>