Bernhard,
I have a web app with BASIC authentication that works fine. Here is the
web.xml and users.properties. I hope this helps.
Steve Penella
Allaire Corp.
======================================================================
users.properties:
-----------------
# users.properties
# This file contains a list of user names and their corresponding
# encrypted password. The format is:
#
# user.{username}={encrypted password}
#
# Each user can also be part of a group. Groups are defined in the
# following way:
#
# group.{group name}={list of users}
#
# The list consists of user names separated by a comma. To specify
# all users use a wildcard character (*)
#
# Users and groups can also be part of a role. Roles are defined
# in the following way:
#
# role.{role name}={list of users and/or groups}
#
# Users are specified by prepending "user." to the user name, while
# groups are specified by prepending "group." to the group name. If
# no prefix is given the name will be searched for as a user first
# then as a group. To specify all users use a wildcard character (*).
user.salesperson1=saK9deE1CUS3s
user.salesperson2=saK9deE1CUS3s
user.salesperson3=saK9deE1CUS3s
user.salesmanager=saQSf6rKATyto
user.marketingperson1=maB9SXWSwKfkI
user.marketingperson2=maB9SXWSwKfkI
user.marketingperson3=maB9SXWSwKfkI
user.marketingmanager=maB9SXWSwKfkI
user.techperson1=te6lYKlX6ghWo
user.techperson2=te6lYKlX6ghWo
user.techperson3=te6lYKlX6ghWo
user.techmanager=texZVpCqlhwlo
user.hrperson1=hrqbtc17KG.gs
user.hrmanager=hrAw5hgsG3JZY
group.all=*
group.sales=salesmanager,salesperson1,salesperson2,salesperson3
group.marketing=marketingmanager,marketingperson1,marketingperson2,marketing
person3
group.technical=techmanager,techperson1,techperson2,techperson3
group.hr=hrmanager,hrperson1
role.user=all
role.administrative=hr,salesmanager,marketingmanager,techmanager
role.manager=salesmanager,hrmanager,techmanager,marketingmanager
role.individual=salesperson1,salesperson2,salesperson3,marketingperson1,mark
etingperson2,marketingperson3,techperson1,techperson2,techperson3,hrperson1
role.customercontact=sales,marketing
web.xml
-------
<web-app>
<display-name>Web Authentication Test Application</display-name>
<description>Web Authentication Test Application</description>
<login-config>
<auth-method>
BASIC
</auth-method>
<realm-name>
Steve
</realm-name>
</login-config>
<security-constraint>
<web-resource-collection>
<web-resource-name>Root</web-resource-name>
<url-pattern>/*</url-pattern>
<description>All open to Everyone (Need to force a
login)</description>
</web-resource-collection>
<auth-constraint>
<role-name>user</role-name>
<description>all users</description>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>ADMINALL</web-resource-name>
<url-pattern>/administrativeonly_methodall/*</url-pattern>
<description>All methods open to administrative role
only</description>
</web-resource-collection>
<auth-constraint>
<role-name>administrative</role-name>
<description>Administrative Staff Only</description>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>CCALL</web-resource-name>
<url-pattern>/customercontactonly_methodall/*</url-pattern>
<description>All methods open to customer contact role
only</description>
</web-resource-collection>
<auth-constraint>
<role-name>customercontact</role-name>
<description>Customer Contact Staff Only</description>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>ADCCALL</web-resource-name>
<url-pattern>/administrativeandcustomercontact_methodall/*</url-pattern>
<description>All methods open to administrative and
customercontact role only</description>
</web-resource-collection>
<auth-constraint>
<role-name>customercontact</role-name>
<role-name>administrative</role-name>
<description>Customer Contact and Admin Staff Only</description>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>INDGETANDPOST</web-resource-name>
<url-pattern>/individualonly_getandpost/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
<description>GET and POST (explicitly) open to individuals
only</description>
</web-resource-collection>
<auth-constraint>
<role-name>individual</role-name>
<description>Individuals only</description>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Admin Only</web-resource-name>
<url-pattern>/individualonly_getandpost/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
<description>GET and POST (explicitly) open to individuals
only</description>
</web-resource-collection>
<auth-constraint>
<role-name>individual</role-name>
<description>Individuals only</description>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Sales only</web-resource-name>
<url-pattern>/manageronly/*</url-pattern>
<url-pattern>/manageronly_2/*</url-pattern>
<description>Managers only (for 2
directories)</description>
</web-resource-collection>
<auth-constraint>
<role-name>manager</role-name>
<description>Manager only</description>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Admin get only</web-resource-name>
<url-pattern>/administrative_getonly/*</url-pattern>
<http-method>GET</http-method>
<description>GET only to admins only</description>
</web-resource-collection>
<auth-constraint>
<role-name>administrative</role-name>
<description>Admin only</description>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>All users</web-resource-name>
<url-pattern>/all_postonly/*</url-pattern>
<http-method>POST</http-method>
<description>POST only to all users</description>
</web-resource-collection>
<auth-constraint>
<role-name>user</role-name>
<description>All users</description>
</auth-constraint>
</security-constraint>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<welcome-file-list><welcome-file>main.jsp</welcome-file></welcome-file-list>
<servlet-mapping><url-pattern>/junk/</url-pattern><servlet-name>junk</servle
t-name></servlet-mapping></web-app>
-----Original Message-----
From: Bernhard Herzog [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 25, 2000 4:22 AM
To: JRun-Talk
Cc: 'Sue Hove'
Subject: Re: PropertyFileAuthentication
Thank you for your very much for your answer.
But I have the same problem with role.users. As I understand
it I can put whatever role name I want after "role." (correct
me if I'm wrong):
# Users and groups can also be part of a role. Roles are defined
# in the following way:
#
# role.{role name}={list of users and/or groups}
#
I will try to find a fix for this sometimes later (when I need
User Roles). Meanwhile I will use Basic Authentication in Apache
which should be sufficient until then.
Thanks again
Bernhard
> -----Urspr�ngliche Nachricht-----
> Von: Sue Hove [mailto:[EMAIL PROTECTED]]
> Gesendet am: Montag, 23. Oktober 2000 17:12
> An: 'Bernhard Herzog '; 'JRun-Talk '
> Betreff: RE: PropertyFileAuthentication
>
> I've found that the file is wrong. It should be
>
> role.users=all
>
> Notice the 's' on users. For some reason, this file appears
> to be written
> wrong.
>
> HTH,
> Sue
>
> -----Original Message-----
> From: Bernhard Herzog
> To: JRun-Talk
> Sent: 10/23/00 9:31 AM
> Subject: PropertyFileAuthentication
>
> Hi All,
>
> I have tried to use Basic Authentication (PropertyFileAuthentication)
> with JRun. The browser displays the login box - but whatever I enter
> as username/password, I cannot login to my application
> (401 Unauthorized).
>
> ==== jrun/lib/users.properties:
>
> group.all=*
> role.user=all
> user.admin=adpexzg3FUZAk
> role.administrator=admin
>
> ==== web.xml
>
> <web-app>
> <display-name></display-name><description></description>
> <login-config>
> <auth-method>BASIC</auth-method>
> <realm-name>Administration</realm-name>
> </login-config>
>
> <security-constraint>
> <web-resource-collection>
> <web-resource-name>Administration</web-resource-name>
> <url-pattern>*</url-pattern>
> <http-method>GET</http-method>
> <http-method>POST</http-method>
> <description>Admintool Resource</description>
> </web-resource-collection>
> <auth-constraint>
> <role-name>administrator</role-name>
> <description>Administrators only</description>
> </auth-constraint>
> </security-constraint>
> </web-app>
>
> ==============
>
> Has anybody an idea what I am doing wrong here?
>
> Thanks
> Bernhard
> --------------------------------------------------------------
> ----------
> ------
> Archives: http://www.egroups.com/group/jrun-interest/
> Unsubscribe:
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=list
s/jrun_tal
k
or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
----------------------------------------------------------------------------
--
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe:
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe'
in the body.
------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body.