Book description
Secure your Java applications by integrating the Spring Security framework in your code
Key Features
- Provide authentication, authorization and other security features for Java applications.
- Learn how to secure microservices, cloud, and serverless applications easily
- Understand the code behind the implementation of various security features
Book Description
Security is one of the most vital concerns for any organization. The complexity of an application is compounded when you need to integrate security with existing code, new technology, and other frameworks. This book will show you how to effectively write Java code that is robust and easy to maintain.
Hands-On Spring Security 5 for Reactive Applications starts with the essential concepts of reactive programming, Spring Framework, and Spring Security. You will then learn about a variety of authentication mechanisms and how to integrate them easily with the Spring MVC application. You will also understand how to achieve authorization in a Spring WebFlux application using Spring Security.You will be able to explore the security confgurations required to achieve OAuth2 for securing REST APIs and integrate security in microservices and serverless applications. This book will guide you in integrating add-ons that will add value to any Spring Security module.
By the end of the book, you will be proficient at integrating Spring Security in your Java applications
What you will learn
- Understand how Spring Framework and Reactive application programming are connected
- Implement easy security confgurations with Spring Security expressions
- Discover the relationship between OAuth2 and OpenID Connect
- Secure microservices and serverless applications with Spring
- Integrate add-ons, such as HDIV, Crypto Module, and CORS support
- Apply Spring Security 5 features to enhance your Java reactive applications
Who this book is for
If you are a Java developer who wants to improve application security, then this book is for you. A basic understanding of Spring, Spring Security framework, and reactive applications is required to make the most of the book.
Table of contents
- Title Page
- Copyright and Credits
- Dedication
- Packt Upsell
- Contributors
- Preface
-
Overview of Spring 5 and Spring Security 5
- How examples are structured
- New-generation application requirements
- Reactive programming
- Reactive applications
- Spring Framework
- Reactive Landscape in Java
- Spring Framework and reactive applications
- Application security
- Spring Security
- Spring Security's core features
- Spring Security 5's new features
- Working of Spring Security
- Core Spring Security modules
- Summary
-
Deep Diving into Spring Security
- Authentication
-
Sample application
-
Base project setup
- Step 1—Create a Maven project in IntelliJ IDEA
- Step 2—pom.xml changes
- Step 3—MySQL database schema setup
- Step 4—Setting up MySQL database properties in your project
- Step 5—Spring application configuration
- Step 6—Web application configuration
- Step 7—Spring MVC setup
- Step 8—Controller setup
- Step 9—JSP creation
- Spring Security setup
- Running the application
- In-memory user storage
- Run as Spring Boot
-
Base project setup
- Authorization
- Other Spring Security capabilities
- Summary
- Authentication Using SAML, LDAP, and OAuth/OIDC
-
Authentication Using CAS and JAAS
-
CAS
-
CAS server setup
- Git clone
- Adding additional dependencies
- Setting up the resources folder in the project
- Creating the application.properties file
- Creating a local SSL keystore
- Creating the .crt file to be used by the client
- Exporting the .crt file to Java and the JRE cacert keystore
- Building a CAS server project and running it
- Registering a client with the CAS server
- CAS client setup
- Running the application
-
CAS server setup
- Java Authentication and Authorization Service
- Kerberos
- Custom AuthenticationEntryPoint
- PasswordEncoder
- Custom filters
- Summary
-
CAS
- Integrating with Spring WebFlux
-
REST API Security
- Important concepts
- Modern application architecture
- Reactive REST API
- Simple REST API security
- Advanced REST API security
- Spring Security OAuth project
- OAuth2 and Spring WebFlux
- Spring Boot and OAuth2
- Sample project
- Summary
- Spring Security Add-Ons
- Other Books You May Enjoy
Product information
- Title: Hands-On Spring Security 5 for Reactive Applications
- Author(s):
- Release date: July 2018
- Publisher(s): Packt Publishing
- ISBN: 9781788995979
You might also like
book
Pro Spring Security: Securing Spring Framework 5 and Boot 2-based Java Applications
Build and deploy secure Spring Framework and Spring Boot-based enterprise Java applications with the Spring Security …
video
Spring Security
8+ Hours of Video Instruction Overview In Spring Security LiveLessons, learn from Spring experts Rob Winch, …
book
Spring Security - Third Edition
Learn how to secure your Java applications from hackers using Spring Security 4.2 Key Features Architect …
book
Hands-On Reactive Programming in Spring 5
Explore the reactive system and create efficient microservices with Spring Boot 2.1 and Spring Cloud Key …