Create P12 keystore for Spring boot application - spring-boot

I need to enable SSL to my Spring boot application, So please guide to create a p12 Keystore using the below files for a Spring boot application.
****.crt
****.pem
gd_bundle****.crt

Related

How do I add SSL configuration to JBOSS standalone file for a Spring Boot application?

We have a Spring Boot application that we need to deploy to a JBOSS server. We have a requirement to keep all configuration in the JBOSS standalone.xml file. I need to get SSL set up on the Spring Boot application, but every guide I find shows how to add it to application.properties. How can I tell the Spring Boot application to use the SSL configuration from the JBOSS standalone.xml file?

Defining trust-store and key-store information in spring boot application with external tomcat

I have configured my trustsore and keystore information in the external tomcat's server.xml in the Connector tag. The certificates are stored in the tomcat's /base/lib directory.
I need to deploy a spring boot application to this external tomcat.
How can I make the information about trustsore and keystore available to the spring boot application?
Where in the spring boot application do I need to store the trsustore and keystore .jks files?
I did the same with the datasource in Resource tag in server.xml, and in spring boot application I used
spring.datasource.jndi-name=some name to jndi. How can I configure the same for trsustore and keystore?
The keystore and truststore in Tomcat's <Connector> have a single purpose:
the keystore contains the certificate (and private key) used by the server's SSL port,
the truststore contains the list of CAs, which are trusted if mutual SSL authentication is enabled.
Therefore these settings are specific to each deployment of your application. You shouldn't provide them yourself.
You should only provide system administrators a way to configure those settings. In your case Spring Boot already takes care of it (cf. server.ssl properties).
See also:
What is the difference between javax.net.ssl.keyStore and server.ssl.key-store properties when specifying keystore for a SpringBoot app

How to update truststore at runtime without restarting the application in spring boot

The use case is, in spring boot application,
I am using jks truststore, and I want my application to update the truststore in context if it is updated at runtime without application restart.
/**set truststore before you code create the connection, file is ***.jks file*/
System.setProperty("javax.net.ssl.trustStrore",file.getPath());
System.setProperty("javax.net.ssl.trustStrorePassword","changeit");
System.setProperty("https.protocols","TLSv1.2,TLSv1.1,SSLv3");

How to protect Spring boot application with keycloak Gatekeeper?

I have a spring boot application and I need to protect it with the keycloak gatekeeper. Should I configure the properties file or just add the gatekeeper config file in the application? Or should I have the gatekeeper config file separately? Are there any configurations to be made in keycloak admin console?

how to encrypt application.properties in spring boot

Spring use application.properties as the configure file, and I have created a new app which all working good exception the spring.database.password which does not meet the security requirement in my company. Is there any ways to encryt the psw? is there any example for me?
You could use jasypt to handle the encryption and then use Jasypt's Spring integration or this Jasypt Spring Boot Starter to wire it into Spring.

Resources