liveBook · Manning

Chapter 7: Configuring endpoint-level authorization: Restricting access

What you will learn in chapter 7 of Spring Security in Action, Second Edition

This introduction distinguishes authorization from authentication and explains where an authorization filter acts on a request.

After this chapter you will be able to

What it builds on

Section by section

Introduction

This introduction distinguishes authorization from authentication and explains where an authorization filter acts on a request.

Key terms: authentication, authorization, identified client, requested resource, authentication flow, authorization filter, authorization rules

7.1 Restricting access based on authorities and roles

This section explains how Spring Security represents a user's permitted actions as authorities and makes them available for authorization after authentication.

Key terms: authority, GrantedAuthority, getAuthority(), authorization rule, UserDetails, getAuthorities(), authentication

7.1.1 Restricting access for all endpoints based on user authorities

This section shows how to restrict all endpoint requests according to users’ authorities, from simple authority checks to a more flexible authorization expression.

Key terms: authorizeHttpRequests(), anyRequest(), permitAll(), hasAuthority(), hasAnyAuthority(), WRITE, READ, access(), AuthorizationManager, WebExpressionAuthorizationManager

7.1.2 Restricting access for all endpoints based on user roles

This section explains how roles group privileges and how to restrict endpoint access by role in Spring Security.

Key terms: role, authority, fine-grained, coarse grained, hasRole(), hasAnyRole(), access(), AuthorizationManager, GrantedAuthority, ROLE_ prefix

7.1.3 Restricting access to all endpoints

This section explains denyAll() as a way to reject requests and illustrates why an application might need to deny particular groups of requests.

Key terms: denyAll(), permitAll(), access rules, gateway, paths

7.2 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 6: Implementing authentications Chapter 8: Configuring endpoint-level authorization: Applying restrictions →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.