Book Image

WildFly Cookbook

Book Image

WildFly Cookbook

Overview of this book

Table of Contents (23 chapters)
WildFly Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Securing WildFly using HTTPS


In this recipe, we will learn how to use a secure channel to provide your applications with services, which is by using the HTTPS protocol. If privacy is a concern for you, this recipe will show how you can protect your data traffic. By the way, securing your applications needs different considerations and aspects, which should be addressed and resolved by developers and operations team.

Getting ready

To get started, let's first create an ad-hoc folder to run our WildFly. In a terminal window execute the following:

$ cd $WILDFLY_HOME
$ cp -a standalone sec-std-node-1

Now it's time to create our keystore which is used to encrypt the data traffic. We will be using one password to open the keystore file itself, and one password to load the alias.

  1. Open a new terminal window and give the following commands:

    $ cd $WILDFLY_HOME
    $ cd sec-std-node-1/configuration
    $ keytool -v -genkey -alias wildfly.ssl -keypass alias.2015 -keyalg RSA -keysize 2048 -sigalg SHA1withRSA -keystore...