From 861a34092d288faa79344cb9ef5606fa98f729d4 Mon Sep 17 00:00:00 2001 From: Ben Alex Date: Wed, 22 Dec 2004 13:18:00 +0000 Subject: [PATCH] Remove quick-start, as it has been replaced by more detailed documentation pointers in docs/xdocs. The main issue with quick-start was maintaining it between Acegi Security versions. As it's never executed anywhere, its operation could never be easily tested (especially web.xml for example). --- samples/quick-start/.cvsignore | 5 - samples/quick-start/readme.txt | 51 ---------- .../quick-start/war-root/WEB-INF/.cvsignore | 2 - .../war-root/WEB-INF/applicationContext.xml | 93 ------------------- .../WEB-INF/lib/acegi-security.jar.txt | 15 --- samples/quick-start/war-root/WEB-INF/web.xml | 60 ------------ samples/quick-start/war-root/acegilogin.jsp | 42 --------- samples/quick-start/war-root/logoff.jsp | 3 - samples/quick-start/war-root/secure/debug.jsp | 47 ---------- 9 files changed, 318 deletions(-) delete mode 100644 samples/quick-start/.cvsignore delete mode 100644 samples/quick-start/readme.txt delete mode 100644 samples/quick-start/war-root/WEB-INF/.cvsignore delete mode 100644 samples/quick-start/war-root/WEB-INF/applicationContext.xml delete mode 100644 samples/quick-start/war-root/WEB-INF/lib/acegi-security.jar.txt delete mode 100644 samples/quick-start/war-root/WEB-INF/web.xml delete mode 100644 samples/quick-start/war-root/acegilogin.jsp delete mode 100644 samples/quick-start/war-root/logoff.jsp delete mode 100644 samples/quick-start/war-root/secure/debug.jsp diff --git a/samples/quick-start/.cvsignore b/samples/quick-start/.cvsignore deleted file mode 100644 index 13350339d1..0000000000 --- a/samples/quick-start/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -classes -dist -api -build.properties -temporary diff --git a/samples/quick-start/readme.txt b/samples/quick-start/readme.txt deleted file mode 100644 index 7871006d8b..0000000000 --- a/samples/quick-start/readme.txt +++ /dev/null @@ -1,51 +0,0 @@ -=============================================================================== - QUICK-START SAMPLE -=============================================================================== - -Acegi Security's flexibility can be a bit daunting. Because projects only have -so much budget, and people only have so much time, often the complexity of -getting started can seem too high a price to pay. The quick-start sample is -designed to provide you the basic building blocks needed to be added to your -existing application. - -Quick-start is not executable or deployable. It's just a convenient, simple -place where you can see what needs to be added to your web application's -existing files and directories. - -What you _will_ need to change in the quick-start configuration: - -- It protects a /secure directory from HTTP requests. The /secure directory - is included (along with a debug.jsp you might find useful), but can be - deleted as soon as you are up and running. You'll need to setup your own - URLs to protect in the applicationContext.xml. Search for the - FilterInvocationInterceptor bean. - -What you _may_ need to change in the quick-start configuration: - -- It uses an in-memory list of users as your authentication repository. This - means you edit the XML file to add users, change their roles etc. If you'd - prefer to use a database, remove the InMemoryDaoImpl from the - applicationContext.xml, and add in a JdbcDaoImpl bean. For an example of - using the JdbcDaoImpl, search the reference guide. - -What does this buy you? Not a great deal more than using the Servlet spec -(although we do support regular expressions and Ant paths for URL matching)! -Seriously, you can use the Servlet spec to protect URLs, so why bother? -The quick-start sample provides you the BASE security building blocks for -your application. Whilst there's nothing wrong with using it instead of the -Servlet spec security just for the better path support or avoiding the -multitude of container authentication configurations, most people will use it -because this foundation allows you to simply tweak configuration if you wish -to: - -- Protect your business beans (search for MethodSecurityInterceptor in docs) -- Use enterprise-wide single sign on (see CAS section in docs) -- Use custom authorization voters (see Authorization section in docs) -- Deploy custom authentication providers (see Authentication section in docs) -- Perform BASIC authentication (search for BasicProcessingFilter in docs) -- Automate HTTPS redirection (see Channel Security section in docs) - -Good luck! Don't forget we're happy to help. See the end of the docs for -contact details. - -$Id$ diff --git a/samples/quick-start/war-root/WEB-INF/.cvsignore b/samples/quick-start/war-root/WEB-INF/.cvsignore deleted file mode 100644 index 86e9501ee1..0000000000 --- a/samples/quick-start/war-root/WEB-INF/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -lib - diff --git a/samples/quick-start/war-root/WEB-INF/applicationContext.xml b/samples/quick-start/war-root/WEB-INF/applicationContext.xml deleted file mode 100644 index d33334146f..0000000000 --- a/samples/quick-start/war-root/WEB-INF/applicationContext.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - marissa=koala,ROLE_TELLER,ROLE_SUPERVISOR - dianne=emu,ROLE_TELLER - scott=wombat,ROLE_TELLER - peter=opal,disabled,ROLE_TELLER - - - - - - - - - - - CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON - PATTERN_TYPE_APACHE_ANT - /secure/**=ROLE_SUPERVISOR - - - - - - - - - - - - - 5 - - - - - - - - - - - - - - false - - - - - - - - - - /acegilogin.jsp?login_error=1 - / - /j_acegi_security_check - - - - - - - - - /acegilogin.jsp - false - - - - - diff --git a/samples/quick-start/war-root/WEB-INF/lib/acegi-security.jar.txt b/samples/quick-start/war-root/WEB-INF/lib/acegi-security.jar.txt deleted file mode 100644 index 84f1d4d34e..0000000000 --- a/samples/quick-start/war-root/WEB-INF/lib/acegi-security.jar.txt +++ /dev/null @@ -1,15 +0,0 @@ -You'll need to copy acegi-security.jar into your WEB-INF/lib directory. -You can find the JAR in the /dist directory of any ZIP distribution. - -Acegi-security.jar requires the following JARs in WEB-INF/lib: - -commons-logging.jar -commons-codec.jar -commons-collections.jar -jakarta-oro.jar -spring.jar - -Most of the above JARs are included with Spring. Those that are not are -definitely included in the Acegi Security "with dependencies" release ZIP. - -$Id$ diff --git a/samples/quick-start/war-root/WEB-INF/web.xml b/samples/quick-start/war-root/WEB-INF/web.xml deleted file mode 100644 index c9c9f4a0eb..0000000000 --- a/samples/quick-start/war-root/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - Acegi Authentication Processing Filter - net.sf.acegisecurity.util.FilterToBeanProxy - - targetClass - net.sf.acegisecurity.ui.webapp.AuthenticationProcessingFilter - - - - - Acegi Security System for Spring Auto Integration Filter - net.sf.acegisecurity.util.FilterToBeanProxy - - targetClass - net.sf.acegisecurity.ui.AutoIntegrationFilter - - - - - Acegi HTTP Request Security Filter - net.sf.acegisecurity.util.FilterToBeanProxy - - targetClass - net.sf.acegisecurity.intercept.web.SecurityEnforcementFilter - - - - - Acegi Authentication Processing Filter - /* - - - - Acegi Security System for Spring Auto Integration Filter - /* - - - - Acegi HTTP Request Security Filter - /* - - - diff --git a/samples/quick-start/war-root/acegilogin.jsp b/samples/quick-start/war-root/acegilogin.jsp deleted file mode 100644 index f1f6a5ade0..0000000000 --- a/samples/quick-start/war-root/acegilogin.jsp +++ /dev/null @@ -1,42 +0,0 @@ -<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core' %> -<%@ page import="net.sf.acegisecurity.ui.AbstractProcessingFilter" %> -<%@ page import="net.sf.acegisecurity.AuthenticationException" %> - - - - Login - - - -

Login

- -

If you've used the standardInMemoryDaoImpl config, try these users: -

-

username marissa, password koala (granted ROLE_SUPERVISOR) -

username dianne, password emu (not a supervisor) -

username scott, password wombat (not a supervisor) -

- - <%-- this form-login-page form is also used as the - form-error-page to ask for a login again. - --%> - - - Your login attempt was not successful, try again.

- Reason: <%= ((AuthenticationException) session.getAttribute(AbstractProcessingFilter.ACEGI_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %> -
-
- -

- - - - - - -
User:
Password:
- -
- - - diff --git a/samples/quick-start/war-root/logoff.jsp b/samples/quick-start/war-root/logoff.jsp deleted file mode 100644 index 6384a8a022..0000000000 --- a/samples/quick-start/war-root/logoff.jsp +++ /dev/null @@ -1,3 +0,0 @@ -<%session.invalidate(); -response.sendRedirect("index.jsp"); -%> \ No newline at end of file diff --git a/samples/quick-start/war-root/secure/debug.jsp b/samples/quick-start/war-root/secure/debug.jsp deleted file mode 100644 index 47f12d3353..0000000000 --- a/samples/quick-start/war-root/secure/debug.jsp +++ /dev/null @@ -1,47 +0,0 @@ -<%@ page import="net.sf.acegisecurity.context.Context" %> -<%@ page import="net.sf.acegisecurity.context.ContextHolder" %> -<%@ page import="net.sf.acegisecurity.context.SecureContext" %> -<%@ page import="net.sf.acegisecurity.Authentication" %> -<%@ page import="net.sf.acegisecurity.GrantedAuthority" %> -<%@ page import="net.sf.acegisecurity.adapters.AuthByAdapter" %> - -<% Context context = ContextHolder.getContext(); -if (context != null) { %> - Context on ContextHolder is of type: <%= context.getClass().getName() %>

- -<% if (context instanceof SecureContext) { %> - The Context implements SecureContext.

-<% SecureContext sc = (SecureContext) context; - - Authentication auth = sc.getAuthentication(); - if (auth != null) { %> - Authentication object is of type: <%= auth.getClass().getName() %>

- Authentication object as a String: <%= auth.toString() %>

- - Authentication object holds the following granted authorities:

-<% GrantedAuthority[] granted = auth.getAuthorities(); - for (int i = 0; i < granted.length; i++) { %> - <%= granted[i].toString() %> (getAuthority(): <%= granted[i].getAuthority() %>)
-<% } - - if (auth instanceof AuthByAdapter) { %> -
SUCCESS! Your container adapter appears to be properly configured!

-<% } else { %> -
SUCCESS! Your web filter appears to be properly configured!
-<% } - - } else { %> - Authentication object is null.
- This is an error and your container adapter will not operate properly until corrected.

-<% } - } else { %> - ContextHolder does not contain a SecureContext.
- This is an error and your container adapter will not operate properly until corrected.

-<% } -} else { %> - ContextHolder on ContextHolder is null.
- This indicates improper setup of the container adapter. Refer to the reference documentation.
- Also ensure the correct subclass of AbstractMvcIntegrationInterceptor is being used for your container.
-<%} -%> -