Microservice Authentication strategy

前端 未结 3 807
我寻月下人不归
我寻月下人不归 2020-11-30 16:44

I\'m having a hard time choosing a decent/secure authentication strategy for a microservice architecture. The only SO post I found on the topic is this one: Single Sign-On i

相关标签:
3条回答
  • 2020-11-30 16:57

    you can use idenitty server 4 for authentication and authorisation purpose

    you must use Firewall Architecture hence you have more control over secutiry , robustness ,scalability and ease of use

    0 讨论(0)
  • 2020-11-30 17:11

    Based on what I understand, a good way to resolve it is by using the OAuth 2 protocol (you can find a little more information about it on http://oauth.net/2/)

    When your user logs into your application they will get a token and with this token they will be able to send to other services to identify them in the request.

    OAuth 2 Model

    Example of Chained Microservice Design Architecture Model

    Resources:

    • http://presos.dsyer.com/decks/microservice-security.html
    • https://github.com/intridea/oauth2
    • https://spring.io/guides/tutorials/spring-security-and-angular-js/
    0 讨论(0)
  • 2020-11-30 17:11

    Short answer : Use Oauth2.0 kind token based authentication, which can be used in any type of applications like a webapp or mobile app. The sequence of steps involved for a web application would be then to

    1. authenticate against ID provider
    2. keep the access token in cookie
    3. access the pages in webapp
    4. call the services

    Diagram below depicts the components which would be needed. Such an architecture separating the web and data apis will give a good scalability, resilience and stability

    0 讨论(0)
提交回复
热议问题