Spring Applications

Project: Catalog Service Security

The objective of this exercise is to secure the catalog service of the bookstore application using basic authentication.
  1. Add the starter spring-boot-starter-security as Maven dependency.
  2. Implement a security configuration class with three bean methods that create
    • a password encoder that uses the bcrypt hashing function
    • an in-memory user details service with a fixed user with the role EMPLOYEE
    • a security filter chain such that basic authentication is used and adding and updating books is restricted to users with the EMPLOYEE role
  3. Test the security constraints using the Postman utility.