Spring Boot with HTTPS Example | Tech Primers

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ค. 2024
  • This video covers how to enable HTTPS in a Spring Boot Application
    🔗Github Code: github.com/TechPrimers/spring...
    📌 Related Playlist
    ================
    🔗Spring Boot Primer - • Spring Boot Primer
    🔗Spring Cloud Primer - • Spring Cloud Primer
    🔗Spring Microservices Primer - • Spring Microservices P...
    🔗Spring JPA Primer - • Spring JPA Primer
    🔗Java 8 Streams - • Java 8 Streams
    🔗Spring Security Primer - • Spring Security Primer
    🔗Containers Primer - • Containers Primer
    🔗Kubernetes Primer - • Kubernetes Primer
    🔗AWS Primer - • AWS Primer
    💥Join TechPrimers Slack Community: bit.ly/JoinTechPrimers
    💥Telegram: t.me/TechPrimers
    💥TechPrimer HindSight (Blog): / techprimers
    💥Website: techprimers.com
    💥Slack Community: techprimers.slack.com
    💥Twitter: / techprimers
    💥Facebook: TechPrimers
    💥GitHub: github.com/TechPrimers or techprimers.github.io/
    🎬Video Editing: iMovie
    🎼Background Music:
    Dyalla
    ---------------------------------------------------------------
    🔥 Disclaimer/Policy:
    The content/views/opinions posted here are solely mine and the code samples created by me are open sourced.
    You are free to use the code samples in Github after forking and you can modify it for your own use.
    All the videos posted here are copyrighted. You cannot re-distribute videos on this channel in other channels or platforms.
    #HTTPS #SpringBoot #TechPrimers
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 145

  • @beyondthenature
    @beyondthenature 2 ปีที่แล้ว +1

    I wasted my 2 hours on google to find out the solution, only your video could helped me. Thanks a lot mate!

  • @ColinsMatas
    @ColinsMatas 4 ปีที่แล้ว +5

    This video has ecactly what I need. Great job!

  • @rajeshayyappandurai7369
    @rajeshayyappandurai7369 6 ปีที่แล้ว +2

    Great 👍 this is wat I am searching so long ... finally I got it . Thank you so much 😊

  • @Premkumar-ln7gt
    @Premkumar-ln7gt 5 ปีที่แล้ว +1

    just loved the video....please keep helping other with ur valuable technical knowledge..thanks

  • @AmanUllah2net
    @AmanUllah2net 4 ปีที่แล้ว +1

    Thanks a lot sir, Very clear and workable example!

  • @ChristianAltamiranoAyala
    @ChristianAltamiranoAyala 6 ปีที่แล้ว +1

    Really a great demo... thanks for the video....

  • @kumaraakash25
    @kumaraakash25 5 ปีที่แล้ว +3

    Very informative and precise tutorial. Keep up the good work Tech Primers

  • @ramkumarnillavazagan6108
    @ramkumarnillavazagan6108 6 ปีที่แล้ว +1

    Very Thoughtful man👍

  • @akhilt9577
    @akhilt9577 4 ปีที่แล้ว

    thanks bro... straight to the point...you're awesome

  • @cnooisukapalli
    @cnooisukapalli 5 ปีที่แล้ว +2

    Never mind ! I had a typo.. it worked.

  • @photo_lab4095
    @photo_lab4095 5 ปีที่แล้ว +1

    its useful video thanks for making this king of videos

  • @rajeshg3570
    @rajeshg3570 3 ปีที่แล้ว +1

    nice.. simple and precise explanation.

  • @manojvit
    @manojvit 5 ปีที่แล้ว +1

    Excellent !! Very Useful :)

  • @Imprezamaster
    @Imprezamaster ปีที่แล้ว

    Helpful, thank you for making

  • @kiranumadi6802
    @kiranumadi6802 4 ปีที่แล้ว +1

    Thanks a lot :)
    Happy learning ...

  • @sujitbhosale8315
    @sujitbhosale8315 2 ปีที่แล้ว +1

    Very well explained!!

  • @shiyammosies5975
    @shiyammosies5975 2 ปีที่แล้ว +1

    Thanks for the very well put video. Need of the hour

    • @TechPrimers
      @TechPrimers  2 ปีที่แล้ว

      Glad it was helpful!

  • @firozpasha2766
    @firozpasha2766 5 ปีที่แล้ว +1

    Very useful video, can you please make some videos on JNDI for DB, JMS etc..?

  • @samsneera
    @samsneera 3 ปีที่แล้ว +5

    Nice work Tech Primers 👍
    It's quick and easy to understand this tutorial.
    I have identified one issue and below is the solution for the same.
    server.ssl.key-store-password should be used instead server.ssl.key-password. Otherwise you'll get java.security.unrecoverablekeyexception password verification failed

    • @adi0427
      @adi0427 3 ปีที่แล้ว

      Thank you so much . I got this error and resolved with your help :)

    • @AshutoshMohanty07
      @AshutoshMohanty07 2 ปีที่แล้ว

      Saved my day bro

  • @vikasbhardwaj9323
    @vikasbhardwaj9323 5 ปีที่แล้ว +1

    Thanks for sharing looking for this from long time . i have written rets api in which i have created insert and update .i have one to many relationship betwwen client and contact i am using jpa to save . now i am facing issue in update when i am adding new contact for existing client its making foreign key of existing record as null and adding new one in contact table.

  • @mohanbera2044
    @mohanbera2044 5 ปีที่แล้ว +1

    It was very helpful...

  • @jadhavakash481
    @jadhavakash481 3 ปีที่แล้ว +1

    can you show SSL/TLS in Active MQ and how message is trasferred over a secure network via producer-consumer model?

  • @balrajmys
    @balrajmys 6 ปีที่แล้ว +1

    Informative bro :) thanks :) please provide some videos on spring batch and spring integration features which u have not explored yet

  • @anindya7911
    @anindya7911 5 ปีที่แล้ว +1

    Very nice video , compact and to the point... thanks

  • @swarnashissarkar4767
    @swarnashissarkar4767 4 ปีที่แล้ว +1

    excellent!!!

  • @melsaied101
    @melsaied101 2 ปีที่แล้ว

    Thanks for your effort 👌

  • @csabacs8757
    @csabacs8757 2 ปีที่แล้ว +1

    Thanks!

  • @krushnachanadrabishoyi6913
    @krushnachanadrabishoyi6913 5 ปีที่แล้ว +1

    Thanxs for this video

  • @diegoramos27
    @diegoramos27 4 ปีที่แล้ว

    Could you pls explain the difference between keystore and truststore with an example please? also what is the difference between privateKeyEntry and trustedCertEntry? thanks...

  • @priyankjoshi3018
    @priyankjoshi3018 2 ปีที่แล้ว

    Nice 👍

  • @shaarg
    @shaarg 6 ปีที่แล้ว +2

    Good one as usual. 1080p 60fps please if possible :)

    • @TechPrimers
      @TechPrimers  6 ปีที่แล้ว +1

      haha. my laptop can record only in 720p for now :)

  • @msraju2326
    @msraju2326 3 ปีที่แล้ว +1

    Thanks brother

  • @kamallochanpadhi3582
    @kamallochanpadhi3582 3 ปีที่แล้ว

    You r superstar ..

  • @Dizzy_Dizz
    @Dizzy_Dizz หลายเดือนก่อน

    Hi, Kindly make a video of event source implementation. Thank you

  • @thrinathsf1280
    @thrinathsf1280 5 ปีที่แล้ว

    Good video. Can you please share how to use existing server certificate ? I have .crt and key file

  • @namjitharavind
    @namjitharavind 4 ปีที่แล้ว +1

    Could you please tell how this would be for godaddy ssl certificate?

  • @FreshersKosam
    @FreshersKosam 4 ปีที่แล้ว

    I usually generate private key and crt file using openssl. Does java applications only use keystore? For example if i have private key, crt file, bundle crt from CA, is it necessary to use keytool to make it java complaint? Can you little bit explain about truststore also please?

  • @ryanvidz955
    @ryanvidz955 4 ปีที่แล้ว

    Great video Ajay. Now how may I use the same steps to deploy the same application over an EC2 instance and use an aws certificate I have with me?

    • @TechPrimers
      @TechPrimers  4 ปีที่แล้ว

      Take a look at AWS CodeDeploy

  • @harshpalsingh1145
    @harshpalsingh1145 3 ปีที่แล้ว +2

    I don't know how this is working for you because you forgot to add "server.ssl.enabled=true" in the application.properties file.
    Another point i would like to add is if JKS is not working for you then create a PKCS12 certificate instead.

    • @samsneera
      @samsneera 3 ปีที่แล้ว +1

      Also, server.ssl.key-store-password should be used instead server.ssl.key-password. Otherwise you'll get java.security.unrecoverablekeyexception password verification failed

    • @cnelly749
      @cnelly749 2 ปีที่แล้ว

      @@samsneera yup everything you said is right. Idk how it works for him but these are the actual steps needed

  • @angadjha1253
    @angadjha1253 6 ปีที่แล้ว +1

    Hi sir, how to call https Rest service, using RESTTemaplte ? please explain

  • @mishrafamily691
    @mishrafamily691 2 ปีที่แล้ว

    can anyone help to load jks file on linux , tried to load with classpath:file of the path & file://file of the path),getting failed to load keystore type due to jks not found

  • @tanson86
    @tanson86 4 ปีที่แล้ว

    How to test an SSL with postman? In the certificates tab I don't see an input for jks file.

  • @kapilvaswani381
    @kapilvaswani381 4 ปีที่แล้ว

    Good video but I am having few questions:
    1. Everything is done by just one jks file. So where is private/public key comes in picture?
    2. How do private/public key looks like? They are also files?

  • @karthiksubbarao2365
    @karthiksubbarao2365 4 ปีที่แล้ว

    ty god bless u

  • @tejasgundecha5883
    @tejasgundecha5883 3 ปีที่แล้ว

    How do we create a truststore for micro services which would be consuming this https API ?

  • @vishalbiradar2558
    @vishalbiradar2558 3 ปีที่แล้ว

    How to use existing certs (CA, cert, key) and start the application on HTTPS.

  • @sasikala_chowdary
    @sasikala_chowdary 2 ปีที่แล้ว

    I am getting "failed to load keystore type (pkcs12) with path 'c:users:474***/sts....' Due to pkcs12 not found".. Any suggestions for this?

  • @leejojose
    @leejojose 2 ปีที่แล้ว

    Thankyou , how can we make it as possible in tomcat in cloud ? like 'hioxi india' or some other online tomcat , i have front end in public_html in cpanel and my spring boot code in Tomcat service in same host , but server os http and FE is https so CORS error is there, how can we solve it ?

  • @rajukapadne6502
    @rajukapadne6502 3 ปีที่แล้ว

    Sir , I want to know a scenario , How to get username by reading client certificate in SpringBoot ?

  • @venkatmaharajan4768
    @venkatmaharajan4768 4 ปีที่แล้ว

    What if the certificate expired and if I access application via HTTP, will it work?? My case I want both HTTP(internal use) and HTTPS(client) enabled. will this serve my requirement?

  • @akhilraj4535
    @akhilraj4535 3 ปีที่แล้ว

    if i upload this code with godady ssl certificate to Ec2 instance ,will https work there? or will i have to anything more in ec2 console?

  • @prudhvirajmadhu7526
    @prudhvirajmadhu7526 5 ปีที่แล้ว

    can we give any other port or 8443 is mandatory of https?

  • @mohammedshafiuddin8956
    @mohammedshafiuddin8956 4 ปีที่แล้ว

    HI! If anyone knows the solution can you please share, I am getting the following error :
    Caused by: java.security.UnrecoverableKeyException: Cannot recover key

  • @vageeshadiga5218
    @vageeshadiga5218 6 ปีที่แล้ว +1

    Good video. I have one question. If we are using spring boot microservices then we should run zuul API gateway in 8443 with the certificate inorder to have https. But other microservices can be run on any port with http only right?

    • @TechPrimers
      @TechPrimers  5 ปีที่แล้ว

      that's upto us. however the preferred way is to have all secured.!

    • @vageeshadiga5218
      @vageeshadiga5218 5 ปีที่แล้ว

      Tech Primers ok thank you

  • @NitishKumar-px2vx
    @NitishKumar-px2vx ปีที่แล้ว

    How to install paid SSL certificate in spring boot with swagger?

  • @vishnudixit68
    @vishnudixit68 5 ปีที่แล้ว

    can anyone share me a link for what was the SSL certificate and what is TSL certificate how to work on both? and tell me in this video what we have used SSL or TSL

  • @vemareddyamudam8070
    @vemareddyamudam8070 6 ปีที่แล้ว +1

    Thanks for the good video, it helps me alot. Also please help to upload video on how to call this rest service using restTemplate with keystore configuration step by step in spring boot.

    • @gunasekhar2729
      @gunasekhar2729 4 ปีที่แล้ว +1

      @vema reddy do you find any good video on calling the https rest service using restTemplate with keystore configuration

  • @sumansushil9256
    @sumansushil9256 2 ปีที่แล้ว

    Can anyone help to enable ssl configuration on linux

  • @cnooisukapalli
    @cnooisukapalli 5 ปีที่แล้ว

    HI , I am facing this error.. IllegalArgumentException: Alias name [=https-example] does not identify a key entry. -- Appreciate your help in advance !

  • @vikrantharne9345
    @vikrantharne9345 2 ปีที่แล้ว

    How to consume https using reattemplet

  • @marypaul9627
    @marypaul9627 ปีที่แล้ว

    thanks,can this self signed be used in production?n can it be used for all ports ?

    • @TechPrimers
      @TechPrimers  ปีที่แล้ว

      Its not adviced to use self signed in production since we cannot verify the authenticity of the request originator.

  • @theBeastMastersDojo
    @theBeastMastersDojo 4 ปีที่แล้ว +1

    How can I verify the certificate of a particular endpoint?
    I want to do a certificate based authentication before I do a get or post call between two endpoints. Please advise.

    • @TechPrimers
      @TechPrimers  4 ปีที่แล้ว

      You need to validate that with a certification provider/authority like Venafi

    • @theBeastMastersDojo
      @theBeastMastersDojo 4 ปีที่แล้ว

      @@TechPrimers I found something similar on what I am trying to do in below link:
      www.geeksforgeeks.org/keystore-getkey-method-in-java-with-examples/
      But, when I try to get the key it is always null....Stuck on this for a very long time now. Can you please advise?

  • @pavanisowndarya626
    @pavanisowndarya626 3 ปีที่แล้ว

    I implemented it but my application is up throw http and when using https it is saying this site cannot provide secure connection pls help

  • @vikashyadav-nr4my
    @vikashyadav-nr4my 6 ปีที่แล้ว

    Thanks Bro for this video tutorial.One question I have here.How and where will we put the .jks file in PCF while deploying this application on PCF.could you pls suggest something on this.
    Also this is self sign certificate.So if we got the production ready jks file then we just need to provide this file or some other config details required.Pls explain this also ..
    Thanks

    • @TechPrimers
      @TechPrimers  6 ปีที่แล้ว +1

      you can access it via the S3 object store. Or you can use the keystore service provided by PCF
      Other configs can be added in the service too

    • @vikashyadav-nr4my
      @vikashyadav-nr4my 6 ปีที่แล้ว

      Tech Primers thanks

  • @priyanshu4016
    @priyanshu4016 2 ปีที่แล้ว

    hi i am getting error :Keystore was tampered with, or password was incorrect " but I am using correct password

  • @AmitKumar-jv4mp
    @AmitKumar-jv4mp 2 ปีที่แล้ว

    Plz add how to consume using spring boot.

  • @ChetanRawattunein
    @ChetanRawattunein 3 ปีที่แล้ว

    I have a Auto generated SSL certificate by AWS on my website and want to use the same for my spring boot app.
    But as its auto generated, I don't have the config details to write in application.properties file.
    Can I write any random details or I need to get the exact use by the website ssl and how to get them ?

    • @TechPrimers
      @TechPrimers  3 ปีที่แล้ว

      You need the same one. You can dowoad it to ur EC2 and configure that path in app.properties file

  • @nikhilprasadthakur1693
    @nikhilprasadthakur1693 5 ปีที่แล้ว

    Can you please make a video explaining for enabling SSL security for eureka server and registerd micro services?

  • @saradn7715
    @saradn7715 5 ปีที่แล้ว

    If I have already deployed my web app on heroku and heroku did provide a certificate, can I use it or should I build it as in your video? And if I can use the one from heroku, how can I get it? My problem is that now my app has 2 url-s: one with http and anotherone with https...

    • @TechPrimers
      @TechPrimers  5 ปีที่แล้ว

      If you are on heroku and since heroku provides DNS. You should use that.

  • @alexeystaroverov4804
    @alexeystaroverov4804 4 ปีที่แล้ว

    unfortunately there ain't redirection to https from http in the video (

  • @prudhvirajmadhu7526
    @prudhvirajmadhu7526 5 ปีที่แล้ว

    how to enable https with out self signed certificates, with other kid of certificates

  • @yuriihizun7183
    @yuriihizun7183 6 ปีที่แล้ว

    Nice video, but why maven doesn't compile with java9?

    • @TechPrimers
      @TechPrimers  6 ปีที่แล้ว

      I have older version of maven in my system

  • @andreagomez5702
    @andreagomez5702 3 ปีที่แล้ว

    I cannot solve this error : java.lang.UnsatisfiedLinkError: org.apache.tomcat.jni.SSL.renegotiatePending(J)I

  • @monicaselva4822
    @monicaselva4822 5 ปีที่แล้ว +1

    Hi. This is very useful. When use the same command in windows command prompt it is showing it cannot find keytool keyword. Where the certificates to be generated in windows. Please help me

    • @TechPrimers
      @TechPrimers  5 ปีที่แล้ว +1

      you have to find keytool under your jdk and generate the certificate

    • @monicaselva4822
      @monicaselva4822 5 ปีที่แล้ว

      Thank u so much

    • @monicaselva4822
      @monicaselva4822 5 ปีที่แล้ว

      Will it not work in new versions of Springboot app

  • @danyfcrb
    @danyfcrb 4 ปีที่แล้ว

    Even though I've reproduces the same steps, I'm encountering the following error:
    io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: no cipher suites in common
    Does anyone know how this can be solved?

    • @danyfcrb
      @danyfcrb 4 ปีที่แล้ว

      I've found it. I missed to specify the algorithm (RSA). Apparently, SSL does not work without RSA.

  • @krztuszenie
    @krztuszenie 5 ปีที่แล้ว

    If I want to get rid of this red text https which is because google does not recognize this certificate, as you said. I have to buy my own certificate which can be recognized with google?

    • @TechPrimers
      @TechPrimers  5 ปีที่แล้ว +1

      Yes. you have to buy from a Certificate provider. like Digicert

  • @saurabhshrivastava1792
    @saurabhshrivastava1792 4 ปีที่แล้ว

    not working getting this error -The Tomcat connector configured to listen on port 8443 failed to start. The port may already be in use or the connector may be misconfigured. can you please help.

    • @jogo542
      @jogo542 4 ปีที่แล้ว

      Have the same issue but only when running the jar instead of in IntellIJ. Did you solve it?

  • @prashhanthnelakanti4992
    @prashhanthnelakanti4992 3 ปีที่แล้ว

    Bro do a video on hw to consume https through resttemplate

  • @dhanushacharya2129
    @dhanushacharya2129 4 ปีที่แล้ว

    Bro you're from Bangalore...

  • @vaibhav09193
    @vaibhav09193 3 ปีที่แล้ว

    Show it on external tomcat

  • @Stoic623
    @Stoic623 5 ปีที่แล้ว

    In the browser there is RED text "Not Secured" how can we avoid that.?

    • @TechPrimers
      @TechPrimers  5 ปีที่แล้ว

      You need a valid certificate created by Digicert/Entrust or any other certificate authority so that browsers can know that this is a valid domain

  • @lighthouse...9964
    @lighthouse...9964 3 ปีที่แล้ว

    our 1 day= 15 min ,,, worth

  • @bahdanshyshkin7918
    @bahdanshyshkin7918 6 ปีที่แล้ว

    How long you are in programming world? What's your experience?

    • @TechPrimers
      @TechPrimers  6 ปีที่แล้ว

      It's been more than 8 years now

  • @Virat77799
    @Virat77799 4 ปีที่แล้ว +1

    How to call this https get method via java client resttemplate?

    • @TechPrimers
      @TechPrimers  4 ปีที่แล้ว

      Hmm. Google is your savior buddy. There are lots of examples on how you call https APIs.

  • @hendisantika
    @hendisantika 2 ปีที่แล้ว

    I already followed the steps. But, current chrome said that certificate is invalid. What should I do? Thanks

    • @TechPrimers
      @TechPrimers  2 ปีที่แล้ว

      That's because the certificate is self signed and chrome doesn't know it. If you need a valid certificate you need to buy one from a certificate provider like Digicert or Google etc

    • @hendisantika
      @hendisantika 2 ปีที่แล้ว

      @@TechPrimers I know. I just want to try https on my localhost. Is it doable?

  • @bathulanagendra4621
    @bathulanagendra4621 6 ปีที่แล้ว +1

    How to make https from red color to green color...

    • @TechPrimers
      @TechPrimers  6 ปีที่แล้ว +1

      You need to register the certificate with Digicert/Symantec or any big cert authority firm. Thats when it turns Green(Browser validates the authenticity of the website using that certificate)

    • @thrinathsf1280
      @thrinathsf1280 6 ปีที่แล้ว

      @@TechPrimers how much it costs to register ?

  • @subhrajeetmitra3681
    @subhrajeetmitra3681 3 ปีที่แล้ว

    I am getting file not found when generating keystore

    • @TechPrimers
      @TechPrimers  3 ปีที่แล้ว

      Can you cross check if the path is correct

  • @AjithlalK
    @AjithlalK 5 ปีที่แล้ว

    Why your project not running in Java 9?

    • @TechPrimers
      @TechPrimers  5 ปีที่แล้ว

      Could be due to the Spring Boot versions. Try upgrading to new version

  • @peterrigo5940
    @peterrigo5940 2 ปีที่แล้ว +1

    how is it that its working? i had error solved it with server.ssl.key-store-password instead of server.ssl.key-password

    • @TechPrimers
      @TechPrimers  2 ปีที่แล้ว

      recently spring has changed the property in the latest verisons of spring boot. thanks for fixing it

    • @peterrigo5940
      @peterrigo5940 2 ปีที่แล้ว

      @@TechPrimers I see
      Sameer Bane has already mentioned that. sorry for the duplicate. Good Video.

  • @FrancoRob19
    @FrancoRob19 6 ปีที่แล้ว

    Why did not you use the latest version of spring Boot?

    • @petmik5022
      @petmik5022 6 ปีที่แล้ว

      cause security has soem changes and maybe it wont run well in new java etc

    • @TechPrimers
      @TechPrimers  6 ปีที่แล้ว

      spring boot 2 uses Spring 5. I wanted to make sure i make spring boot 2 as a separate series later

    • @FrancoRob19
      @FrancoRob19 6 ปีที่แล้ว

      Tech Primers that sounds good!!! Thanks For sharing this feature...

  • @alirezaalijani2776
    @alirezaalijani2776 3 ปีที่แล้ว +1

    How to Set Different HTTPS Certificates for Different Domain Names

    • @TechPrimers
      @TechPrimers  3 ปีที่แล้ว

      You need to chain the certificates

    • @alirezaalijani2776
      @alirezaalijani2776 3 ปีที่แล้ว

      @@TechPrimers Thank you very much. Where can I find the right training?

    • @alirezaalijani2776
      @alirezaalijani2776 3 ปีที่แล้ว +1

      @@TechPrimers or right doc

  • @sanjaykantheti4002
    @sanjaykantheti4002 5 ปีที่แล้ว

    Now Symanetic are being replaced by digiroot

  • @artembakaev1678
    @artembakaev1678 2 ปีที่แล้ว

    Sorry, didn't work. :(

  • @wanderingearth8217
    @wanderingearth8217 3 ปีที่แล้ว

    too many ads

  • @DJSS855
    @DJSS855 6 ปีที่แล้ว

    How client will access the https url?
    Do we need to do any thing in key store?

    • @TechPrimers
      @TechPrimers  6 ปีที่แล้ว

      we need to load the server's certificate into the client's keystore.

    • @vbnandu867
      @vbnandu867 6 ปีที่แล้ว

      Please write a client application as well