[008] How to Secure Micro services - oAuth2 Server part 01 - [Micro services in and out 008]

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ก.ย. 2024

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

  • @Javatechie
    @Javatechie 4 ปีที่แล้ว +17

    Awesome explanation , could you please integrate this Auth server concept with Spring Cloud API Gateway it would be more helpful

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

    I've been trying to wrap my head around OAuth 2.0 from past 1 week. Tried many blogs and video tutorials but nothing was as clear and simple as this video. Thanks a lot!

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

      Thats all i want 😍

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

    Many Thanks Krish!! You are awesome!

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

      Thank you. check out latest content. we talks latest approached on MS

  • @vengatesannagarajan8534
    @vengatesannagarajan8534 5 ปีที่แล้ว +6

    Explanation is very clear...I have more confusion but now i'm clear and i'm in correct track...Thank you so much....

  • @GajendraSingh1990
    @GajendraSingh1990 5 ปีที่แล้ว +7

    you are a perfect teacher. Waiting for the next lecture. Thanks!

  • @dr.d303
    @dr.d303 3 ปีที่แล้ว +1

    අයියා මේක නියමයි. ඔයාට මාර teaching skill එකක් තියෙන්නේ , Thanks a lot!

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

    Nice session and thanks for spending your valuable time.

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

    realy very clean and smart video. Thank u so much

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

    Explanation is clean and clear ...... 😊🤞.... Thanks for the tutorial...🙂

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

    I had lot of confusion before watching this video, but now totally cleared. thanks

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

    Thanks Krish for nice valuable presentation.

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

    really great, very granular description...subscribed

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

    Very good video. Thanks! Keep them coming

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

      sure

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

    Really good explanation sir..

  • @KhoaNguyen-mv2mu
    @KhoaNguyen-mv2mu 3 ปีที่แล้ว +1

    LOVE IT!

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

    Thanks a ton for this presentation really very helpful

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

    Great explanation, i had confusion in the error information now its clear. Thank you so much

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

    So nice..
    You are great Sir

  • @georgina_diaz
    @georgina_diaz 4 ปีที่แล้ว +2

    Amazing tutorial and easy to undestand! Thank you so much (y)

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

      You're very welcome!

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

    It was really helpful. thank yooooooou

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

    Good one Krishantha.

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

    Thanks Krishantha, its really helpful.

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

    Great tutorial, Clean and clear!

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

    Thanks a lot sir, you are really explained in a better understanding way..

  • @jaysingh-uf9qr
    @jaysingh-uf9qr 4 ปีที่แล้ว +2

    great tutorial i love the way you explain

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

    Great informative content..👍👍

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

    thanks man, learnt alot

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

    Great explanation

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

    Thank you very much

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

    Great

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

    very nice sir! thanks ! pls keep posting more videoes on Kubernetes and docker concet=pts

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

    You deserves a subscribe mate.

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

    Great!

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

    Great Video

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

    I Working on role based inventory management system using angular UI. At backend using microservices using Spring Boot 2.6.1. Can you please make a video for oauth2-client, oauth2-resource-server? I am very confused to create authorization server and then protect spring cloud api gateway to ensure the protection of all microservices with user login.

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

    Thanks a lot...very good explanation

  • @Mohamed-uf5jh
    @Mohamed-uf5jh 4 ปีที่แล้ว

    Great Tuto

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

    its nice, instead showing yourself better focus on presentation, so that no distraction.

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

    Superb explanation and the drilling down the when the issues appear. Haven't seen this kind of tutorial regarding OAuth2 Spring security, Cheers #Krish

  • @DeepakPanda-ex7en
    @DeepakPanda-ex7en 4 ปีที่แล้ว

    How does one create new CLIENTs and USERs in production. Here we have used SQL scripts to create users/clients. Thanks for your videos. It helps learners like me.

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

    Great video! Could you please show/explain what exact request sent from your HttpClient (curl format). Also I'm lost when to send "mobile/pin" and when "krish/krish123"

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

    super

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

    Hi Dinesh, currently "cloud oauth" dependency is not available in spring initializer app. Also the @EnableAutherizationServer has not been supported by spring boot.
    Is there any other ways to make authorization server with latest updates. If possible could you please make a video?

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

    I have few question:s
    1. why AuthenticationManager is not required to be injected to endpoint at the time of reading the client-credentials from yml file(same for passwordEncoder).
    2. why AuthenticationManager is autowired only inside AuthServerConfigurations(not in UserConfiguration)
    Thanks in Advance...

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

    Sir Please post one video on jwt token store

  • @Shiva-zy7jq
    @Shiva-zy7jq 2 ปีที่แล้ว

    9:37 you mentioned that the client talks to resource owner first. But 11:16 you are mentioning that the client talks to authorization server first. Why?

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

      Client talks to auth server and auth server and it redirected to resource owner for concent

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

    Hello Krishantha, Are you going to release the videos on Resource server also..??
    Could you also create a video for oauth 2.0 using grant type as client_credentials with separate applications for Authorization server and resource server. Thanks in advance..!!

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

    Thanks

  • @JamesSmith-cm7sg
    @JamesSmith-cm7sg 4 ปีที่แล้ว

    Thanks so much 💪

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

      Any time!

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

    Can you make tutorial about oauth2 using mongodb ? I have many problem when i change to mongoDB .. Thank you so much !

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

    which app do u use for api testing, that looks really cool

  • @Lucas-of6ou
    @Lucas-of6ou 4 ปีที่แล้ว +2

    I'm getting 401 unauthorized in spring boot 2.2.5 for this configuration, can't find why...

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

      did you try to pull my project from git and run?

    • @AlokKumar-kw6sn
      @AlokKumar-kw6sn 4 ปีที่แล้ว

      I have downloaded but not working giving 401

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

      @@krish the same issue is coming for me as well...

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

      You might get the username and password in console as encrypted.

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

      Did u see this:
      2021-05-09 22:24:51.683  INFO 2528 --- [ main] a.OAuth2AuthorizationServerConfiguration : Initialized OAuth2 Client
      ***********************************
      security.oauth2.client.client-id = mobile
      security.oauth2.client.client-secret = ****
      ************************************
      2021-05-09 22:24:51.787  INFO 2528 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
      Check your maven dependencies.
      Add:
      org.springframework.security.oauth.boot
      spring-security-oauth2-autoconfigure
      2.2.2.RELEASE
      Now its should be worked.

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

    Excellent presentation, but I am not able to move forward, facing Unauthorized error message even after sending basic auth params.Output looks like this {
    "timestamp": "2019-08-12T06:18:58.932+0000",
    "status": 401,
    "error": "Unauthorized",
    "message": "Unauthorized",
    "path": "/oauth/token"
    }

    • @Lucas-of6ou
      @Lucas-of6ou 4 ปีที่แล้ว

      Me too, do you already found a solution ? i'm struggling with it

    • @Lucas-of6ou
      @Lucas-of6ou 4 ปีที่แล้ว

      @@limerickgangster Me too, do you already found a solution ? i'm struggling with it

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

      @@Lucas-of6ou also for me, Did any one found a solution guys?

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

      Same problem for me as well...

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

      Did u see this:
      2021-05-09 22:24:51.683  INFO 2528 --- [ main] a.OAuth2AuthorizationServerConfiguration : Initialized OAuth2 Client
      *********************************
      security.oauth2.client.client-id = mobile
      security.oauth2.client.client-secret = **
      **********************************
      2021-05-09 22:24:51.787  INFO 2528 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
      Check your maven dependencies.
      Add:
      org.springframework.security.oauth.boot
      spring-security-oauth2-autoconfigure
      2.2.2.RELEASE
      Now its should be worked.

  • @SagirAnsari-bn7oj
    @SagirAnsari-bn7oj 4 ปีที่แล้ว

    roles in not coming once you doing in in-memory java code configuration

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

    Why did you change application.properties to application.yml?

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

      .properties and .yml do the same work but code formation is easier in .yml than .properties.

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

    Hi, Nice session. Could you please commit the final oauth2 project in github.
    If possible, can you give the session on below integration(SSO) :
    apps will be : 1 Central Authentication and authorization server with its own custom login page.
    2. There will be micro-service which have a rest api
    3. Web MVC application with spring security, when application is run, user is redirected to login page of Authentication and authorization server and upon successful login user is redirected and lands to home page from where he further try to get respose from above rest api based on client secret and id

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

    I am not able to make it work with context path. Use to work fine with spring 1.5 but getting problem with spring 2. Any ideas why

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

    Hi Krish , How will i do refresh token and how can i send permission with jwt token ,Plz

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

    I want call third party api using java code,which has implemented oAuth2.0 to secure the APIs.
    1st I got the access_token from that Service.
    Secondly, I want to send a POST request to one api, by sending stringXML and access_token. So, which method of RestTemple should I use??? If there is any best approach please let me know. Sir, please respond asap.

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

    I am not sure, how will you implement this using Zuul as the edge node

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

    What REST client app are you using for testing?

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

    Hi Krish,
    what's the http client you use ? Thank you, Esteban

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

    Thanks a lot for the efforts
    But this ended up to be an another oauth tutorial with no insights!! How to do oauth in spring is available easily but explanation on how to do with insights!!! Stil missing

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

    Please help
    what if in my application let's say I am implementing the oauth using google for SIGNUPand when the user gets signup using the google auth and then the google auth will only give me the email id of the user then how I am going to implement the Authorization in my application like role based giving access to different users.

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

      you can create scope and permissions on google side when you create your
      app. so on the authorization process it returns scopes and permissions belongs to particular user

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

    how to add resource server along with this?

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

    What is the difference between oauth and ssl

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

      Oauth is security (authorization) architecture and SSL is level encryption mechanism

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

    refreshtoken not getting

  • @AnujKumar-rq6dl
    @AnujKumar-rq6dl 4 ปีที่แล้ว

    I have implemented as instructed in the video. But I am encountering an exception for POST /oauth/token HTTP/1.1
    Host: localhost:8090
    Content-Type: application/x-www-form-urlencoded
    Authorization: Basic bW9iaWxlOnBpbg==
    User-Agent: PostmanRuntime/7.19.0
    grant_type=password&username=cs405017&password=*****&role=ADMIN.
    Exception :
    [nio-8090-exec-2] o.s.s.o.provider.endpoint.TokenEndpoint : Handling error: NestedServletException, Handler dispatch failed; nested exception is java.lang.StackOverflowError.
    On reading different similar issues on the internet --- all of them points out at authenticationManager instantiation override. But I have correctly overriden it.
    @Bean
    public AuthenticationManager authenticationManagerBean() throws Exception{
    return super.authenticationManagerBean();
    }
    pom.xml

    org.springframework.boot
    spring-boot-starter-web


    org.springframework.cloud
    spring-cloud-starter-oauth2



    org.springframework.cloud
    spring-cloud-starter-security
    2.1.4.RELEASE
    Please assist.

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

      want to diagnose your exact problem. so can you please clone my project from github and try to run that...? and tell me the outcome

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

    which tool are using to build the oauth

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

      Spring security

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

    I can not find you on Instagram

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

    May I know what are the client-id and client-secret stand for?

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

      hey. I also had the same question. Did you figured it out by now?

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

    Hi Krish, I followed your oauth 2 example and could get declarative way code running,but programmatic way is not working,gettinh unauthorized for /oauth/token,followed your video and example step by step,can u pls suggest

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

      did you try to pull my code from github and run?

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

      I downloaded your code from GitHub for this, tried,but getting missing grant type error

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

      Anand Nerurkar you have same issue for my project?

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

      I ran your project as it is, then trying to hit localhost:8282/oauth/token with basic auth client id as web clientsecret as webpass ,body aas urlencoded , grant type as password username as Krish and password as Krish pass as mentioned in the code,but getting error as invload request and missing grant

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

    Hi Sir ,
    I am not able to understand why client-id and secret along with user name and password has to be put in-order to get authorization code ?? If my understanding is correct , user is not related to any client apps which gets registered with authorization server .
    Please help

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

      you are correct. you users are not bound to client-id or secret. watch the video one more time :) you need client-id and secret in the request for client app to authenticate with Authorization server.

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

      @@krishantha thanks for replying sir , I will watch it again today

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

      Hi Sir ,
      I did some reading and went through couple of articles related to it ,if my understanding is correct resource server is also an additional client of authorization server so that why we provide client-id and secret inorder to validate the token with authorization server..??, below are those links . please correct me if I am wrong
      stackoverflow.com/questions/55548585/why-resource-server-has-to-know-client-id-in-spring-oauth2

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

      Ganesh balasubramanya yes

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

      @@krishantha Thanks for replying sir , really waiting for your next video

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

    Please check and answer. I am Stuck.

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

    The explanation given in the beginning is not clearly explained with code. Losing interest as the coding progress since there is no connecting explanation between the code and concept. Please improve

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

    Thank you very much