diff --git a/src/docbkx/namespace-config.xml b/src/docbkx/namespace-config.xml
index c4910af133..f263eaff1a 100644
--- a/src/docbkx/namespace-config.xml
+++ b/src/docbkx/namespace-config.xml
@@ -61,10 +61,11 @@
...
]]>
+ We'll assume this syntax is being used from now on in this chapter.
- Design
+ Design of the Namespace
The namespace is designed to capture the most common uses of the framework and provide a simplified and concise
@@ -75,14 +76,79 @@
related service beans used to apply the framework authentication mechanisms, to secure URLs, render login and error pages and much more.Business Object (Method) Security - options for securing the service layer.AuthenticationManager - handles authentication requests from other parts of the framework.
- AccessDecisionManager - provides access decisions for web and method security.
+ AccessDecisionManager - provides access decisions for web and method security. A default one will be registered, but you can also
+ choose to use a custom one, declared using normal Spring bean syntax.AuthenticationProviders - mechanisms against which the authentication manager authenticates users.
The namespace provides supports for several standard options and also a means of adding custom beans declared using a traditional syntax. UserDetailsService - closely related to authentication providers, but often also required by other beans.
+ We'll see how these work together in the next section.
+
+ Example Configurations
+
+ In this section, we'll look at how you can build up a namespace configuration to use different features of the framework.
+
+
+
+ A Minimal Configuration
+
+ Let's assume you want to get up and running as quickly as possible and add authentication support and access control to an existing
+ web application, with a few test logins. The first thing you need to do is add the follwing fiter declaration to your web.xml
+ file:
+
+
+ springSecurityFilterChain
+ org.springframework.web.filter.DelegatingFilterProxy
+
+
+
+ springSecurityFilterChain
+ /*
+]]>
+
+ This provides a hook into the Spring Security web infrastructure. You can find more details of how this works in
+ TODO. You're then ready to start editing your application context file.
+ Web security services are configured using the <http> element.
+ All you need to begin with is
+
+
+
+ ]]>
+
+ Which says that we want all URLs within our application to be secured, requiring the role ROLE_USER
+ to access them. To add some users, you can define a set of test data directly in the namespace:
+
+
+
+
+
+
+ ]]>
+
+ This defines two users, their passwords and their roles within the application (which will be used for access control). The
+ <authentication-provider> element specifies that the user information will be registered with the authentication
+ manager and used to process authentication requests.
+ If you are familiar with previous versions of the framework, the <authentication-provider>
+ element creates a DaoAuthenticationProvider bean and the <user-service> element creates
+ an InMemoryDaoImpl. A ProviderManager bean is always created by the namespace processing system
+ and the AuthenticationProvider is automatically registered with it.
+
+
+ At this point you should be able to start up your application and you will be required to log in to proceed. Try it out, or try
+ experimenting with the "tutorial" sample applicaition that comes with the project.
+ This configuration actually adds quite a few services to the application automatically (mainly because we have added the auto-config
+ attribute. For example, form login processing and "remember-me" services are automatically enabled. You might also be wondering where the
+ login form came from when you were prompted to log in. This was also generated automatically, since we didn't explicitly configure a login page URL, but the namespace offers plenty
+ of options to allow you to custmize this kind of thing.
+
+
+
\ No newline at end of file