diff --git a/docs/manual/src/docbook/appendix-db-schema.xml b/docs/manual/src/docbook/appendix-db-schema.xml index 0420d9fa37..7b440dc696 100644 --- a/docs/manual/src/docbook/appendix-db-schema.xml +++ b/docs/manual/src/docbook/appendix-db-schema.xml @@ -12,8 +12,8 @@
User Schema The standard JDBC implementation of the UserDetailsService - requires tables to load the password, account status (enabled or disabled) and a list of - authorities (roles) for the user. + (JdbcDaoImpl) requires tables to load the password, account status + (enabled or disabled) and a list of authorities (roles) for the user. create table users( username varchar_ignorecase(50) not null primary key, @@ -28,8 +28,9 @@
Group Authorities - Spring Security 2.0 introduced support for group authorities - + Spring Security 2.0 introduced support for group authorities in + JdbcDaoImpl. The table structure if groups are enabled is as + follows: create table groups ( id bigint generated by default as identity(start with 0) primary key, group_name varchar_ignorecase(50) not null); diff --git a/docs/manual/src/docbook/core-services.xml b/docs/manual/src/docbook/core-services.xml index 7f7571e246..c9e0c4eb1b 100644 --- a/docs/manual/src/docbook/core-services.xml +++ b/docs/manual/src/docbook/core-services.xml @@ -79,25 +79,25 @@ The simplest AuthenticationProvider implemented by Spring Security is DaoAuthenticationProvider, which is is also one of the earliest supported by the framework. It leverages a - UserDetailsService (as a DAO) in order to lookup + UserDetailsService (as a DAO) in order to lookup the username, password and GrantedAuthoritys. It authenticates the user simply by comparing the password submitted in a UsernamePasswordAuthenticationToken against the one loaded by the UserDetailsService. Configuring the - provider is quite simple: - -]]> - The PasswordEncoder and SaltSource are - optional. A PasswordEncoder provides encoding and decoding of passwords - presented in the UserDetails object that is returned from the configured - UserDetailsService. A SaltSource enables - the passwords to be populated with a "salt", which enhances the security of the - passwords in the authentication repository. These will be discussed in more detail in ???. +]]> The PasswordEncoder and + SaltSource are optional. A + PasswordEncoder provides encoding and decoding of + passwords presented in the UserDetails object that is + returned from the configured UserDetailsService. A + SaltSource enables the passwords to be populated + with a "salt", which enhances the security of the passwords in the authentication + repository. These will be discussed in more detail in ???.
@@ -178,7 +178,19 @@ You can use different relational database management systems by modifying the DriverManagerDataSource shown above. You can also use a - global data source obtained from JNDI, as with any other Spring configuration. + global data source obtained from JNDI, as with any other Spring + configuration. +
+ Authority Groups + By default, JdbcDaoImpl loads the authorities for a + single user with the assumption that the authorities are mapped directly to + users (see the database schema + appendix). An alternative approach is to partition the authorities + into groups and assign groups to the user. Some people prefer this approach as a + means of administering user rights. See the JdbcDaoImpl + Javadoc for more information on how to enable the use of group authorities. The + group schema is also included in the appendix. +