Self signed certificate in spring boot


j

I'm trying to get a Spring-Boot server up and running, which provides some security over SSL. I followed steps 1 and 2 of this guide to get a self-signed certificate and was able to access my website via . This looks like this:httpsapplication.properties

server.port=8443
server.ssl.keyStore=classpath:keystore.p12
server.ssl.keyStorePassword=youd_want_to_know
server.ssl.keyStoreType=PKCS12
server.ssl.keyAlias=hs

keystore.p12produced in

$ keytool -genkey -alias hs -storetype PKCS12 \
-keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650

All fields are "unknown" except for the password where no password is entered.

However, the lock in the browser is not green. Details say

There was a problem with the website's certificate chain (net::ERR_CERT_AUTHORITY_INVALID).

advantage:

A secure TLS connection connects
to this site using strong protocol versions and cipher suites.
Secure Resources
All resources on this page are secured.

I guess in plain text means the data is transmitted securely, but browsers are not happy that the certificate can't track authenticity. So I know this is not suitable for production (it is not needed now).

But since I own the server and know I created the self-signed certificate, is it safe and secure for me? Or is there a way to convert it to a certificate that the browser is happy with? What do I need to do to get this to work, what does the Sprint-Boot configuration look like?

playboy

In short, it's totally insecure to use a self-signed certificate, unless

  1. You control every machine between server and server, or
  2. You check that the key in the certificate is what you expect.

The only advantage is ; whether or not the CA certificate is issued by a major CA, it prevents passive attacks (the attacker observes the data, but doesn't change it in any way).

Take a look here https://security.stackexchange.com/a/8112

Related


Self signed certificate in spring boot

j I'm trying to get a Spring-Boot server up and running, which provides some security over SSL. I followed steps 1 and 2 of this guide to get a self-signed certificate and was able to access my website via . This looks like this:httpsapplication.properties ser

Self signed certificate in spring boot

j I'm trying to get a Spring-Boot server up and running, which provides some security over SSL. I followed steps 1 and 2 of this guide to get a self-signed certificate and was able to access my website via . This looks like this:httpsapplication.properties ser

Self signed certificate in spring boot

j I'm trying to get a Spring-Boot server up and running, which provides some security over SSL. I followed steps 1 and 2 of this guide to get a self-signed certificate and was able to access my website via . This looks like this:httpsapplication.properties ser

Self signed certificate in spring boot

j I'm trying to get a Spring-Boot server up and running, which provides some security over SSL. I followed steps 1 and 2 of this guide to get a self-signed certificate and was able to access my website via . This looks like this:httpsapplication.properties ser

Self signed certificate in spring boot

j I'm trying to get a Spring-Boot server up and running, which provides some security over SSL. I followed steps 1 and 2 of this guide to get a self-signed certificate and was able to access my website via . This looks like this:httpsapplication.properties ser

Enable HTTPS in spring boot 2.0 with self-signed certificate

Nguyen Minh Thuan: I'm following this tutorial using a self-signed certificate and enabling HTTPS in Spring Boot 2.0 just for testing purposes. In summary, the tutorial includes the following steps: Use 1.Generate keystore keytool. keytool -genkey -alias tomca

Enable HTTPS in spring boot 2.0 with self-signed certificate

Nguyen Minh Thuan: I'm following this tutorial using a self-signed certificate and enabling HTTPS in Spring Boot 2.0 just for testing purposes. In summary, the tutorial includes the following steps: Use 1.Generate keystore keytool. keytool -genkey -alias tomca

Spring WebFlux Netty SSL with self signed certificate error

Peter I'm trying to access a Spring Boot application running on Netty via https in localhost using a self signed certificate on the server side. Mine application.propertieslooks like this: server.ssl.enabled=true server.ssl.key-store-type=JKS server.ssl.key-st

Spring WebFlux Netty SSL with self signed certificate error

Peter I'm trying to access a Spring Boot application running on Netty via https in localhost using a self signed certificate on the server side. Mine application.propertieslooks like this: server.ssl.enabled=true server.ssl.key-store-type=JKS server.ssl.key-st

TLS with self-signed certificate

breakdown I am trying to establish a TLS connection using a self signed server certificate. I generated the certificate using the following sample code : http://golang.org/src/pkg/crypto/tls/generate_cert.go My relevant client code looks like this: // server c

AFNetwork with self-signed certificate

give him the cd I'm trying to setup a self-signed SSL certificate for an IOS app with a REST backend. My question is when should I use [securityPolicy setAllowInvalidCertificates:YES]; when to use self-signed certificates? No and don't have a trusted certifica

Self-signed certificate on iOS

Duncan https://cordova.apache.org/docs/en/8.x/guide/appdev/security/index.html mentions The reason is that accepting a self-signed certificate bypasses certificate chain verification, making the device think any server certificate is valid. Does this mean that

TLS with self-signed certificate

Zapp I am trying to establish a TLS connection using a self signed server certificate. I generated the certificate using the following sample code : http://golang.org/src/pkg/crypto/tls/generate_cert.go My relevant client code looks like this: // server cert i

Self-signed certificate for localhost

winter soldier my machine localhost image I've created a self-signed Apache certificate for localhost, but I'm getting a red https (insecure connection). How can I make it green https. Bellagose You're using a self-signed certificate, so by default browsers wo

Self-signed certificate with CA

Jawad-Dev: I am working on a solution for file encryption via a combination of RSA and AES. RSA is basically used here for a handshake to encrypt a symmetric key and decrypt with the key pair at the receiver side. I have used Java keystore for private key and

Self-signed certificate with CA

Jawad-Dev: I am working on a solution for file encryption via a combination of RSA and AES. RSA is basically used here for a handshake to encrypt a symmetric key and decrypt with the key pair at the receiver side. I have used Java keystore for private key and

TLS with self-signed certificate

breakdown I am trying to establish a TLS connection using a self signed server certificate. I generated the certificate using the following sample code : http://golang.org/src/pkg/crypto/tls/generate_cert.go My relevant client code looks like this: // server c

Self-signed certificate in Android

Abdul Qayyum I can use a self signed certificate created with openssl. The only problem I'm having with certificates HttpsURLConnectionis the HostnameVerifier. If I provide my own HostnameVerifier it always return truelooks like this: HostnameVerifier hostname

Backend with self-signed certificate

juncaks I am building a website with backend/frontend separation. Currently, the website is hosted on a Kubernetes cluster at my home. There is one pod in the frontend and another in the backend. These pods can be accessed through Traefic. I have internal DNS

InternetOpenUrl with self-signed certificate

Miyamoto Usagi The following code works to download the file, but it doesn't work if the server has a self-signed certificate: DWORD errCode = 0; HINTERNET intOpenHandle = InternetOpen("Snippet", LOCAL_INTERNET_ACCESS, NULL, 0, 0); errCode = GetLastError(); if

Composer Self-Signed Certificate

Graham Dodgson Updated to the latest version of composer. We've been hosting our package repository on http for years without any issues, but now, composer says it needs to be connected via https. I can fix this by putting the following: "secure-http": fal

Self-signed certificate on iOS

Duncan https://cordova.apache.org/docs/en/8.x/guide/appdev/security/index.html mentions The reason is that accepting a self-signed certificate bypasses certificate chain verification, making the device think any server certificate is valid. Does this mean that

AdminClient self-signed certificate

Strike08 I am using com.ibm.websphere.management.AdminClient in my program to connect to multiple DMGRs. The problem is that these servers all use self-signed certificates. Is there any way to force AdminClient to accept self-signed certificates, anyway? Barba