concept access in category microservice

appears as: ccess, n access, access, The access, An access
Microservices Security in Action

This is an excerpt from Manning's book Microservices Security in Action.

This book will give you a good understanding of how to implement microservices security concepts in real life, even if you’re not a Java developer. If you’re familiar with any object-oriented programming language (such as C++ or C#) and understand basic programming constructs well, you’ll still enjoy reading the book, even though its samples are in Java. Then again, security is a broader topic. It’s a discipline with multiple subdisciplines. In this book, we mostly focus on application developers and architects who worry about managing access to their microservices. Access management itself is another broader subdiscipline of the larger security discipline. We do not focus on pen testing, developing threat models, firewalls, system-level configurations to harden security, and so on.

Once the gateway has started successfully on port 9090, execute the following command on a new terminal window to get an access token from the authorization server, through the Zuul gateway. Here we use the OAuth 2.0 client_credentials grant type, with application1 as the client ID and application1secret as the client secret:

\> curl -u application1:application1secret \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
http://localhost:9090/token/oauth/token

You should receive the access token in a response that looks like this:

3.4.1 Preventing access through the firewall

First and foremost, you need to make sure that your microservice isn’t directly exposed to external clients, so you need to make sure that it sits behind your organization’s firewall. That way, no external clients get access to your microservices unless they come in via the API gateway (see figure 3.13).

Figure 3.13 Direct access to the authorization server and microservice is prevented by the firewall, allowing only the API gateway to access them.

Although the API Gateway pattern ensures that no one outside the organization gets access to the microservice, a risk still exists that unintended internal clients may gain access to the microservice. The following section discusses how to prevent this situation.

  • An access token can be a reference token or a self-contained token (JWT). If it is a reference token, the gateway has to talk to the issuer (or the authorization server) always to validate it. For self-contained tokens, the gateway can perform the validation by verifying the token signature.
  • Microservices in .NET Core: with examples in Nancy

    This is an excerpt from Manning's book Microservices in .NET Core: with examples in Nancy.

    Data ownership, access, and storage are covered in chapter 5.