Protecting data confidentiality and integrity with SSL/TLS
Security also means protecting the transportation of your data, and for this purpose we have the most popular method, which is called the Secure Sockets Layer (SSL).
Transport Layer Security, or TLS, is the newest version of SSL. So, we have SSL 3.0 and TLS 1.0 as the protocols supported by GlassFish 5.0.
This recipe will show you how to enable GlassFish 5.0 to work properly with SSL. All Java EE servers have their own way of doing this.
Getting ready
To enable SSL in GlassFish, you need to configure an HTTP listener for SSL. All you need to do is this:
- Make sure GlassFish is up and running.
- Use the
create-ssl
command to create your HTTP listener for SSL. - Restart the GlassFish server.
How to do it...
- To do this task, you need to access the GlassFish remote command-line interface (CLI). You can do it by going to this path:
$GLASSFISH_HOME/bin
- Once you are there, execute the following command:
./asadmin
- When the prompt is ready, you can execute...