users@glassfish.java.net

Basic Authentication in Glassfish 9.1_01

From: <glassfish_at_javadesktop.org>
Date: Thu, 27 Mar 2008 07:00:14 PST

I've been trying to configure GF to provide BASIC authentication via a file or ldap realm, and I can't even get the appserver to challenge for the username & password. If I deploy the web application to Sun Appserver 7 or Jetty, it does issue the challenge, but Glassfish does not, with the same web.xml/sun-web.xml configuration, the only difference being the realm name.

Is there something simple that I'm missing - I'm starting from an out-of-the-box installation with the 'file' realm, with a couple of users added through the Admin Console.

I've attached the web.xml & sun-web.xml, and the file realm is configured as:

<auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
  <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"/>
  <property name="jaas-context" value="fileRealm"/>
</auth-realm>

The Security Default Realm is set to 'file', though I wouldn't expect that to matter, since the web.xml is explicit about that.

Can anyone help?

Thanks in advance.
[Message sent by forum member 'benk' (benk)]

http://forums.java.net/jive/thread.jspa?messageID=266220