I need to serve a specific CXF web service over HTTPS (I have several others that need to work over plain HTTP). In SecurityConfig.groovy, I set:
httpsPort = 8443
and tried both of
secureChannelDefinitionSource = '''
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT
/services/doodah/**=REQUIRES_SECURE_CHANNEL
/**=REQUIRES_INSECURE_CHANNEL
'''
and
channelConfig = [ secure: ['/services/productid/**'], insecure: '/' ]
The service stops responding to http protocol at 8080, but doesn't appear to be on https:8443 - at least, telnet connection to 8443 fails.
If I run the app with grails run-app -https, all the application works over https.
To separate http from https services, I'll probably need to do this: "Automatic http/httpS switching with Grails", but for now I'd like at least to get different services running on two different ports.
What steps should I follow to have one service working over HTTPS only?
Looks like there is something else SSL need to work in war, like in this quesion: SSL, Tomcat and Grails?
My environment is: Grails 1.3.5, acegi-security 0.5.3 (I know it's outdated), Tomcat 6.
grails run-appat all. It looks inTomcatServer.groovyintomcatplugin that HTTP and HTTPS startup modes are mutually exclusive. It might work differently way if deployed to a full-blown Tomcat, though, if I add SSL Connector toserver.xml. - Victor Sergienko