> One question, I'm new to JBoss. Should the example
> run in a vanilla JBoss
> 3.0.4 (with Tomcat) install? I changed the
> hibernate.properties before
> building and now it deploy's fine. But when I run
> the client (run.sh) I get
> two errors: 1) cannot fine DefaultDS data source and
> 2) no users.properties
> found.
 I have vanilla 3.0.2, without tomcat ( do not need it
as my clients are swingy )

> I checked the default hsqldb-service.xml file and
> all seems fine - hibernate
> and JBoss use the same default userid and password.
> 
> I read a little of the JBoss Getting Started Guide
> and browsed their
> newsgroups enough to figure out how to setup a
> users.properties and
> roles.properties file in the JBoss conf directory.
> Still no joy, but a
> change - I now get:
>   20:52:11,973 ERROR [LogInterceptor] EJBException,
> causedBy:
>   java.lang.SecurityException: Authentication
> exception, principal=null
> 
> The users.properties file looks like:
>  guest=guest
>  guest1=
>  user1=user1
>  admin=admin
>  unauthenticatedIdentity=guest
> and the roles.properties file looks like:
>  guest=guest,user
>  guest1=guest
>  user1=guest,admin,user
>  admin=guest,admin,user
>  unauthenticatedIdentity=guest
> 
> I realize this is more of a JBoss problem and its a
> newbie problem at that.
> But it would be great if the example could work
> out-of-the box.


Well, in JBoss subtack invocation I specify:
unauthenticatedPrincipal="nobody"

and on bean:
@ejb.permission    unchecked="true"

You also may adjust securityDomain setting to point
to java:/jaas/other ( which is by default therehere is
my snippet out of login-config.xml:
---%<------------
    <!-- The default login configuration used by any
security domain that
    does not have a application-policy entry with a
matching name
    -->
    <application-policy name = "other">
       <!-- A simple server login module, which can be
used when the number 
       of users is relatively small. It uses two
properties files:
       users.properties, which holds users (key) and
their password (value).
       roles.properties, which holds users (key) and a
comma-separated list of
       their roles (value).
       The unauthenticatedIdentity property defines
the name of the principal
       that will be used when a null username and
password are presented as is
       the case for an unuathenticated web client or
MDB. If you want to
       allow such users to be authenticated add the
property, e.g.,
       unauthenticatedIdentity="nobody"
       -->
       <authentication>
          <login-module code =
"org.jboss.security.auth.spi.UsersRolesLoginModule"
             flag = "required" />
       </authentication>
    </application-policy>

        
        <application-policy name = "ukw">
       <!-- 
                        security policy for ukw application
       -->
       <authentication>
          <login-module code =
"org.jboss.security.auth.spi.UsersRolesLoginModule"
             flag = "required">
                         <module-option name =
"unauthenticatedIdentity">nobody</module-option>
                  </login-module>
       </authentication>
    </application-policy>

----%<---------------
In roles.properties I say :
nobody=nobody

hope this helps...

regards,

=====
Konstantin Priblouda ( ko5tik )    Freelance Software developer
< http://www.pribluda.de > < play java games -> http://www.yook.de >
< render charts online -> http://www.pribluda.de/povray/ >

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to