Microservice AuthZ and scopes

Pear Therapeutics
prez.trump

Pear Therapeutics

prez.trump
Mar 5, 2020 4 Comments

Question for y'all regarding authorization in microservice.

My company is moving from monolith to microservices and we are rolling out own AuthN and authZ. For authorization, we are attaching user scopes to the request header and pass it to a service.

In the service we have required scopes which is an array of string. In the middleware we check required scopes against user scopes.

My questions are:
1. Can an endpoint return additional data based on non required user scopes?
2. What should the scope check entail? Just checking against the strings, or should it hold some logic?
3. How do u guys tackle such problem at ur company?

comments

Want to comment? LOG IN or SIGN UP
TOP 4 Comments
  • It’s really difficult to create your own in house authz service. There are many open source authorization platforms which are openid connect certified. Take a look at them.
    Mar 5, 2020 3
    • Agree to this
      We have in house AuthZ but we have team to 12-13 people for this. It is a difficult problem
      Mar 5, 2020
    • Pear Therapeutics
      prez.trump

      Pear Therapeutics

      prez.trump
      OP
      Basically incompetent ppl made this decision. I wanted to go with aws or auth0 or any other 3rd party solution, but they decided on rolling our own
      Mar 5, 2020