embedded@glassfish.java.net

security settings - adding user to realm

From: Pavel Bucek <Pavel.Bucek_at_Sun.COM>
Date: Tue, 21 Apr 2009 10:31:13 +0200

Hello,

I'm implementing a jersey example with embedded glassfish but I can't
find way how to set up security realm with defined users.

I'm using maven glassfish plugin, I've found an example of setting
(probably) all possible properties
(https://maven-glassfish-plugin.dev.java.net/examples/complete.html) and
it looks like it supports adding new realm, but I can't find how add
users..

""
 <auth>
     <realm>
         <name>testRealm</name>
         
<className>com.sun.enterprise.security.auth.realm.file.FileRealm</className>

         <properties>
             <property>
                 <name>jaas-context</name>
                 <value>test</value>
             </property>
             <property>
                 <name>file</name>
                 <value>${project.build.outputDirectory}/keyfile</value>
             </property>
         </properties>
     </realm>
 </auth>
""

Is there any way to do what I need?


Regards,

Pavel