You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Luther Baker <lu...@gmail.com> on 2009/03/09 03:55:54 UTC
jetty, tapestry and realms
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
Re: jetty, tapestry and realms
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Sun, 08 Mar 2009 23:55:54 -0300, Luther Baker <lu...@gmail.com>
escreveu:
> Do Maven, Jetty, Realms and Tapestry play nice out of the box?
Maven does not affects this because it is a buid tool. I don't think
Tapestry affects this too, as, AFAIK, realms are handled at servlet
container level, before any webapp code is executed. I would try to test
how Jetty deals with realms before adding Tapestry to the mix and starting
it by hand, not by the Maven Jetty Plugin.
Disclaimer: I have never played with security realms . . .
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org