liveBook · Manning

Spring Security

As explained in Spring Security in Action, Second Edition

Spring Security is an open-source framework for securing Spring applications through authentication, authorization, access control, and protection against common attacks.

Spring Security is an open-source framework that secures Spring applications at the application layer. It addresses authentication, authorization, access control, and protection against common attacks while helping developers treat security as a cross-cutting concern from the beginning of development. section 1.1 section 1.2

The framework supports standard web servlets, reactive applications, and non-web applications. It simplifies security configuration but does not secure an application automatically; developers must configure and customize it around functional requirements and architecture. section 1.1 section 1.5

Spring Security is used to:

  • Implement authentication and authorization for Spring applications. section 1.1
  • Apply access-control rules and protect application resources from common attacks. section 1.1
  • Secure different application layers using practices suited to each layer. section 1.2
  • Support OAuth 2 and OpenID Connect flows, including authorization servers, resource access, and client applications. section 1.4 section 14.0
  • Test endpoint, method-level, and reactive security integrations. section 18.0 section 17.0

Incremental Spring application security

Begin with a Spring Boot application using Spring Security’s default configuration, then override the defaults that do not match the application. Extend the same approach to an OAuth 2 authorization server, an OAuth 2 client for backend communication, reactive applications, and automated security tests. section 2.0 section 14.0 section 16.0 section 18.0

Figure 1.3 We implement security in a hierarchical manner, with each layer building on the foundation of the previous one. This book focuses on explaining how to use Spring Security, a framework that provides application-level security at the very top layer.

Security is implemented hierarchically, with Spring Security providing application-level protection at the top layer. section 1.2

How Spring Security in Action, Second Edition covers it

How deep it goes
Descends from architecture and defaults into configuration, customization, OAuth 2, reactive security, and testing through progressively complex examples.
Examples
Uses first Spring applications, authorization servers, OAuth 2 clients, backend calls, reactive apps, mock users, and endpoint tests.
What it assumes
Assumes comfortable Java and basic Spring Framework knowledge while introducing Spring Security architecture and components.
What you can do after
Apply Spring Security to practical Spring scenarios, choose suitable configurations, customize defaults, and test security implementations.
How it connects
Connects authentication and authorization with access control, OAuth 2, OpenID Connect, Spring Boot, reactive applications, and integration testing.

Also explained in

Compare how 4 books explain Spring Security →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring Security in Action, Second Edition. The section links point to the parts of the book it draws on.