Documentation Center

Configuring your SSL keystore in your microservice

At the bottom of your microservice's application.properties file, configure the keystore and its properties.

Procedure

  1. Access the configuration subfolder of your microservice.
  2. Open application.properties for editing.
  3. Add at least the following lines at the bottom of the file:
    server.ssl.enabled=true
    server.ssl.protocol=TLS
    server.ssl.key-alias=ALIAS
    server.ssl.key-store=FILE.JKS
    server.ssl.key-password=PASSWORD
    where:
    • ALIAS is the alias you provided for the keystore
    • FILE.JKS is the name of the keystore file (with extension .jks)
    • PASSWORD is the password with which you secured the keystore.

    You may need to add further properties, such as server.ssl.trust-store and server.ssl.trust-store-password, depending on your environment. Refer to the list of common application properties in the Spring Framework documentation for more information.

  4. To verify, start your microservice (using the start.sh or start.ps1 script). Visit the URL of the microservice and verify that you see a lock icon in the address bar of your browser, confirming that the resource is protected using SSL.