Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Spring Security in Action
Spring Security in Action
Spring Security in Action
Ebook1,160 pages11 hours

Spring Security in Action

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Spring Security in Action shows you how to prevent cross-site scripting and request forgery attacks before they do damage. You’ll start with the basics, simulating password upgrades and adding multiple types of authorization. As your skills grow, you'll adapt Spring Security to new architectures and create advanced OAuth2 configurations. By the time you're done, you'll have a customized Spring Security configuration that protects against threats both common and extraordinary.

Summary
While creating secure applications is critically important, it can also be tedious and time-consuming to stitch together the required collection of tools. For Java developers, the powerful Spring Security framework makes it easy for you to bake security into your software from the very beginning. Filled with code samples and practical examples, Spring Security in Action teaches you how to secure your apps from the most common threats, ranging from injection attacks to lackluster monitoring. In it, you'll learn how to manage system users, configure secure endpoints, and use OAuth2 and OpenID Connect for authentication and authorization.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology
Security is non-negotiable. You rely on Spring applications to transmit data, verify credentials, and prevent attacks. Adopting "secure by design" principles will protect your network from data theft and unauthorized intrusions.

About the book
Spring Security in Action shows you how to prevent cross-site scripting and request forgery attacks before they do damage. You’ll start with the basics, simulating password upgrades and adding multiple types of authorization. As your skills grow, you'll adapt Spring Security to new architectures and create advanced OAuth2 configurations. By the time you're done, you'll have a customized Spring Security configuration that protects against threats both common and extraordinary.

What's inside
    Encoding passwords and authenticating users
    Securing endpoints
    Automating security testing
    Setting up a standalone authorization server

About the reader
For experienced Java and Spring developers.

About the author
Laurentiu Spilca is a dedicated development lead and trainer at Endava, with over ten years of Java experience.

Table of Contents

PART 1 - FIRST STEPS

1 Security Today

2 Hello Spring Security

PART 2 - IMPLEMENTATION

3 Managing users

4 Dealing with passwords

5 Implementing authentication

6 Hands-on: A small secured web application

7 Configuring authorization: Restricting access

8 Configuring authorization: Applying restrictions

9 Implementing filters

10 Applying CSRF protection and CORS

11 Hands-on: A separation of responsibilities

12 How does OAuth 2 work?

13 OAuth 2: Implementing the authorization server

14 OAuth 2: Implementing the resource server

15 OAuth 2: Using JWT and cryptographic signatures

16 Global method security: Pre- and postauthorizations

17 Global method security: Pre- and postfiltering

18 Hands-on: An OAuth 2 application

19 Spring Security for reactive apps

20 Spring Security testing
LanguageEnglish
PublisherManning
Release dateOct 1, 2020
ISBN9781638350743
Spring Security in Action
Author

Laurentiu Spilca

Laurentiu Spilca is a skilled Java and Spring developer and an experienced technology instructor. He is the author of Manning’s Spring Start Here and Spring Security in Action.

Read more from Laurentiu Spilca

Related to Spring Security in Action

Related ebooks

Internet & Web For You

View More

Related articles

Reviews for Spring Security in Action

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Spring Security in Action - Laurentiu Spilca

     |1abook_preview_excerpt.html}ۮGd9u,Rrd.:UQI2H̤rhуyk""3)Uyǰˎ}]{ŧ?]UCj=ᛧ^UåmB.ٍfچXP_, Ep+8M7n?v,PvMQ5-zmámiچm=a_5M~(:ө6%YlCӑfpWh͡< 'ZVf{<O=/!qũk76&}]q ׽*^пi#=sZ@WDK W#hm͛5v6jiiT ?)]8Ӵ]юl1ҟw'=8v-E?a)mX-pjErAHZv}#muz1cוpn7wֲ<Pw^7MKh%G5!Nly1džJ4_SGhin9Y® !trɉz⏢9n8%_CM6-zOv6$h}[?Ə,`O蓟2=Krn3/d'|A+H{&tR`'DlڱSS:JL,KoCeÛ6bvrJ|XvX0 cSg8d+I) , ãMѨNKUA'8 0nlaS)`Wv #=ѬGLOU6wآעO5!OR=(\ϩP8BV}?^'no2z-c9`g*`:;U!V4/W3uHiЗU=-M iGL'f/XXu8m8OyʹPjsutP-FKNG#(Y@@ TC٫r9ŔC&zXMKwW>Tu3h]BmGZo!BCV|VfPl[z٤:* ݑg=V2F\Uܶ*tzp;]pDϣi?J;-l6tMY*?U/̅@z9Nc =hbS^@:ϴ0r-րtU fQ YL[2 KxRA'b{np{M-̖-+ф}GmX,J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