Do Maven, Jetty, Realms and Tapestry play nice out of the box?

App works just fine without any of the following - but after adding the
below, I'm getting an error and I'm not sure what I'm missing. The error
sure looks like it is *partly* working ... "FORBIDDEN" but the browser is
NOT prompting me with a browser popup defined by
<auth-method>BASIC</auth-method>.

Thoughts?

Thanks,

-Luther




HTTP ERROR 403

Problem accessing /notebook/Home. Reason:

    FORBIDDEN

------------------------------
*Powered by Jetty://




*
*web.xml*

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>basic-notebook-auth</web-resource-name>
            <url-pattern>/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
        </web-resource-collection>
        <auth-constraint/>
        <user-data-constraint>
            <transport-guarantee>NONE</transport-guarantee>
        </user-data-constraint>
    </security-constraint>
    <login-config>
        <auth-method>BASIC</auth-method>
        <realm-name>*notebook-realm*</realm-name>
    </login-config>


*pom.xml*

      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>maven-jetty-plugin</artifactId>
        <configuration>
          <contextPath>notebook</contextPath>
          <connectors>
            <connector
implementation="org.mortbay.jetty.nio.SelectChannelConnector">
              <port>9090</port>
              <maxIdleTime>60000</maxIdleTime>
            </connector>
          </connectors>
          <userRealms>
            <userRealm
implementation="org.mortbay.jetty.security.HashUserRealm">
              <name>*notebook-realm*</name>
              <config>
src/main/config/jetty/notebook-hash-user-realm.properties</config>
            </userRealm>


*src/main/config/jetty/notebook-hash-user-realm.properties*

#
# This file defines users passwords and roles for a HashUserRealm
#
# The format is
#  <username>: <password>[,<rolename> ...]
#
# Passwords may be clear text, obfuscated or checksummed.  The class
# org.mortbay.util.Password should be used to generate obfuscated
# passwords or password checksums
#
testuser: secretpassword

Reply via email to