I have been looking into the Azure Service Fabric development and I have successfully created some test HTTP Stateless-Service applications in Java. Now I'd like to use encrypted api server communication in form of HTTPS but I cannot find any information how such server could be set up in Service Fabric environment.
In my HTTP applications I have been using com.sun.net.httpserver.HttpServer
class and when I checked into the HttpsServer
class I could not figure out how I could get the certificate saved into the application so that it could be used with the HttpsServer
class. All the example applications using HttpsServer
seem to read the certificate file from disk and that is not possible in ServiceFabric environment as far as I know.
So what is the proper way to set up HTTPS server in Java Service Fabric Stateless-Service application?