I want this to stop for a number of reasons: the biggest one is that each request to my individual services causes a request to the security service, which can turn into several additional flights when you consider load balancing, etc.
PROS for care as a separate service:
- Changes in the business security logic affect only the security service and do not need to change client services.
PROS for moving security logic to client services:
- Speed / performance.
“Another management service could mean lower operating costs.”
Speed (performance) may exceed here, depending on requirements, but it will have increased development costs.
If you move the security logic to your own reusable module, which can be called from other services, just do a good job of encapsulating it and following the basic scheme with poor adhesion. In addition, since you may have to defend this decision for years to come, please get a good explanation so that your future boss doesn't fire you when she asks why it is so expensive to update our security logic. They have readily available tests, people lie, no numbers. I once had the results of a one page test for a new database that I requested. I was asked several times from different people about why I went with a new database ... I would just send them one page and no longer hear any additional questions from him.
This video can make you feel better considering that sto will reveal the trend: https://www.youtube.com/watch?v=StCrm572aEs
It shows how and why Netflix was looking for a trend and did not go with the REST architecture for its APIs. Basically, architecture is a client of requirements and value, and not vice versa.
EDIT: Another great PRO to exit as a service is that you may need to create several modules for each supported language. At my work, our security services are used by customer services in several languages.
source share