liveBook · Manning

User management

As explained in Spring Security in Action, Second Edition

User management is the administration of user identities, credentials, and related account information in an application.

User management handles the user details and credentials that Spring Security needs during authentication. A UserDetailsService retrieves a user by username, while a PasswordEncoder supports credential verification. section 3.1

Spring Security separates retrieval from broader account administration:

  • UserDetailsService supplies the user required to complete authentication. section 3.1
  • UserDetails describes the user, including the privileges represented by GrantedAuthority. section 3.1
  • UserDetailsManager extends retrieval with operations such as adding, modifying, and deleting users. section 3.1
Figure 3.2 Dependencies between the components involved in user management. The UserDetailsService retrieves a user’s details by searching for the user by name. The user is characterized by the UserDetails contract. Each user possesses one or more authorities, which are depicted by the GrantedAuthority interface. For incorporating operations such as create, delete, or modify password for a user, the UserDetailsManager contract, which expands on the UserDetailsService, is used to include these functionalities.

The dependency diagram shows how user details, authorities, retrieval, and account-management operations fit together. section 3.1

A minimal application can first expose Spring Security defaults, then replace them with custom users and passwords and adjust endpoint authentication requirements. section 2.0

How Spring Security in Action, Second Edition covers it

How deep it goes
Explains the main interfaces and their responsibilities, while deferring detailed password-encoder treatment.
Examples
Uses default Spring Security behavior, custom users and passwords, endpoint rules, and authentication-flow diagrams.
What it assumes
Assumes basic Spring and Java knowledge while building authentication behavior incrementally from framework defaults.
What you can do after
Operate/configure authentication with custom users and passwords, then customize which endpoints require authentication.
How it connects
Connects authentication with UserDetailsService, UserDetailsManager, UserDetails, GrantedAuthority, PasswordEncoder, and AuthenticationProvider.

Also explained in

Compare how 2 books explain user management →

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.