Summary
Over the course of this chapter, we have learned how to secure a Spring MVC application. We plugged in custom users, applied path-based controls, and even added method-level fine-grained controls using Spring Security. We topped things off by outsourcing user management to the lofty Google using Spring Security’s OAuth2 integration. We took advantage of this by grabbing hold of some YouTube data and serving up video links.
This chapter may seem long, but in truth, security is a complex beast. Hopefully, with the various tactics shown in this chapter, you’ll have some solid ideas on what to do when it’s time to secure your own applications.
In the next chapter, Testing with Spring Boot, we’ll explore how to ensure our code is rock solid with various testing mechanisms.