Enable HTTPS for Spring Boot App by Spring SSL Bundles + OpenSSL (Self-Signed Certificate)

  Рет қаралды 1,475

Linh Vu

Linh Vu

4 ай бұрын

In this video, we’re going to enable HTTPS for our Spring Boot Application using SSL Bundles from Spring Boot version 3.1. We’re also testing the SSL hot reload feature from Spring Boot version 3.2 that listens to the change of those SSL files to rotate the certificate as well.
Github: github.com/nlinhvu/spring-boo...
You Might Already Know Series: • You Might Already Know
References:
Old SSL Mechanism: docs.spring.io/spring-boot/do...
Spring Official Documentation - SSL: docs.spring.io/spring-boot/do...
Securing Spring Boot Applications With SSL: spring.io/blog/2023/06/07/sec...
SSL hot reload in Spring Boot 3.2.0: spring.io/blog/2023/11/07/ssl...

Пікірлер: 8
@julianoribeiroamerico3422
@julianoribeiroamerico3422 Ай бұрын
Great content! Is there a way to get the certificate and private key from properties as plain text for production?
@linhvudev
@linhvudev Ай бұрын
you can refer to the first tip docs.spring.io/spring-boot/reference/features/ssl.html
@0x0007N
@0x0007N 4 ай бұрын
Another great content dude. 💯
@linhvudev
@linhvudev 4 ай бұрын
thank dude for encouraging 😉!
@nhatnguyen1184
@nhatnguyen1184 3 ай бұрын
I use maven, and got error "PBE parameter parsing error: expecting the object identifier for AES cipher" when setting to use private-key-password, do you know how to fix it?
@linhvudev
@linhvudev 3 ай бұрын
I haven't encountered this error, and the official documentation of openssl also doesn't specify clearly the default symmetric encryption(AES, DES) is used to encrypt the private key. So let's divide the 1 line openssl above to smaller steps, to create a AES encrypted key first then generate a certificate with it: openssl genrsa -out server_rsa.key 2048 openssl pkcs8 -topk8 -inform PEM -in server_rsa.key -outform PEM -out server.key -v2 aes-256-cbc -passout pass:123456 openssl req -new -key server.key -out server.csr -subj "/CN=localhost" -passin pass:123456 openssl x509 -req -in server.csr -days 365 -sha256 -signkey server.key -out server.crt -passin pass:123456 After running 4 commands, you will end up with server.key and server.crt as they're needed in the yaml file.
@harisahmad7871
@harisahmad7871 3 ай бұрын
Thats a self signed certificate, useless for production. You should make a video on the proper way to do it. 👍
@linhvudev
@linhvudev 3 ай бұрын
thanks, you could be true, some internal services run in internal network might be potential use-cases.
Каха заблудился в горах
00:57
К-Media
Рет қаралды 9 МЛН
Jumping off balcony pulls her tooth! 🫣🦷
01:00
Justin Flom
Рет қаралды 26 МЛН
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 47 МЛН
Java KeyStore and TrustStore Explanation
5:08
Oleksiy Pototskyy
Рет қаралды 4,3 М.
SSL Certificates Explained
4:27
WittCode
Рет қаралды 19 М.
How to create a valid self signed SSL Certificate?
25:01
Christian Lempa
Рет қаралды 347 М.
Create an SSL Certificate Without Ports 80 and 443 (Certbot/LetsEncrypt)
3:58
Synthetic Everything
Рет қаралды 41 М.
Samsung laughing on iPhone #techbyakram
0:12
Tech by Akram
Рет қаралды 6 МЛН
Частая ошибка геймеров? 😐 Dareu A710X
1:00
Вэйми
Рет қаралды 4,5 МЛН
Как удвоить напряжение? #электроника #умножитель
1:00
Hi Dev! – Электроника
Рет қаралды 1,1 МЛН