HTTPS was previously configured with Tomcat, and HTTPS is configured after switching WildFly8, however WildFly8 configuration https is not the same as Tomcat configuration https.
1, HTTPS
HTTPS is a layer of encryption on the basis of HTTP, the commonly used encryption algorithm is RSA, asymmetric key encryption, the principle based on large number of factorization, the need for public and private keys, public key external, private key confidentiality, with public key encryption, the private key to decrypt.
I test the environment we use the JDK comes with the tool generated, the specific operation is as follows:
1. Generate a certificate for the server: keytool-genkey-v-alias wildfly-keyalg rsa-keystore D:\wildfly.keystore-validity 36500password:201314 your name What is the word and last name? LOCALHOST2, generate a certificate for the client: keytool-genkey-v-alias mykey-keyalg rsa-storetype pkcs12-keystore d:\mykey.p12password:123456l OCALHOST3, let the server trust the client certificate: Keytool-export-alias mykey-keystore D:\mykey.p12-storetype pkcs12-storepass 123456-rfc-file D : \mykey.cerkeytool-import-v-file D:\mykey.cer-keystore D:\tomcat.keystorekeytool-list-keystore d:\ Tomcat.keystore4, let the client trust the server certificate: Keytool-keystore D:\wildfly.keystore-export-alias wildfly-file D:\wildfly.cer
The resulting certificate is as follows:
2, Configuration Standalone.xml
First specify the generated certificate, configure the permission level is background managementrealm, can also be set to apply level Applicationrealm, for example in this article
Configure the listening port, specify that the binding is named HTTPS, and other similar:
Make the listener HTTPS configuration effective, using a binding called HTTPS, with a security level of Managementrealm:
The active operation can also be manipulated in the background graphical interface:
3. Verification:
The startup service is displayed as follows:
Enter https://127.0.0.1:9443 in the browser with the following effect:
A lock appears in the input box, which is configured to complete.
Diagram Wildfly 8.X Configuring HTTPS