No video

Spring Boot | Manage your credentials using AWS Secrets Manager | RDS | JavaTechie

  Рет қаралды 38,634

Java Techie

Java Techie

Күн бұрын

In this tutorial I’m going to show you How to use AWS secrets-manager for storing and retrieving Datasource properties of RDS and make connection from spring boot application
#javatechie #SpringBoot #AWS #SecretsManager
GitHub:
github.com/Jav...
Blogs:
/ javatechie4u
Facebook:
/ 919464521471923
guys if you like this video please do subscribe now and press the bell icon to not miss any update from Java Techie
Disclaimer/Policy:
--------------------------------
Note : All uploaded content in this channel is mine and its not copied from any community , you are free to use source code from above mentioned GitHub account

Пікірлер: 88
@PhilipsMonsters
@PhilipsMonsters 3 жыл бұрын
Java Techie, you helped me a lot this week at my job, thanks your video. Thanks very much!
@nguyenquan4836
@nguyenquan4836 Жыл бұрын
Thank you so much!! My enjoy is watching your video.
@ganeshkalje9347
@ganeshkalje9347 28 күн бұрын
Very well explained. Thanks
@jpssasadara3624
@jpssasadara3624 Жыл бұрын
thanks so much. well explained video series which was really helpful to get a deep idea about the deployment process of AWS very quickly. thanks again. keep it up !!! (From Sri lanka)
@Javatechie
@Javatechie Жыл бұрын
Thanks buddy 😊
@jasper5016
@jasper5016 2 жыл бұрын
Thanks so much, brother. It's an amazing video.
@rimuru2483
@rimuru2483 2 жыл бұрын
Excellently explained, thanks man!
@jeevanragula
@jeevanragula 3 жыл бұрын
Instead of providing client id and secret in yml, we can make use of aws roles if application is deployed in EC2 and get the secret using that role.
@Javatechie
@Javatechie 3 жыл бұрын
Yes agreed ,also same we can configure in secrets manager
@nikinshanfaizal915
@nikinshanfaizal915 2 жыл бұрын
Can you please explain
@itsnarahari
@itsnarahari 3 жыл бұрын
Really helpful topic
@tanujagrawal7805
@tanujagrawal7805 3 жыл бұрын
Very Good work Sir, Please Keep It Up, It take Lot of of effort to provide such point to point content in very easy way , Thanks sir
@Javatechie
@Javatechie 3 жыл бұрын
Thanks Tanuj . Yeah it really required a big effort to prepare and edit each video
@pratishrutipanda6461
@pratishrutipanda6461 3 жыл бұрын
Nice content
@davidacosta5151
@davidacosta5151 2 жыл бұрын
Thank you Sir.
@mohakgupta5614
@mohakgupta5614 2 жыл бұрын
Great video, realy helped me to get this working quickly. keep up the good work !!!
@phanimc11211
@phanimc11211 5 ай бұрын
thx! as always your videos are always usefull
@SunnySingh080593
@SunnySingh080593 2 жыл бұрын
Excellent Demo, But don't you think accessKey and SecretKey in itself credentials and we should not be storing them in properties?
@Javatechie
@Javatechie 2 жыл бұрын
Yes agreed it should be kept either in vault or AWS secret manager
@thajmulhussain4842
@thajmulhussain4842 3 жыл бұрын
Please provide a video for .. how transactions happen in micro services by using Sega design pattern
@srinath710
@srinath710 3 жыл бұрын
Please post a video A synchronous communication between micro services using apache Kafka
@vickeychoudhary4230
@vickeychoudhary4230 Жыл бұрын
Thanks Basant sir , it is really good that you are explaining live. I have a question on this how we can do configuration for multiple database is it possible with same or we should use parameter store
@Javatechie
@Javatechie Жыл бұрын
No you need to use parameter store
@vickeychoudhary4230
@vickeychoudhary4230 Жыл бұрын
Is there any reference?
@aadiraj6126
@aadiraj6126 3 жыл бұрын
Sir, a complete tutorial video on "Keycloak"...pls!🙏
@selvapandymoorthy4173
@selvapandymoorthy4173 3 жыл бұрын
Good work 😊
@KrishnaVlogs898
@KrishnaVlogs898 7 ай бұрын
@Basant , could you please create a video for storing JKS and Truststore files in secret manager and use them in spring boot class while making call to a third party client using rest api with sending request body?
@pranavmahajan4190
@pranavmahajan4190 Жыл бұрын
Thanks for the video Basant. I have a question, we cannot deploy application to production with our access keys and secret keys. How do you deploy without using access key or secret key?
@Javatechie
@Javatechie Жыл бұрын
No it's required instead of keep them in project keep it external either in vault or secret manager
@pranavmahajan4190
@pranavmahajan4190 Жыл бұрын
@@Javatechie - Thanks Basant, my question is, here we are using "our personal" Access key and secret key. Every developer cannot use his own personal keys. In this case, how do you deploy on production? Which keys will be used?
@Javatechie
@Javatechie Жыл бұрын
In real-time we should use organisation provided AWS account not personal one buddy 🤗
@pranavmahajan4190
@pranavmahajan4190 Жыл бұрын
@@Javatechie - Ohh I was expecting more of using some type of IAM role and provide the configuration for that. Thanks for the help!
@csebreach8565
@csebreach8565 Жыл бұрын
Great explanation, I have doubt, is it not important to store the acess key and secret key like database passwords. If we have to not use access and secret key directly how can we do @javatechie. Here we are using directly by declaring in yml file.
@SandeepAS-ov3fk
@SandeepAS-ov3fk 6 ай бұрын
thank you
@YogeshKumar-ye8nd
@YogeshKumar-ye8nd 2 жыл бұрын
you have hard coded the secret key and secret ID but it changes frequency this is not right way to retrieve the credential
@sravanthik6320
@sravanthik6320 2 жыл бұрын
could you also explain other way to integrate with secret manager in spring boot using secret manager config dependency
@tarunreddy7
@tarunreddy7 2 жыл бұрын
What's the point of concealing DB credentials when you hardcode the main account's access key and secret key?
@Javatechie
@Javatechie 2 жыл бұрын
No it's Just demo which will explain how to work with AWS secret manager . Infact you can configure AWS secret and access key in secrets .
@kevinjia1984
@kevinjia1984 2 жыл бұрын
Thanks for the nice video. What if for the secret I fetching I need to inject the it into a property define in the property file for example application.secretkey = {{key placeholder}}. How can we achieve that ?
@Javatechie
@Javatechie 2 жыл бұрын
No we can't do that you need to get it from AWS secret object
@Isranaks
@Isranaks Жыл бұрын
Good video. One more question, how to remove hardcoded secret key and access key from YAML and fetch it from secrets manager?
@Javatechie
@Javatechie Жыл бұрын
The way i have configured other fields in the similar way is to configure these 2 values and load them using the secret manager
@Isranaks
@Isranaks Жыл бұрын
@@Javatechie I don't think we can able to retrieve them in the above manner. Because accessing secret manager first we need to access AWS by using credentials(access key/secret key). My only question here is, how we can securely maintain these values(without exposing publicly)
@surajJr24
@surajJr24 2 жыл бұрын
is it safe to store access key id and security key id in the application.properties if not where we should keep it?
@Javatechie
@Javatechie Жыл бұрын
It's always risky to store in application.prioerties you should always choose one of below vault , consul , config server or cloud secret manager
@Sateesh.rayapati
@Sateesh.rayapati 2 жыл бұрын
Nice. One question how app will get when there is change credentials without restart? is there any inbuilt code to handle this like spring cloud bus with config?
@rakeshuppala4342
@rakeshuppala4342 Жыл бұрын
Can you please create a video to call third party api from aws lambda function and handle file downloads and processing inside aws lambda function
@Javatechie
@Javatechie Жыл бұрын
Okay i will check
@sunnylohana2229
@sunnylohana2229 2 жыл бұрын
Can you please create a video on AWS parameter store with springboot?
@Javatechie
@Javatechie 2 жыл бұрын
It's same as secret manager man
@itsnarahari
@itsnarahari 3 жыл бұрын
What is the best place to host our microservices bro azure or AWS or cloudfoundry ?
@tree2rhym
@tree2rhym 2 жыл бұрын
but how to secure the access key ? which we already put in yaml file
@Javatechie
@Javatechie 2 жыл бұрын
You should keep this in secret
@girishpant7653
@girishpant7653 Жыл бұрын
My point is this support the password rotation? If not then any idea how that can be supported directly or we have to use cache?
@narendragupta6114
@narendragupta6114 7 ай бұрын
I have tried same approach but i am not able to make mysql db connection
@Javatechie
@Javatechie 7 ай бұрын
Please add log statements and validate whether value is loading to your application or not?
@PixelLoafLatte
@PixelLoafLatte 2 жыл бұрын
can you make tutorial about AWS Parameter Store too?
@avinashkv4913
@avinashkv4913 Жыл бұрын
Sir aws secret manager is an open source platform
@Javatechie
@Javatechie Жыл бұрын
Yes but it's chargeable as per AWS policy
@HemantKumar_rocks
@HemantKumar_rocks 3 жыл бұрын
is it safe to add client id and secret key of aws in application.properties?
@Javatechie
@Javatechie 3 жыл бұрын
Yes
@kambalavijay6800
@kambalavijay6800 2 жыл бұрын
@@Javatechie If one can manage to get hold of client id and secret key, they can easily manage to break into credentials manager right? One simply write this client program with the given client id and secret key and can access the rds right?
@ansariamin3865
@ansariamin3865 Жыл бұрын
Guyz I am trying to integrate the secret Manager on on premise web server…. We have jboss eap which is connecting to cloud database now I want to mask the id and password using secret manager on the on prem server… have tried multiple method online but nothing seems to work ……does anyone have document for this will by much help
@Javatechie
@Javatechie Жыл бұрын
Haven't tried buddy. Will check and update
@ansariamin3865
@ansariamin3865 Жыл бұрын
@@Javatechie thank you that will be a great help
@ansariamin3865
@ansariamin3865 Жыл бұрын
@@Javatechie brother any breakthrough on this?
@user-qo5fm1ow9v
@user-qo5fm1ow9v Жыл бұрын
Can we store jks and other certs in secrets manager and load them in spring boot?
@Javatechie
@Javatechie Жыл бұрын
Yes we can
@user-qo5fm1ow9v
@user-qo5fm1ow9v Жыл бұрын
@@Javatechie how can we store jks certs, as it is file there is no option use file as value in secrets manager?
@kamleshbca0290
@kamleshbca0290 Жыл бұрын
What will happen when someone gain the access of access token and secret key from .yml file. Can't it be then exploited???
@codewithraj9517
@codewithraj9517 3 ай бұрын
How to retrieve the secret key
@michelchaghoury9629
@michelchaghoury9629 2 жыл бұрын
is AWS Secrets Manager an always free service from AWS?
@Javatechie
@Javatechie 2 жыл бұрын
No it's paid one
@ravikumarprajapati3950
@ravikumarprajapati3950 Жыл бұрын
Hi sir I have to configured but why used gson
@govindrajk4276
@govindrajk4276 3 жыл бұрын
very good hands-on tutorial. My database is rds- postgresql, tried all the settings and steps to establish connection but getting error. org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception I am able to connect to RDS with my account (accessKey, secretKey, region).. but with the above video, am getting exception. any help with postgresql is appreciated. GK.
@Javatechie
@Javatechie 3 жыл бұрын
Not sure need to check
@govindrajk4276
@govindrajk4276 3 жыл бұрын
@@Javatechie Unable to build Hibernate SessionFactory; nested exception is java.lang.RuntimeException: Driver org.postgresql.Driver claims to not accept jdbcUrl, jdbc:postgres://xxxxx.xxxxx.ap-southeast-1.rds.amazonaws.com:5432/xxxxx this is the latest error. I have specified the driverClassName, but something wrong not able to detect.
@govindrajk4276
@govindrajk4276 3 жыл бұрын
@Java Techie, The rds secrets manager returns the engine as "postgres", while the latest driver supports "postgresql". I have append "ql" to the engine (data source property). you get the url jdbc:postgresql://xxxxx.xxxxx.ap-southeast-1.rds.amazonaws.com:5432/xxxxx no complaints.. but different error now -- unable to open JDBC connection for DDL execution.. Atleast the main error is gone. Thanks
@Javatechie
@Javatechie 3 жыл бұрын
Did you configure valid username and password while creating secret manager
@govindrajk4276
@govindrajk4276 3 жыл бұрын
@@Javatechie Yes, the configuration is all good. The reason for the connection timeout is that my RDS is in a private subnet. This is not accessible from my local machine (windows), only accessible when the code is shipped into AWS infra (EC2) and executed. Do you know how to create separate configuration for local environment (picking up from application-properties) and when shipped into AWS the datasource to be loaded from AWS secrets manager. Thank you for all your help. 🙏
@mysavingclub
@mysavingclub 3 жыл бұрын
Which s/w you use for video recording and editing? Pls reply
@Javatechie
@Javatechie 3 жыл бұрын
I am using paid one . Please mail me javatechie4u@gmail.com
@mysavingclub
@mysavingclub 3 жыл бұрын
@@Javatechie I emailed you. pls reply
@srikanthv9641
@srikanthv9641 3 жыл бұрын
Bro why don’t you don’t video on quarkus Technology on reactive
@Javatechie
@Javatechie 3 жыл бұрын
I never tried this but definitely I will check
@Antonio-tv8gi
@Antonio-tv8gi 3 жыл бұрын
Puta de um trampo, o que antes era resumido em duas linhas do properties
@narendragupta6114
@narendragupta6114 7 ай бұрын
Getting below error i have tried many solution but still have same issue com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
@Javatechie
@Javatechie 7 ай бұрын
Seems value is not loading for you . Please debug and check also cross verify with my code you might be missing something
The Giant sleep in the town 👹🛏️🏡
00:24
Construction Site
Рет қаралды 19 МЛН
Doing This Instead Of Studying.. 😳
00:12
Jojo Sim
Рет қаралды 34 МЛН
Revolutionary Uses for Leftover Styrofoam
00:19
Делай сам
Рет қаралды 6 МЛН
Database password rotation with AWS Secrets Manager and Spring Boot
15:29
Maciej Walkowiak 🍃 Spring Academy
Рет қаралды 27 М.
The Giant sleep in the town 👹🛏️🏡
00:24
Construction Site
Рет қаралды 19 МЛН