Very well done (i am not yet thru)! Very many thanks - absolute great tutorial! May i kindly ask if one must have a running Postgres on the defined port running or should that be "generated on the fly"? (only part i had to switch to a inmemory H2 DB because i wasn't able to get it to run). Will defently further dive in to the materia to get a full understanding but you already enabled me for a quite good base to further learn! Again thank you! :)
@TheDevWorldbySergioLemaКүн бұрын
Thanks! You can use H2 or a Postgres instance from a Docker image.
@marcolucibelli52494 күн бұрын
You're so awesome
@TheDevWorldbySergioLema2 күн бұрын
Thank you Marco!
@pavanmadiraju4 күн бұрын
Nice video, I was almost able to have my spring cloud config client get password from vault. Not sure what you did on the client side to indicate that it needs to get the password from Spring Config vault. Can you share what how did you accomplish that. Spring documentation seems to refer to about Define properties with the {vault} prefix to specify the Vault path and key for retrieving secrets:
@TheDevWorldbySergioLema2 күн бұрын
Thanks! On the client, I've added the configuration of Spring Config Client indicating that the first source is from Vault (and I've configured the Vault access).
@mahajveemahajvee89419 күн бұрын
What if the user tries to acess Microservice directly insted of api Gateway..??
@TheDevWorldbySergioLema8 күн бұрын
He can't. The microservices are in private network and not reacheable from the outside.
@ivanovmario_539810 күн бұрын
Thank you so much for the video. I have a problem related to storing the session information in redis. When you opened the redis cli, i noticed that the first entry is regarding the principal, but in my case it's not present. I tried logging whether spring security is creating the user and it is, but it's not persisting the principals information along with the session id and expirations in redis. Therefore when i try to fetch the sessions linked to the user i get nothing :( NOTE: i've defined the user inside the .properties file, i don't know if that's relevant.
@TheDevWorldbySergioLema8 күн бұрын
Do you have the necessary Redis dependency in your pom.xml?
@raghavendra697813 күн бұрын
Thank you :)
@TheDevWorldbySergioLema13 күн бұрын
Thanks to you for watching!
@stanleynyekpeye531813 күн бұрын
Thanks for the video. However, I have a question. Is there a way to login to keycloak without redirecting to the keycloak login page? I have a custom login screen in my ReactJS app and I want to make use of it instead.
@TheDevWorldbySergioLema13 күн бұрын
Yes, you can configure a custom login page in Keycloak
@stanleynyekpeye531812 күн бұрын
@@TheDevWorldbySergioLema Ok. How do I go about it?
@TheDevWorldbySergioLema10 күн бұрын
I didn't try it, but this seems to be what you're looking for: www.baeldung.com/keycloak-custom-login-page
@galassoWorkstation13 күн бұрын
Mate. Nice video, teached me a lot of things. As a constructive criticism, when you dont talk while writing some code, put a song to play louder, and when youre speaking, let the same song in the background. Its a nice strategy and increase the quality of your video!
@TheDevWorldbySergioLema13 күн бұрын
Thanks! I'll take your advice into account
@pg081215 күн бұрын
Superb content
@TheDevWorldbySergioLema14 күн бұрын
Thanks!
@HadilAmrani-t8i17 күн бұрын
I don’t know why my token can be displayed through system.out however in the front I can’t seem to get the value of the token, the field token doesn’t even show in my response
@TheDevWorldbySergioLema14 күн бұрын
What HTTP response code do you have?
@revel11118 күн бұрын
I am sooo confused I am a beginner. Is it possible to integrate this approach into view based authorization? By that I mean using MVC controller, and not REST. If yes, then what should I do? I use mechanism with the userDetailsService and this classical form with login and password.
@TheDevWorldbySergioLema15 күн бұрын
This works by default with Spring Security. The approach I show in the video is oriented for REST applications. For MVC applications with a session, the default Spring Security configuration should be enough
@revel11115 күн бұрын
@@TheDevWorldbySergioLema Okay, thank you very much!
@pasinduminiruwan499023 күн бұрын
Not beginer friendly
@TheDevWorldbySergioLema23 күн бұрын
I'm sorry for that. You should have some knowledge about Java. About Spring Boot, just knowing what it is should be enough. What's your level?
@srinivastadimalla123226 күн бұрын
Hi Sir, the applicaiton back and front end are running now but.. not really sure why i am getting backend point not found.. where as I am able to hit the endpoint via Postman..nt_app_login_form_3_Template_app_login_form_onSubmitLoginEvent_0_listener @ content.component.html:8 onSubmitLogin @ login-form.component.ts:29 LoginFormComponent_Template_form_ngSubmit_11_listener @ login-form.component.html:17 Zone - HTMLFormElement.addEventListener:submit (async) LoginFormComponent_Template @ login-form.component.html:15 ContentComponent_Template
@TheDevWorldbySergioLema15 күн бұрын
Does it work from postman or a terminal?
@kihel-b4e27 күн бұрын
Great Job
@TheDevWorldbySergioLema26 күн бұрын
Thanks!
@srinivastadimalla123227 күн бұрын
Hi Sir.. I am getting the below error while running the Spring Boot Applicaiton /Users/Srikar/Desktop/Angular/AngularSecurity/backend/src/main/java/com/srikar/jwt/backend/mappers/UserMapper.java:14: error: Unknown property "password" in result type User. Did you mean "null"? @Mapping(target = "password", ignore = true) ^
@TheDevWorldbySergioLema27 күн бұрын
It's because your entity User is missing a field named "password".
What's the order of the dependencies in your pom.xml? You must have Lombok first, then Mapstruct. Otherwise, Lombok won't create the getters and setters and Mapstruct won't see the fields
@ram097329 күн бұрын
One more question: isn't this solution vulnerable to CSRF? Yes, we don't have sessions. But imagine a button on other site with delete request to protected url on ours. User clicks it and authentication cookie will work on our site. Or I am wrong?
@TheDevWorldbySergioLema29 күн бұрын
Yes, this solution is vulnerable to CSRF because the browser doesn't manage the cookies sent with each request.
@ram097329 күн бұрын
@@TheDevWorldbySergioLema thank you, you are very kind, always answer a questions 👍
@TheDevWorldbySergioLema28 күн бұрын
you're welcome
@chinmayhegdehereАй бұрын
I have cloned the project during the project setup I am getting error at WebClient declaration saying it may not have been initialized same in UserRepository and PasswordEncoder
@TheDevWorldbySergioLemaАй бұрын
Do you have more information?
@chinmayhegdehereАй бұрын
Yeah basically it is asking for initialization of WebClient, UserRepository and Password Encoder variables. If it is initialized to null the error will go but during running it ll show this.userRepository is null
@chinmayhegdehereАй бұрын
And also have a doubt regarding editing etc/hosts. We have assigned each service with different ports so wont it redirect properly. What is the actual necessity of creating aliases?
@TheDevWorldbySergioLema29 күн бұрын
This seems to be an error in one dependency. So it's cascading to all other dependencies. Check if there is another error specific to a single depdency.
@TheDevWorldbySergioLema29 күн бұрын
The necessity of the alias is because the browser will create cookies for a domain after the sign in is successful. If all the domains are localhost (the port is not taken into account), you're overwriting the cookies from the resources server to the client server.
@darshanmestry9343Ай бұрын
How to run this project locally to test the APIs?
@TheDevWorldbySergioLemaАй бұрын
It's hard to do it, because, by default, you exclude the Tomcat webserver from Spring Boot. This means that you can't run it in your laptop. What I do, create unit tests that request the endpoints.
@RahulYadav-g3vАй бұрын
Awesome tutorial!
@TheDevWorldbySergioLemaАй бұрын
Thank you Rahul!
@laminefaty9340Ай бұрын
thx yu very much for your explains, Can yu do a short video for deployement springboot application dockerised in amazon ?
@TheDevWorldbySergioLemaАй бұрын
Thank you for watching. I've already done a video where I deploy a Spring Boot application with Docker to AWS: kzbin.info/www/bejne/nYqtnmpqaLWif6c
@laminefaty9340Ай бұрын
Thank yu very much master ! I will look this video after and I will give you my feedback 👍🔥👍
@jonathanmoore4837Ай бұрын
Thanks for video
@TheDevWorldbySergioLemaАй бұрын
Hope it helped you!
@ZombieGamerRealmАй бұрын
Thank you so much for your guide! Would u kindly to give a hint how to use it with standart spring form without FE ? ^_^
@TheDevWorldbySergioLemaАй бұрын
You mean with a server side frontend, like Thymeleaf? I've done a video about that here: kzbin.info/www/bejne/n5ibnJJro6qirJY
@VayunEkboteАй бұрын
Who uses class components?
@TheDevWorldbySergioLemaАй бұрын
It was long time ago 😅 I don't use it anymore
@VayunEkboteАй бұрын
@@TheDevWorldbySergioLema thought so. I could not recognise that it was react at first.
@TheDevWorldbySergioLemaАй бұрын
🤣🤣🤣
@chawebinourelhouda807Ай бұрын
great tutorial ! but what if i want to add the option : login with registered infos how i can i integrate it
@TheDevWorldbySergioLemaАй бұрын
I'm not sure to understand your alternative. Having the option to login with email/password OR with Google Login?
@weixiangng8279Ай бұрын
is aws ec2 from aws free tier?
@TheDevWorldbySergioLemaАй бұрын
Yes, you have an instance type available in the free tier for one year.
@wanggewgАй бұрын
I have watched your videoson springboot oauth2 series, they are very good! I take this chance to bring a request on springboot keycloak oauth2 authentication. Could you please make video to demo BFF pattern ( Backend for FrontEnd). BFF is thought more secure than PKCE flow?
@TheDevWorldbySergioLemaАй бұрын
Thanks for your comment. I add your suggestion to my todo list. I'll try to find a spot to do it
@sadiulhakim7814Ай бұрын
Hi jawman, I am preferring thymeleaf for my personal project over fromtend frameworks, because those frameworks are extra pain.
@TheDevWorldbySergioLemaАй бұрын
Yes, that's very straightforward, but when you need more complexity or performance, a dedicated frontend framework is necessary.
@sadiulhakim7814Ай бұрын
@@TheDevWorldbySergioLema for personal projects only
@wanggewgАй бұрын
Could you please make video to demo BFF pattern ( Backend for FrontEnd). BFF is thought more secure than PKCE flow. Reply
@TheDevWorldbySergioLemaАй бұрын
Let me read more about this pattern. I've never worked on it
@wanggewgАй бұрын
Could you please make video to demo BFF pattern ( Backend for FrontEnd). BFF is thought more secure than PKCE flow.
@TheDevWorldbySergioLemaАй бұрын
I first need to investigate a little bit more about it
@bioniccommando2009Ай бұрын
Thank you very much. I did a lot of config but they didn't work. This worked but I had to add this corsConfiguration.setAllowedHeaders(List.of("*")); (I am working with JWT token)
@TheDevWorldbySergioLemaАй бұрын
Yes, you need to identify the headers you want to accept. Or add the wildcard to accept them all. What's important is not to add the wildcard in the authorized origins.
@caffeinejavacode1475Ай бұрын
how to deploy service A and service B and make REST communication between them
@TheDevWorldbySergioLemaАй бұрын
You have to configure the Security groups: which one has access to internet; which one can request the other.
@VamsiGanteda12 күн бұрын
@@TheDevWorldbySergioLema please make a video about this
@TheDevWorldbySergioLema10 күн бұрын
I'm preparing a video about advanced features of microservices in AWS ECS. I hope to have it ready soon
@fuhadyusuf42757 күн бұрын
@@TheDevWorldbySergioLema I'm currently stuck on creating a service from the clusters, when u selected to use EC2 in the launch type, it says I don't have an EC2 instance connected to the cluster. 🤧...
@TheDevWorldbySergioLema2 күн бұрын
When you create the ECS cluster, you need to select an ECS with EC2 instances. Then you have the option to create the EC2 instanced attached to the cluster. From there, you don't need to create the EC2 instances manually.
@TmumbachАй бұрын
Hello, great video! Using gateway as oauth client, how to authenticate and consume the api using Postman or insomnia? Thanks!
@TheDevWorldbySergioLemaАй бұрын
Thanks. It's not easy. What I do is: * log in the application using the Website * go the localstorage * copy the token * use it in Postman
@MG-wx8yxАй бұрын
How much do you sleep per 24h? Your eyes are so white, mine are so red! Also, can you do the same tutorial but with Graphql instead of REST? Thanks for the very informative tutorial.
@TheDevWorldbySergioLemaАй бұрын
😅 At least 6 hours. Graphql is a topic I have in my todo list, but I never found the time to investigate it
@hemanthpusarla4428Ай бұрын
can we deploy it with free tier?
@TheDevWorldbySergioLemaАй бұрын
Yes, I think it's included into the free tier. Still, it's 0.02$ per Gb, I don't think a React application will cost this.
@40ozhemlockАй бұрын
Sorry I'm dumb. When you say "and go to a terminal" (to connect to the instance). Do you mean just the command line on my local machine? Or are you talking about something in AWS? Doesn't AWS provide like 3 different ways within the console to connect to the instance? What do you mean when you say "and go to a terminal"?
@40ozhemlockАй бұрын
tried it from the command line.... permission denied....
@TheDevWorldbySergioLemaАй бұрын
Go to your local machine terminal. But you need to configure it before. Check here how to do it: docs.aws.amazon.com/cli/v1/userguide/cli-chap-configure.html
@40ozhemlockАй бұрын
@@TheDevWorldbySergioLema So I have made a lot of progress. Got a JAR file of my app onto the Linux Ec2. But when I run it, it doesn't pick up the properties from my properties file so I can't make the MYSQL DB connection. It keeps acting like it's trying to connect with root@... , But I have a ${DBUSERNAME} variable (and PW and URL) in my props file and I CANNOT get the app to pick those values up and connect with that. ANY ideas bro?
@TheDevWorldbySergioLemaАй бұрын
Did you added those values (db username, password and url) to the EC2 environment variables?
@40ozhemlockАй бұрын
@@TheDevWorldbySergioLema Yeah I have
@snakefoxxofekansАй бұрын
Thanks alot !
@TheDevWorldbySergioLemaАй бұрын
Thanks to you for watching.
@Sebastian-zs8cpАй бұрын
How did you learn it, it's a black box, everyone uses it but no one knows about it. I'm a self learner and I don't have a company behind me, I'm unemployed, and I want to bring a product to the market, but I have to get my users securely registered or the procedure, and I'm scared because that can fall on my feet. My stack: -Angular, -Spring boot, wants the Angula app to authenticate then the user registers or logs in
@TheDevWorldbySergioLemaАй бұрын
It takes a lot of years to learn. Keep working on it! I'm also a self learner
@programmierenabisz4664Ай бұрын
Thank you so much, man, i am currently looking your second video and again it made so much clear for me. AWS was a misterum for me. So many features and things you can do there but you bring it to the point. Exactly the information you need for starting with AWS. Of course this YT channel is in my abos since now!
@TheDevWorldbySergioLemaАй бұрын
Thank you 😅 you made my day
@programmierenabisz4664Ай бұрын
Thank you so much! This made so many things clear to me. I worked with several old ways to manage my projects. From hosting my own servers (about 20 years ago) to some docker managed instances and so on. AWS was a misterium for me. So many things you can do there but you brought it to the point for me. EC2 is only a virtual machine :) And the networking is also only networking VPC (virtual private cnetwork ;))
@TheDevWorldbySergioLemaАй бұрын
I'm so glad you understand it better now!
@programmierenabisz4664Ай бұрын
@@TheDevWorldbySergioLema I am looking the next video (4 Easy Steps to Deploy ...) and I left a similar comment there. Really, it's a kind of AHAAA moment for me. thank´s again!
@TheDevWorldbySergioLemaАй бұрын
Thanks again!
@PorkyPrankАй бұрын
If I deploy telegram bot using spring boot, the process is the same?
@TheDevWorldbySergioLemaАй бұрын
I've never tried something like this. I don't know
@fabricemissidi3301Ай бұрын
excellent content!! I'm ont from a anglophone country but i understand without problemes