Securing a Spring Boot application

In this chapter, we will secure our microservice-based social media platform. This will introduce some interesting use cases, ones that Spring Security can easily handle. However, it's important to know that almost every situation is slightly different. Spring Security can handle them, but it requires understanding how it operates so that you can adapt what you learn in this chapter to our unique situation.

To kick things off, we just need one dependency added to our project:

      compile('org.springframework.boot:spring-boot-starter-security-       reactive')

In addition to adding Spring Security, we will need to define a policy, and also include authorization rules. As we move through this chapter, you'll learn ...

Get Learning Spring Boot 2.0 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.