Securing an Application
with Spring Boot
In the previous chapter, we learned how to query for data using Spring Data JPA. We figured out how to write custom finders, use Query By Example, and even how to directly access the data store custom JPQL and SQL.
In this chapter, we’ll see how to keep our application secure.
Security is a critical issue. I have said, multiple times, that your application isn’t real until it’s secured.
But security isn’t just a switch we flip and we’re done. It’s a complex problem that requires multiple layers. It requires careful respect.
If there is one thing to appreciate as we dive into this chapter, it’s to never attempt to secure things on your own. Don’t roll your own solution. Don’t assume it’s easy. The person who wrote the commercial utility to crack Word documents for users who had lost their password said he introduced a deliberate delay so it didn’t appear...