-
1. Re: Authentication Exception
vbfischer Jun 2, 2003 9:52 PM (in response to vbfischer)I should mention some other details.
Client is program accessing Session Bean. Session bean is simple Echo.
Environment:
JBoss 3.2.0_tomcat 4.1.24
MSSQL Server 2000.
Server is local (servername = MUSIC)
Table definitions are:
user BPW_USER is database owner of Daytona database.
CREATE TABLE [dbo].[SYS_USER] (
[USERNAME] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[USERTYPE] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[PASSWORD] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FULLNAME] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[ALLOWINSERT] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[ALLOWEDIT] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[ALLOWDELETE] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[ALLOWVIEW] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[ALLOWOTHER] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[OPTIONS] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[USER_ROLES] (
[username] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[userRoles] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
Thanks in advance. -
2. Re: Authentication Exception
johndoekyrgyz Jun 18, 2003 3:03 AM (in response to vbfischer)This is a fairly common problem. What is the command line you use to start the client? It should be something like this.
java -Djava.security.manager -Djava.security.auth.login.config=auth.conf -Djava.security.policy=client.policy -Djava.security.auth.policy=client.policy
[your java class]
The auth.conf file specifies the JAAS login modules that should be invoked inorder to create a login context, ie lc.login(). Here is an example of one that I use.
CitiHopeSecurityDomain
{
org.jboss.security.ClientLoginModule Required;
};
Note: CitiHopeSecurityDomain is the name of the login configuration that I use. This file can contain multiple configurations. You reference a particular configuration in your code like this.
LoginContext lc = new LoginContext("CitiHopeSecurityDomain", handler);
Here is my client.policy file.
grant
{
permission java.security.AllPermission;
};
Your server configuration looks fine on first glance.
There is a good article on JBossSX available on JavaWorld that covers most of what you are trying to do.
Good Luck,
John