"Oscar kind" <> wrote in message
news:ujc7p1-...
> Ryan Stewart <> wrote:
> [...]
> > I've recently been experimenting with
> > container managed security, and have hit a problem. I notice you don't
seem
> > to be using SSL for your login form. Have you tried it? I'm using Tomcat
> > 4.1.30 with SSL. Basic authentication works fine, but when I try form
based
> > auth, it uses secure protocol, but on the wrong port. It tries to access
> > https://localhost:8080/secureApp/login.jsp. 8080 is the non-secure port.
It
> > should be trying 8081, which I set as the secure port. Have you run into
> > this? I can't figure out what's wrong.
>
> Assuming that both connectors are configured, does the connector for port
> 8080 know that the secure port is 8081? I forgot that one once...
>
>
> Oscar
>
Snippet from my connectors:
<Connector className="org.apache.coyote.tomcat4.CoyoteConnect or" ...
port="8080" ... redirectPort="8081" scheme="http" secure="false" ...>
<Factory
className="org.apache.catalina.net.DefaultServerSo cketFactory"/>
</Connector>
<Connector className="org.apache.coyote.tomcat4.CoyoteConnect or" ...
port="8009" ... redirectPort="8081" scheme="http" secure="false" ... >
<Factory
className="org.apache.catalina.net.DefaultServerSo cketFactory"/>
</Connector>
<Connector className="org.apache.catalina.connector.http.Http Connector"
port="8081" ... scheme="https" secure="true">
<Factory className="org.apache.catalina.net.SSLServerSocket Factory"
clientAuth="false" keystoreFile=".keystore" protocol="TLS"/>
</Connector>
Isn't that all the important stuff? This is the same problem that you
replied to about a week ago under subject: "J2EE container managed
security". If you recall from that post, other redirects work fine from the
nonsecure to the secure port, but when I try to use form-based
authentication with <transport-guarantee>CONFIDENTIAL</transport-guarantee>,
it tries to access the nonsecure port with https. Unless I'm mistaken, it's
*supposed* to go to the secure port for the login. It only makes sense for
it to. It just seems like it only makes it halfway there. I've even
downloaded some example code of form-based authentication. One was a
complete webapp. But all of the examples I see don't use a
transport-guarantee or use NONE, and when I plug in CONFIDENTIAL, it causes
this problem.