I have a Angular PWA hosted in Firebase, and I have a Spring boot service I'm trying to communicate with (running locally at the moment).
Firebase out of the goodness of their heart automatically create a SSL certificate for the hosted app, so that is secure and only accessible via HTTPS.
What I can't work out is how to setup my Spring boot service to accept/trust/allow those connections so the PWA can make basic REST calls for example (Do I even need to do this?).
My first thought was to add the certificate from Firebase to the Spring boot truststore, but either I'm doing it wrong or that is the wrong approach as I'm just getting javax.net.ssl.SSLHandshakeException: no cipher suites in common
with everything I've tried.
The commands I've ran to do this are as follows:
Download the certificate from Angular app URL
keytool -printcert -sslserver app.example.com:443 -rfc > temp.cert
Create a truststore from that certificate
keytool -keystore truststore.jks -alias example.com -import -file temp.cert
Then I'm just loading that into my Spring boot application.yml
file
server:
port: 8443
ssl:
key-store: classpath:truststore.jks
key-password: secret
key-alias: example.com
I'm not really sure if I've done this completely wrong, or missed a vital step.