I'm having no luck with this :(

Here's what I have now:

WEB-INF/jboss-web.xml:
----------------------
<jboss-web>
  <security-domain>java:/jaas/simple</security-domain>
</jboss-web>
----------------------

WEB-INF/web.xml:
  Changed all instances of propertyAdmin to "guest", since that's what
  'simple' returns if a user is authenticated.

Simple is indeed set up in conf/tomcat/auth.conf and in
conf/default/auth.conf... it's marked as 'required' and it's not commented
out.

i try logging into the page with green/green or green/(nopassword) and get
rejected.

Redeployed the file, restarted the server, banged on the computer with a
large hammer... nothing seems to work... :(

David Green

On Tue, 26 Jun 2001, Scott M Stark wrote:

> You still have to specify a security-domain in jboss-web.xml.
> See the JAAS tutorial: http://www.jboss.org/documentation/HTML/ch11s83.html
>
> ----- Original Message -----
> From: "David Green" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 26, 2001 7:42 PM
> Subject: [JBoss-user] Authentication Problem...
>
>
> >
> > I've deployed a .war file with an index.jsp, and a web.xml that says
> > that the index.jsp should be protected. I've created a users.properties
> > and a roles.properties file in my jboss/conf area per the docs, the role
> > name matches what's in my web.xml, yet it isn't authenticating me when i
> > visit the page and type in a correct username/password. If anyone has
> > some insight into the problem, I'd be gracious. Here are the
> > offending files:
> >
> > WEB-INF/web.xml:
> > -----------------------------------------------------
> > <web-app>
> >
> >   <security-constraint>
> >
> >     <web-resource-collection>
> >       <web-resource-name>propertyeditor</web-resource-name>
> >       <description>Property Editor</description>
> >       <url-pattern>/*</url-pattern>
> >       <http-method>HEAD</http-method>
> >       <http-method>GET</http-method>
> >       <http-method>POST</http-method>
> >       <http-method>PUT</http-method>
> >       <http-method>DELETE</http-method>
> >     </web-resource-collection>
> >
> >     <auth-constraint>
> >       <description>Property Administrator</description>
> >       <role-name>propertyAdmin</role-name>
> >     </auth-constraint>
> >
> >     <user-data-constraint>
> >       <transport-guarantee>NONE</transport-guarantee>
> >     </user-data-constraint>
> >
> >   </security-constraint>
> >
> >   <login-config>
> >     <auth-method>BASIC</auth-method>
> >     <realm-name>properties</realm-name>
> >   </login-config>
> >
> >   <security-role>
> >     <description>Property Administrator</description>
> >     <role-name>propertyAdmin</role-name>
> >   </security-role>
> >
> > </web-app>
> > -----------------------------------------------------
> >
> > So, in order to access any page, the "propertyAdmin" role is needed.
> >
> > jboss/conf/users.properties:
> > (also in jboss/conf/tomcat/ and jboss/conf/default/ for good measure)
> > ----------------------------
> > green=green
> > ----------------------------
> >
> > jboss/conf/roles.properties:
> > (also in jboss/conf/tomcat/ and jboss/conf/default/ for good measure)
> > ----------------------------
> > green=propertyAdmin
> > ----------------------------
> >
> > From auth.conf:
> > ----------------------------
> > // The default server login module
> > other {
> > ----------------------------
> >
> > From online docs:
> > ----------------------------
> > The JaasServerLoginModule is a simple properties file based login module
> > that consults two Java Properties formatted text files for username to
> > password("users.properties") and username to
> > roles("roles.properties") mapping. The properties files are loaded during
> > initialization using the thread context class loader. This means that
> > these files can be placed into the J2EE deployment jar or the JBoss config
> > directory. The users.properties file uses a format:
> > ----------------------------
> > (I chose to put them in the JBoss config directory)
> >
> >
> > Ok, so "other" is the default. So if I don't specify which to use,
> > "other" gets used. So we know we're using the "other" ServerLoginModule.
> >
> > "other" uses two property files that you put in your conf directory called
> > users.properties and roles.properties. This defines users and roles. I
> > have done this per the docs.
> >
> > I require one of those roles in my web.xml. I go to the page in my
> > browser and type in a correct username/password for a user that
> > maps to the proper role, and it doesn't authenticate me.
> >
> > Can anyone see where I'm going wrong?
> >
> > Thanks,
> >
> > David Green
> >
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> >
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to