From 253d92915fc3a283e7fe7cc2dbd1cfcf093f0502 Mon Sep 17 00:00:00 2001 From: maxcooper Date: Fri, 9 Aug 2002 08:36:07 +0000 Subject: [PATCH] updated license information fixed some bad JavaDoc comments made SecurityRealmBase a concrete class --- conf/share/securityfilter-config_1_0.dtd | 53 ++++++++++++++++ .../catalina/TrivialCatalinaRealm.java | 46 ++++++-------- .../example/TrivialSecurityRealm.java | 48 ++++++--------- .../org/securityfilter/config/SecurityConfig.java | 52 +++++++--------- .../securityfilter/config/SecurityConstraint.java | 48 ++++++--------- .../config/WebResourceCollection.java | 48 ++++++--------- .../securityfilter/filter/MatchableURLPattern.java | 48 ++++++--------- .../filter/MatchableURLPatternFactory.java | 48 ++++++--------- .../org/securityfilter/filter/SecurityFilter.java | 48 ++++++--------- .../filter/SecurityRequestWrapper.java | 48 ++++++--------- .../securityfilter/realm/SecurityRealmBase.java | 72 +++++++++++----------- .../realm/SecurityRealmInterface.java | 49 +++++++-------- .../realm/adapter/CatalinaRealmAdapter.java | 46 ++++++-------- 13 files changed, 309 insertions(+), 345 deletions(-) diff --git a/conf/share/securityfilter-config_1_0.dtd b/conf/share/securityfilter-config_1_0.dtd index 4253d15..f2fd4b7 100644 --- a/conf/share/securityfilter-config_1_0.dtd +++ b/conf/share/securityfilter-config_1_0.dtd @@ -1,4 +1,57 @@ + + + diff --git a/src/catalina-example/org/securityfilter/catalina/TrivialCatalinaRealm.java b/src/catalina-example/org/securityfilter/catalina/TrivialCatalinaRealm.java index ec55b06..0318ace 100644 --- a/src/catalina-example/org/securityfilter/catalina/TrivialCatalinaRealm.java +++ b/src/catalina-example/org/securityfilter/catalina/TrivialCatalinaRealm.java @@ -1,14 +1,15 @@ /* - * $Header: /cvsroot/securityfilter/securityfilter/src/catalina-example/org/securityfilter/catalina/Attic/TrivialCatalinaRealm.java,v 1.1 2002/08/08 13:20:47 maxcooper Exp $ - * $Revision: 1.1 $ - * $Date: 2002/08/08 13:20:47 $ + * $Header: /cvsroot/securityfilter/securityfilter/src/catalina-example/org/securityfilter/catalina/Attic/TrivialCatalinaRealm.java,v 1.2 2002/08/09 08:36:08 maxcooper Exp $ + * $Revision: 1.2 $ + * $Date: 2002/08/09 08:36:08 $ * * ==================================================================== + * The SecurityFilter Software License, Version 1.1 * - * The Apache Software License, Version 1.1 + * (this license is derived and fully compatible with the Apache Software + * License - see http://www.apache.org/LICENSE.txt) * - * Copyright (c) 1999 The Apache Software Foundation. All rights - * reserved. + * Copyright (c) 2002 SecurityFilter.org. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,21 +23,20 @@ * the documentation and/or other materials provided with the * distribution. * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by + * SecurityFilter.org (http://www.securityfilter.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. + * 4. The name "SecurityFilter" must not be used to endorse or promote + * products derived from this software without prior written permission. + * For written permission, please contact license@securityfilter.org . * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. + * 5. Products derived from this software may not be called "SecurityFilter", + * nor may "SecurityFilter" appear in their name, without prior written + * permission of SecurityFilter.org. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -51,14 +51,6 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * [Additional notices, if required by prior licensing conditions] - * */ package org.securityfilter.catalina; diff --git a/src/example/org/securityfilter/example/TrivialSecurityRealm.java b/src/example/org/securityfilter/example/TrivialSecurityRealm.java index 3bf7bc9..486ad18 100644 --- a/src/example/org/securityfilter/example/TrivialSecurityRealm.java +++ b/src/example/org/securityfilter/example/TrivialSecurityRealm.java @@ -1,14 +1,15 @@ /* - * $Header: /cvsroot/securityfilter/securityfilter/src/example/org/securityfilter/example/Attic/TrivialSecurityRealm.java,v 1.1 2002/08/08 13:20:47 maxcooper Exp $ - * $Revision: 1.1 $ - * $Date: 2002/08/08 13:20:47 $ + * $Header: /cvsroot/securityfilter/securityfilter/src/example/org/securityfilter/example/Attic/TrivialSecurityRealm.java,v 1.2 2002/08/09 08:36:08 maxcooper Exp $ + * $Revision: 1.2 $ + * $Date: 2002/08/09 08:36:08 $ * * ==================================================================== + * The SecurityFilter Software License, Version 1.1 * - * The Apache Software License, Version 1.1 + * (this license is derived and fully compatible with the Apache Software + * License - see http://www.apache.org/LICENSE.txt) * - * Copyright (c) 1999 The Apache Software Foundation. All rights - * reserved. + * Copyright (c) 2002 SecurityFilter.org. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,21 +23,20 @@ * the documentation and/or other materials provided with the * distribution. * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by + * SecurityFilter.org (http://www.securityfilter.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. + * 4. The name "SecurityFilter" must not be used to endorse or promote + * products derived from this software without prior written permission. + * For written permission, please contact license@securityfilter.org . * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. + * 5. Products derived from this software may not be called "SecurityFilter", + * nor may "SecurityFilter" appear in their name, without prior written + * permission of SecurityFilter.org. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -51,14 +51,6 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * [Additional notices, if required by prior licensing conditions] - * */ package org.securityfilter.example; @@ -72,7 +64,7 @@ import org.securityfilter.realm.SecurityRealmBase; * And this user is in one role: 'inthisrole' * * @author Max Cooper (max@maxcooper.com) - * @version $Revision: 1.1 $ $Date: 2002/08/08 13:20:47 $ + * @version $Revision: 1.2 $ $Date: 2002/08/09 08:36:08 $ */ public class TrivialSecurityRealm extends SecurityRealmBase { private static final String THE_USERNAME = "username"; diff --git a/src/share/org/securityfilter/config/SecurityConfig.java b/src/share/org/securityfilter/config/SecurityConfig.java index 2c3a94e..ded86da 100644 --- a/src/share/org/securityfilter/config/SecurityConfig.java +++ b/src/share/org/securityfilter/config/SecurityConfig.java @@ -1,14 +1,15 @@ /* - * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/config/SecurityConfig.java,v 1.1 2002/08/08 13:20:47 maxcooper Exp $ - * $Revision: 1.1 $ - * $Date: 2002/08/08 13:20:47 $ + * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/config/SecurityConfig.java,v 1.2 2002/08/09 08:36:08 maxcooper Exp $ + * $Revision: 1.2 $ + * $Date: 2002/08/09 08:36:08 $ * * ==================================================================== + * The SecurityFilter Software License, Version 1.1 * - * The Apache Software License, Version 1.1 + * (this license is derived and fully compatible with the Apache Software + * License - see http://www.apache.org/LICENSE.txt) * - * Copyright (c) 1999 The Apache Software Foundation. All rights - * reserved. + * Copyright (c) 2002 SecurityFilter.org. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,21 +23,20 @@ * the documentation and/or other materials provided with the * distribution. * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by + * SecurityFilter.org (http://www.securityfilter.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. + * 4. The name "SecurityFilter" must not be used to endorse or promote + * products derived from this software without prior written permission. + * For written permission, please contact license@securityfilter.org . * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. + * 5. Products derived from this software may not be called "SecurityFilter", + * nor may "SecurityFilter" appear in their name, without prior written + * permission of SecurityFilter.org. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -51,14 +51,6 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * [Additional notices, if required by prior licensing conditions] - * */ package org.securityfilter.config; @@ -80,7 +72,7 @@ import java.util.List; * * @author Torgeir Veimo (torgeir@pobox.com) * @author Max Cooper (max@maxcooper.com) - * @version $Revision: 1.1 $ $Date: 2002/08/08 13:20:47 $ + * @version $Revision: 1.2 $ $Date: 2002/08/09 08:36:08 $ */ public class SecurityConfig { @@ -103,14 +95,14 @@ public class SecurityConfig { } /** - * Return the login page url. + * Return the login page URL. */ public String getLoginPage() { return loginPage; } /** - * Set the login page URL. This is the page the user will be sent to to login (i.e. the login form). + * Set the login page URL. This is the page the user will be sent to to log in (i.e. the login form). * * @param loginPage The login page url (relative to site root) */ diff --git a/src/share/org/securityfilter/config/SecurityConstraint.java b/src/share/org/securityfilter/config/SecurityConstraint.java index 580476f..7818a05 100644 --- a/src/share/org/securityfilter/config/SecurityConstraint.java +++ b/src/share/org/securityfilter/config/SecurityConstraint.java @@ -1,14 +1,15 @@ /* - * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/config/SecurityConstraint.java,v 1.1 2002/08/08 13:20:47 maxcooper Exp $ - * $Revision: 1.1 $ - * $Date: 2002/08/08 13:20:47 $ + * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/config/SecurityConstraint.java,v 1.2 2002/08/09 08:36:08 maxcooper Exp $ + * $Revision: 1.2 $ + * $Date: 2002/08/09 08:36:08 $ * * ==================================================================== + * The SecurityFilter Software License, Version 1.1 * - * The Apache Software License, Version 1.1 + * (this license is derived and fully compatible with the Apache Software + * License - see http://www.apache.org/LICENSE.txt) * - * Copyright (c) 1999 The Apache Software Foundation. All rights - * reserved. + * Copyright (c) 2002 SecurityFilter.org. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,21 +23,20 @@ * the documentation and/or other materials provided with the * distribution. * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by + * SecurityFilter.org (http://www.securityfilter.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. + * 4. The name "SecurityFilter" must not be used to endorse or promote + * products derived from this software without prior written permission. + * For written permission, please contact license@securityfilter.org . * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. + * 5. Products derived from this software may not be called "SecurityFilter", + * nor may "SecurityFilter" appear in their name, without prior written + * permission of SecurityFilter.org. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -51,14 +51,6 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * [Additional notices, if required by prior licensing conditions] - * */ package org.securityfilter.config; @@ -71,7 +63,7 @@ import java.util.List; * * @author Max Cooper (max@maxcooper.com) * @author Torgeir Veimo (torgeir@pobox.com) - * @version $Revision: 1.1 $ $Date: 2002/08/08 13:20:47 $ + * @version $Revision: 1.2 $ $Date: 2002/08/09 08:36:08 $ */ public class SecurityConstraint { protected String name; diff --git a/src/share/org/securityfilter/config/WebResourceCollection.java b/src/share/org/securityfilter/config/WebResourceCollection.java index 3cfa88a..7860e2b 100644 --- a/src/share/org/securityfilter/config/WebResourceCollection.java +++ b/src/share/org/securityfilter/config/WebResourceCollection.java @@ -1,14 +1,15 @@ /* - * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/config/WebResourceCollection.java,v 1.1 2002/08/08 13:20:48 maxcooper Exp $ - * $Revision: 1.1 $ - * $Date: 2002/08/08 13:20:48 $ + * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/config/WebResourceCollection.java,v 1.2 2002/08/09 08:36:08 maxcooper Exp $ + * $Revision: 1.2 $ + * $Date: 2002/08/09 08:36:08 $ * * ==================================================================== + * The SecurityFilter Software License, Version 1.1 * - * The Apache Software License, Version 1.1 + * (this license is derived and fully compatible with the Apache Software + * License - see http://www.apache.org/LICENSE.txt) * - * Copyright (c) 1999 The Apache Software Foundation. All rights - * reserved. + * Copyright (c) 2002 SecurityFilter.org. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,21 +23,20 @@ * the documentation and/or other materials provided with the * distribution. * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by + * SecurityFilter.org (http://www.securityfilter.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. + * 4. The name "SecurityFilter" must not be used to endorse or promote + * products derived from this software without prior written permission. + * For written permission, please contact license@securityfilter.org . * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. + * 5. Products derived from this software may not be called "SecurityFilter", + * nor may "SecurityFilter" appear in their name, without prior written + * permission of SecurityFilter.org. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -51,14 +51,6 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * [Additional notices, if required by prior licensing conditions] - * */ package org.securityfilter.config; @@ -70,7 +62,7 @@ import java.util.*; * It has a name, a list of url patterns, and a list of http methods. * * @author Max Cooper (max@maxcooper.com) - * @version $Revision: 1.1 $ $Date: 2002/08/08 13:20:48 $ + * @version $Revision: 1.2 $ $Date: 2002/08/09 08:36:08 $ */ public class WebResourceCollection { protected String name; diff --git a/src/share/org/securityfilter/filter/MatchableURLPattern.java b/src/share/org/securityfilter/filter/MatchableURLPattern.java index 0bd2252..215bc48 100644 --- a/src/share/org/securityfilter/filter/MatchableURLPattern.java +++ b/src/share/org/securityfilter/filter/MatchableURLPattern.java @@ -1,14 +1,15 @@ /* - * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/filter/Attic/MatchableURLPattern.java,v 1.1 2002/08/08 13:20:48 maxcooper Exp $ - * $Revision: 1.1 $ - * $Date: 2002/08/08 13:20:48 $ + * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/filter/Attic/MatchableURLPattern.java,v 1.2 2002/08/09 08:36:07 maxcooper Exp $ + * $Revision: 1.2 $ + * $Date: 2002/08/09 08:36:07 $ * * ==================================================================== + * The SecurityFilter Software License, Version 1.1 * - * The Apache Software License, Version 1.1 + * (this license is derived and fully compatible with the Apache Software + * License - see http://www.apache.org/LICENSE.txt) * - * Copyright (c) 1999 The Apache Software Foundation. All rights - * reserved. + * Copyright (c) 2002 SecurityFilter.org. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,21 +23,20 @@ * the documentation and/or other materials provided with the * distribution. * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by + * SecurityFilter.org (http://www.securityfilter.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. + * 4. The name "SecurityFilter" must not be used to endorse or promote + * products derived from this software without prior written permission. + * For written permission, please contact license@securityfilter.org . * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. + * 5. Products derived from this software may not be called "SecurityFilter", + * nor may "SecurityFilter" appear in their name, without prior written + * permission of SecurityFilter.org. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -51,14 +51,6 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * [Additional notices, if required by prior licensing conditions] - * */ package org.securityfilter.filter; @@ -75,7 +67,7 @@ import org.securityfilter.config.WebResourceCollection; * by the order field). * * @author Max Cooper (max@maxcooper.com) - * @version $Revision: 1.1 $ $Date: 2002/08/08 13:20:48 $ + * @version $Revision: 1.2 $ $Date: 2002/08/09 08:36:07 $ */ public class MatchableURLPattern implements Comparable { private String pattern; diff --git a/src/share/org/securityfilter/filter/MatchableURLPatternFactory.java b/src/share/org/securityfilter/filter/MatchableURLPatternFactory.java index 5db9bc4..6b6913f 100644 --- a/src/share/org/securityfilter/filter/MatchableURLPatternFactory.java +++ b/src/share/org/securityfilter/filter/MatchableURLPatternFactory.java @@ -1,14 +1,15 @@ /* - * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/filter/Attic/MatchableURLPatternFactory.java,v 1.1 2002/08/08 13:20:48 maxcooper Exp $ - * $Revision: 1.1 $ - * $Date: 2002/08/08 13:20:48 $ + * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/filter/Attic/MatchableURLPatternFactory.java,v 1.2 2002/08/09 08:36:07 maxcooper Exp $ + * $Revision: 1.2 $ + * $Date: 2002/08/09 08:36:07 $ * * ==================================================================== + * The SecurityFilter Software License, Version 1.1 * - * The Apache Software License, Version 1.1 + * (this license is derived and fully compatible with the Apache Software + * License - see http://www.apache.org/LICENSE.txt) * - * Copyright (c) 1999 The Apache Software Foundation. All rights - * reserved. + * Copyright (c) 2002 SecurityFilter.org. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,21 +23,20 @@ * the documentation and/or other materials provided with the * distribution. * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by + * SecurityFilter.org (http://www.securityfilter.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. + * 4. The name "SecurityFilter" must not be used to endorse or promote + * products derived from this software without prior written permission. + * For written permission, please contact license@securityfilter.org . * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. + * 5. Products derived from this software may not be called "SecurityFilter", + * nor may "SecurityFilter" appear in their name, without prior written + * permission of SecurityFilter.org. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -51,14 +51,6 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * [Additional notices, if required by prior licensing conditions] - * */ package org.securityfilter.filter; @@ -73,7 +65,7 @@ import org.securityfilter.config.WebResourceCollection; * of a set of instances. * * @author Max Cooper (max@maxcooper.com) - * @version $Revision: 1.1 $ $Date: 2002/08/08 13:20:48 $ + * @version $Revision: 1.2 $ $Date: 2002/08/09 08:36:07 $ */ public class MatchableURLPatternFactory { private RECompiler compiler; diff --git a/src/share/org/securityfilter/filter/SecurityFilter.java b/src/share/org/securityfilter/filter/SecurityFilter.java index 77ef803..52e1c15 100644 --- a/src/share/org/securityfilter/filter/SecurityFilter.java +++ b/src/share/org/securityfilter/filter/SecurityFilter.java @@ -1,14 +1,15 @@ /* - * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/filter/SecurityFilter.java,v 1.1 2002/08/08 13:20:48 maxcooper Exp $ - * $Revision: 1.1 $ - * $Date: 2002/08/08 13:20:48 $ + * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/filter/SecurityFilter.java,v 1.2 2002/08/09 08:36:07 maxcooper Exp $ + * $Revision: 1.2 $ + * $Date: 2002/08/09 08:36:07 $ * * ==================================================================== + * The SecurityFilter Software License, Version 1.1 * - * The Apache Software License, Version 1.1 + * (this license is derived and fully compatible with the Apache Software + * License - see http://www.apache.org/LICENSE.txt) * - * Copyright (c) 1999 The Apache Software Foundation. All rights - * reserved. + * Copyright (c) 2002 SecurityFilter.org. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,21 +23,20 @@ * the documentation and/or other materials provided with the * distribution. * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by + * SecurityFilter.org (http://www.securityfilter.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. + * 4. The name "SecurityFilter" must not be used to endorse or promote + * products derived from this software without prior written permission. + * For written permission, please contact license@securityfilter.org . * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. + * 5. Products derived from this software may not be called "SecurityFilter", + * nor may "SecurityFilter" appear in their name, without prior written + * permission of SecurityFilter.org. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -51,14 +51,6 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * [Additional notices, if required by prior licensing conditions] - * */ package org.securityfilter.filter; @@ -85,7 +77,7 @@ import java.util.*; * * @author Max Cooper (max@maxcooper.com) * @author Torgeir Veimo (torgeir@pobox.com) - * @version $Revision: 1.1 $ $Date: 2002/08/08 13:20:48 $ + * @version $Revision: 1.2 $ $Date: 2002/08/09 08:36:07 $ */ public class SecurityFilter implements javax.servlet.Filter { public static final String CONTINUE_TO_URL = SecurityFilter.class.getName() + ".CONTINUE_TO_URL"; diff --git a/src/share/org/securityfilter/filter/SecurityRequestWrapper.java b/src/share/org/securityfilter/filter/SecurityRequestWrapper.java index b4358a9..542871f 100644 --- a/src/share/org/securityfilter/filter/SecurityRequestWrapper.java +++ b/src/share/org/securityfilter/filter/SecurityRequestWrapper.java @@ -1,14 +1,15 @@ /* - * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/filter/SecurityRequestWrapper.java,v 1.1 2002/08/08 13:20:48 maxcooper Exp $ - * $Revision: 1.1 $ - * $Date: 2002/08/08 13:20:48 $ + * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/filter/SecurityRequestWrapper.java,v 1.2 2002/08/09 08:36:07 maxcooper Exp $ + * $Revision: 1.2 $ + * $Date: 2002/08/09 08:36:07 $ * * ==================================================================== + * The SecurityFilter Software License, Version 1.1 * - * The Apache Software License, Version 1.1 + * (this license is derived and fully compatible with the Apache Software + * License - see http://www.apache.org/LICENSE.txt) * - * Copyright (c) 1999 The Apache Software Foundation. All rights - * reserved. + * Copyright (c) 2002 SecurityFilter.org. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,21 +23,20 @@ * the documentation and/or other materials provided with the * distribution. * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by + * SecurityFilter.org (http://www.securityfilter.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. + * 4. The name "SecurityFilter" must not be used to endorse or promote + * products derived from this software without prior written permission. + * For written permission, please contact license@securityfilter.org . * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. + * 5. Products derived from this software may not be called "SecurityFilter", + * nor may "SecurityFilter" appear in their name, without prior written + * permission of SecurityFilter.org. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -51,14 +51,6 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * [Additional notices, if required by prior licensing conditions] - * */ package org.securityfilter.filter; @@ -81,7 +73,7 @@ import java.util.Map; * * @author Max Cooper (max@maxcooper.com) * @author Torgeir Veimo (torgeir@pobox.com) - * @version $Revision: 1.1 $ $Date: 2002/08/08 13:20:48 $ + * @version $Revision: 1.2 $ $Date: 2002/08/09 08:36:07 $ */ public class SecurityRequestWrapper extends HttpServletRequestWrapper { public static final String PRINCIPAL_SESSION_KEY = SecurityRequestWrapper.class.getName() + ".PRINCIPAL"; diff --git a/src/share/org/securityfilter/realm/SecurityRealmBase.java b/src/share/org/securityfilter/realm/SecurityRealmBase.java index 81580e6..bd909ac 100644 --- a/src/share/org/securityfilter/realm/SecurityRealmBase.java +++ b/src/share/org/securityfilter/realm/SecurityRealmBase.java @@ -1,14 +1,15 @@ /* - * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/realm/Attic/SecurityRealmBase.java,v 1.1 2002/08/08 13:20:48 maxcooper Exp $ - * $Revision: 1.1 $ - * $Date: 2002/08/08 13:20:48 $ + * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/realm/Attic/SecurityRealmBase.java,v 1.2 2002/08/09 08:36:07 maxcooper Exp $ + * $Revision: 1.2 $ + * $Date: 2002/08/09 08:36:07 $ * * ==================================================================== + * The SecurityFilter Software License, Version 1.1 * - * The Apache Software License, Version 1.1 + * (this license is derived and fully compatible with the Apache Software + * License - see http://www.apache.org/LICENSE.txt) * - * Copyright (c) 1999 The Apache Software Foundation. All rights - * reserved. + * Copyright (c) 2002 SecurityFilter.org. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,21 +23,20 @@ * the documentation and/or other materials provided with the * distribution. * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by + * SecurityFilter.org (http://www.securityfilter.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. + * 4. The name "SecurityFilter" must not be used to endorse or promote + * products derived from this software without prior written permission. + * For written permission, please contact license@securityfilter.org . * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. + * 5. Products derived from this software may not be called "SecurityFilter", + * nor may "SecurityFilter" appear in their name, without prior written + * permission of SecurityFilter.org. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -51,14 +51,6 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * [Additional notices, if required by prior licensing conditions] - * */ package org.securityfilter.realm; @@ -66,36 +58,41 @@ package org.securityfilter.realm; import java.security.Principal; /** - * SecurityRealmBase - abstract security realm base class. This class insulates you from having - * to create or process Principal objects. You can implement a realm by implementing the two methods - * that neither take or return a Principal object and this class does the conversions for you. + * Security realm base class. This class insulates you from having to create or process Principal + * objects. You can implement a realm by overriding the two methods that neither take or return + * a Principal object and this class does the conversions for you. * * @author Max Cooper (max@maxcooper.com) */ -public abstract class SecurityRealmBase implements SecurityRealmInterface { +public class SecurityRealmBase implements SecurityRealmInterface { /** * Authenticate a user. * - * Implement this method in a subclass to avoid dealing with Principal objects. + * Override this method in a subclass to avoid dealing with Principal objects. * * @param username a username * @param password a plain text password, as entered by the user * - * @return null if the user cannot be authenticated, otherwise a Pricipal object is returned + * @return true if the username/password combination is valid, false otherwise */ - public abstract boolean booleanAuthenticate(String username, String password); + public boolean booleanAuthenticate(String username, String password) { + return false; + } /** * Test for role membership. * - * Implement this method in a subclass to avoid dealing with Principal objects. + * Override this method in a subclass to avoid dealing with Principal objects. * - * @param principal Principal object representing a user + * @param username a username * @param rolename name of a role to test for membership + * * @return true if the user is in the role, false otherwise */ - public abstract boolean isUserInRole(String username, String rolename); + public boolean isUserInRole(String username, String rolename) { + return false; + } /** * Authenticate a user. @@ -124,6 +121,7 @@ public abstract class SecurityRealmBase implements SecurityRealmInterface { * * @param principal Principal object representing a user * @param rolename name of a role to test for membership + * * @return true if the user is in the role, false otherwise */ public boolean isUserInRole(Principal principal, String rolename) { diff --git a/src/share/org/securityfilter/realm/SecurityRealmInterface.java b/src/share/org/securityfilter/realm/SecurityRealmInterface.java index 03bb791..33bac5f 100644 --- a/src/share/org/securityfilter/realm/SecurityRealmInterface.java +++ b/src/share/org/securityfilter/realm/SecurityRealmInterface.java @@ -1,14 +1,15 @@ /* - * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/realm/SecurityRealmInterface.java,v 1.1 2002/08/08 13:20:48 maxcooper Exp $ - * $Revision: 1.1 $ - * $Date: 2002/08/08 13:20:48 $ + * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/realm/SecurityRealmInterface.java,v 1.2 2002/08/09 08:36:07 maxcooper Exp $ + * $Revision: 1.2 $ + * $Date: 2002/08/09 08:36:07 $ * * ==================================================================== + * The SecurityFilter Software License, Version 1.1 * - * The Apache Software License, Version 1.1 + * (this license is derived and fully compatible with the Apache Software + * License - see http://www.apache.org/LICENSE.txt) * - * Copyright (c) 1999 The Apache Software Foundation. All rights - * reserved. + * Copyright (c) 2002 SecurityFilter.org. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,21 +23,20 @@ * the documentation and/or other materials provided with the * distribution. * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by + * SecurityFilter.org (http://www.securityfilter.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. + * 4. The name "SecurityFilter" must not be used to endorse or promote + * products derived from this software without prior written permission. + * For written permission, please contact license@securityfilter.org . * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. + * 5. Products derived from this software may not be called "SecurityFilter", + * nor may "SecurityFilter" appear in their name, without prior written + * permission of SecurityFilter.org. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -51,14 +51,6 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * [Additional notices, if required by prior licensing conditions] - * */ package org.securityfilter.realm; @@ -72,7 +64,7 @@ import java.security.Principal; * Typically, a project will implement this interface or adapt an existing realm implementation to this interface. * * @author Max Cooper (max@maxcooper.com) - * @version $Revision: 1.1 $ $Date: 2002/08/08 13:20:48 $ + * @version $Revision: 1.2 $ $Date: 2002/08/09 08:36:07 $ */ public interface SecurityRealmInterface { @@ -93,6 +85,7 @@ public interface SecurityRealmInterface { * * @param principal Principal object representing a user * @param rolename name of a role to test for membership + * * @return true if the user is in the role, false otherwise */ public boolean isUserInRole(Principal principal, String rolename); diff --git a/src/share/org/securityfilter/realm/adapter/CatalinaRealmAdapter.java b/src/share/org/securityfilter/realm/adapter/CatalinaRealmAdapter.java index 595108f..d25f5d1 100644 --- a/src/share/org/securityfilter/realm/adapter/CatalinaRealmAdapter.java +++ b/src/share/org/securityfilter/realm/adapter/CatalinaRealmAdapter.java @@ -1,14 +1,15 @@ /* - * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/realm/adapter/Attic/CatalinaRealmAdapter.java,v 1.1 2002/08/08 13:20:48 maxcooper Exp $ - * $Revision: 1.1 $ - * $Date: 2002/08/08 13:20:48 $ + * $Header: /cvsroot/securityfilter/securityfilter/src/share/org/securityfilter/realm/adapter/Attic/CatalinaRealmAdapter.java,v 1.2 2002/08/09 08:36:07 maxcooper Exp $ + * $Revision: 1.2 $ + * $Date: 2002/08/09 08:36:07 $ * * ==================================================================== + * The SecurityFilter Software License, Version 1.1 * - * The Apache Software License, Version 1.1 + * (this license is derived and fully compatible with the Apache Software + * License - see http://www.apache.org/LICENSE.txt) * - * Copyright (c) 1999 The Apache Software Foundation. All rights - * reserved. + * Copyright (c) 2002 SecurityFilter.org. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,21 +23,20 @@ * the documentation and/or other materials provided with the * distribution. * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by + * SecurityFilter.org (http://www.securityfilter.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. + * 4. The name "SecurityFilter" must not be used to endorse or promote + * products derived from this software without prior written permission. + * For written permission, please contact license@securityfilter.org . * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. + * 5. Products derived from this software may not be called "SecurityFilter", + * nor may "SecurityFilter" appear in their name, without prior written + * permission of SecurityFilter.org. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -51,14 +51,6 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * [Additional notices, if required by prior licensing conditions] - * */ package org.securityfilter.realm.adapter; -- 2.11.0