This chapter covers:
- Understanding the Spring Security fundamentals
- Managing user accounts with Keycloak
- Working with OpenID Connect, JWT, and Keycloak
- Authenticating users with Spring Security and OpenID Connect
- Testing Spring Security and OpenID Connect
Security is one of the most critical aspects of web applications and probably the one with the most catastrophic effects when done wrong. For educational purposes, I’m introducing this topic only now. In a real-world scenario, my recommendation is to consider security from the very beginning of each new project or feature and never let it go until the application is retired.
Access control systems allow users access to resources only when their identity has been proven and have the required permissions. To accomplish that, we need to follow three pivotal steps: identification, authentication, and authorization.