NOTE: I put a bounty on this question. I was not able to put a bounty yet on a similar BUT SIMPLER question, here. It is fine if you can help with this simpler question, and then we can put the answer on this one too. In the simpler question you can create the scenario yourself quite quickly. And I also downloaded Jetty 9.1.0 -- so I don't care if it works with 9.05 or 9.10, either version is fine.
I installed Spring Security Core to get the "channel security" feature, namely to indicate which controller actions require an ssl connection.
This works fine in development mode using a Jetty server -- e.g. /cert/page1 defined at bottom, it asks to approve an https connection as expected.
When I deploy the (production) WAR file to Jetty 9 server (hosted externally), I get a redirect loop indication when I go to the same controller/action (using Chrome), or then on Firefox it also indicates "page isn't redirecting properly". I cleared cookies in Chrome just in case, and same problem.
I created an SSL certificate for the Jetty 9 server following directions (using external cert agency) and to install it I looked at various ssl articles on Jetty, and then found it appears simplest to alter the start.ini file, which I did, uncommenting the following lines and pointing to my sslcert/keystore:
#===========================================================
# SSL Context
# Create the keystore and trust store for use by
# HTTPS and SPDY
#-----------------------------------------------------------
jetty.keystore=sslcert/keystore
jetty.keystore.password=xxxxx
jetty.keymanager.password=xxxxx
jetty.truststore=sslcert/keystore
jetty.truststore.password=xxxxx
jetty.secure.port=8443
etc/jetty-ssl.xml
#===========================================================
# HTTPS Connector
# Must be used with jetty-ssl.xml
#-----------------------------------------------------------
jetty.https.port=8443
etc/jetty-https.xml
Is there a general way I can tell if Jetty will take any https page request? In it's log it seems to come up okay from what I did, namely:
2013-10-04 20:48:43.520:INFO:oejs.ServerConnector:main: Started ServerConnector@73c87405{HTTP/1.1}{0.0.0.0:80}
2013-10-04 20:48:43.692:INFO:oejs.ServerConnector:main: Started ServerConnector@4194f034{SSL-http/1.1}{0.0.0.0:8443}
Also, for the my Config.groovy defining the secure channels I have:
grails.plugins.springsecurity.secureChannel.definition = [
'/cert/cpnimember': 'REQUIRES_INSECURE_CHANNEL',
'/cert/page1': 'REQUIRES_SECURE_CHANNEL',
'/cert/page2': 'REQUIRES_SECURE_CHANNEL',
'/cert/page3': 'REQUIRES_SECURE_CHANNEL',
'/cert/page4': 'REQUIRES_INSECURE_CHANNEL'
]
I'm not sure how to debug this. I'd like to go to some page on my jetty 9 server that requires https/ssl just to make sure that it works without the spring-security core defined channels, but don't know what that is.
Can you provide help on how to debug this or what is wrong?
Thanks.
This question is a similar answer to the simplified question I created and offered a bounty. Now that the other question's bounty is awarded I can remove this question. BUT, it is not letting me remove or delete it, so ...