This is the code repository for Spring Security - Fourth Edition, published by Packt.
Effectively secure your web apps, RESTful services, cloud apps, and microservice architectures
Knowing that experienced hackers are constantly on the prowl to attack your apps can make security one of the most challenging concerns of creating an app. The complexity of properly securing an app is compounded when you must also integrate this factor with legacy code, new technologies, and other frameworks. This book will help you easily secure your Java apps with Spring Security, a trusted and highly customizable authentication and access control framework.
This book covers the following exciting features:
If you feel this book is for you, get your copy today!
All of the code is organized into folders. For example, Chapter02.
The code will look like the following:
//src/main/java/com/packtpub/springsecurity/configuration/
SecurityConfig.java
@Bean
public SecurityFilterChain filterChain(HttpSecurity http,
PersistentTokenRepository persistentTokenRepository,
RememberMeServices rememberMeServices) throws Exception {
http.authorizeHttpRequests( authz -> authz
.requestMatchers("/webjars/**").permitAll()
…
// Remember Me
http.rememberMe(httpSecurityRememberMeConfigurer ->
httpSecurityRememberMeConfigurer
.key("jbcpCalendar")
.rememberMeServices(rememberMeServices)
.tokenRepository(persistentTokenRepository));
return http.build();
}
Following is what you need for this book:
If you’re a Java web developer or an architect with fundamental knowledge of Java 17/21, web services, and the Spring Framework, this book is for you. No previous experience with Spring Security is needed to get started with this book.
With the following software and hardware list you can run all code files present in the book (Chapter 1-19).
Chapter | Software required | OS required |
---|---|---|
1-19 | IntelliJ IDEA and Eclipse are both popular choices for Spring development | Windows, macOS, or Linux |
1-19 | JDK versions: 17 or 21 | Windows, macOS, or Linux |
1-19 | Spring- Security 6. | Windows, macOS, or Linux |
1-19 | Spring- Boot 3. | Windows, macOS, or Linux |
1-19 | Thymeleaf 6. | Windows, macOS, or Linux |
Modern API Development with Spring 6 and Spring Boot 3 [Packt] [Amazon]
Learning Spring Boot 3.0 - Third Edition [Packt] [Amazon]
Badr Nasslahsen is a lead security and cloud architect with over 17 years of experience. He holds an executive master’s degree from Ecole Centrale Paris and an engineering degree from Telecom SudParis. He is an Oracle Certified Java SE 11 Professional, CISSP, TOGAF, CKA, and Scrum master. Badr has extensive experience in public cloud providers: AWS, Azure, GCP, Oracle, and IBM. He is also the author of the springdoc-openapi project.