April 2018
Intermediate to advanced
432 pages
10h 38m
English
After discussing the basics regarding security in Java, we may proceed to the generation of private and public keys for our microservices. Just like before, we will use the command-line tool provided under JRE—keytool. Let's begin with a well-known command for generating a keystore file with a key pair. One KeyStore is generated for a discovery server, and a second for the one selected microservice, in this particular case, for account-service:
keytool -genkey -alias account -store type JKS -keyalg RSA -keysize 2048 -keystore account.jks -validity 3650keytool -genkey -alias discovery -storetype JKS -keyalg RSA -keysize 2048 -keystore discovery.jks -validity 3650
Then, the self-signed certificate has to be exported from ...