quality@glassfish.java.net

Re: Creating a realm in GlassFish 3.1 b25 has strange behavior

From: Anissa Lam <anissa.lam_at_oracle.com>
Date: Wed, 03 Nov 2010 08:49:56 -0700

Hi Richard,
Just want to give you an update on this. After talking to Security
Team and Tom, they believe this is a bug.
So, I have filed
https://glassfish.dev.java.net/issues/show_bug.cgi?id=14375
Summary: create security-realm cannot handle config as target

thanks
Anissa.

On 10/28/10 8:15 AM, Anissa Lam wrote:
>
> Hi Richard,
> Thanks for reporting this. I just tested the latest code and see the
> same issue you reported here.
> I then tried again using CLI and see some error:
>
> /%asadmin create-auth-realm --classname
> com.sun.enterprise.security.auth.realm.file.FileRealm --target
> default-config --property file=/tmp/keyfile:jaas-context=fileRealm
> MyRealm/
> *Did not find any suitable instances for target default-config;
> command executed on DAS only*
>
> Command create-auth-realm executed successfully.
>
> /%asadmin list-auth-realms server-config/
> admin-realm
> file
> certificate
> MyRealm
>
> Command list-auth-realms executed successfully.
>
> list-auth-realms also ignored "default-config" and report whats in
> "server-config".
>
> /%asadmin list-auth-realms default-config/
> Did not find any suitable instances for target default-config; command
> executed on DAS only
> admin-realm
> file
> certificate
> MyRealm
>
> Command list-auth-realms executed successfully.
>
> I don't know if this is expected behavior either. Let me cc Kumar to
> see what he says.
>
> thanks
> Anissa.
>
>
> On 10/28/10 1:06 AM, Richard Kolb wrote:
>> Hello.
>>
>> I created a realm in GlassFish 3.1 using this tutorial :
>> http://developinjava.com/features/47-enterprise-java/106-securing-a-web-application-on-glassfish-using-jaas-pt-2.html?d74b8640
>>
>> I went to Configurations - default-config and created the realm there.
>> But after I created it the realm appeared in server-config
>>
>> Is this correct behavior ?
>>
>> regards
>> Richard.
>>