db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r544934 - in /db/derby/code/trunk/java: drda/org/apache/derby/drda/NetworkServerControl.java testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java
Date Wed, 06 Jun 2007 20:09:27 GMT
Author: rhillegas
Date: Wed Jun  6 13:09:26 2007
New Revision: 544934

URL: http://svn.apache.org/viewvc?view=rev&rev=544934
Log:
DERBY-2757: No longer flunk server boot when authentication is not enabled.

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/drda/NetworkServerControl.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java

Modified: db/derby/code/trunk/java/drda/org/apache/derby/drda/NetworkServerControl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/drda/NetworkServerControl.java?view=diff&rev=544934&r1=544933&r2=544934
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/drda/NetworkServerControl.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/drda/NetworkServerControl.java Wed Jun
 6 13:09:26 2007
@@ -552,27 +552,16 @@
     
     /**
      * Verify that all prerequisites are met before bringing up a security
-     * manager. See DERBY-2196.
+     * manager. See DERBY-2196. If prerequisites aren't met, raise an
+     * exception which explains how to get up and running. At one point, we were going to
require
+     * that authentication be enabled before bringing up a security manager.
+     * This, however, gave rise to incompatibilities. See DERBY-2757.
+     *
+     * Currently, this method is a nop.
      */
     private static  void verifySecurityState( NetworkServerControlImpl server )
         throws Exception
     {
-        //
-        // Authentication should be turned on. Otherwise, the user will
-        // be tricked into a false sense of security. Important security checks
-        // will be identity based.
-        //
-        String      authenticationProperty =
-            PropertyUtil.getSystemProperty( Property.REQUIRE_AUTHENTICATION_PARAMETER );
-        boolean     authenticationRequired = Boolean.valueOf( authenticationProperty ).booleanValue();
-        
-        if ( !authenticationRequired )
-        {
-            String  errorMessage = server.localizeMessage( "DRDA_NoAuthentication.S", null
);
-
-            // this throws an exception and exits this method
-            server.consoleError( errorMessage );
-        }
     }
 
     

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java?view=diff&rev=544934&r1=544933&r2=544934
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java
Wed Jun  6 13:09:26 2007
@@ -91,7 +91,6 @@
     //
     ///////////////////////////////////////////////////////////////////////////////////
 
-    private static final Outcome FAILED_NO_AUTHENTICATION = new Outcome( false, authenticationFailure()
);
     private static final Outcome RUNNING_SECURITY_NOT_BOOTED = new Outcome( true, "" );
     private static final Outcome RUNNING_SECURITY_BOOTED = new Outcome( true,  serverBootedOK()
);
 
@@ -165,7 +164,7 @@
         //      .addTest( decorateTest( O,        A,       C,    Outcome ) );
         //
 
-        suite.addTest( decorateTest( false,  false, false, FAILED_NO_AUTHENTICATION ) );
+        suite.addTest( decorateTest( false,  false, false, RUNNING_SECURITY_BOOTED ) );
         suite.addTest( decorateTest( false,  false, true, RUNNING_SECURITY_BOOTED ) );
         suite.addTest( decorateTest( false,  true, false, RUNNING_SECURITY_BOOTED ) );
         suite.addTest( decorateTest( true,  false, false, RUNNING_SECURITY_NOT_BOOTED ) );
@@ -354,21 +353,6 @@
         int             bytesRead = is.read( inputBuffer );
 
         return new String( inputBuffer, 0, bytesRead );
-    }
-
-    private static  String  authenticationFailure()
-    {
-        return
-        "Network Server startup failed. User authentication " +
-        "must be enabled before the Network Server installs a security manager. " +
-        "You must either enable user authentication or disable the installation " +
-        "of a security manager. For information on enabling user authentication, " +
-        "see the section of the Derby Developer's Guide entitled \"Working with user authentication\".
" +
-        "Disabling the installation of a security manager is strongly discouraged " +
-        "in a client/server environment. However, if you must do this, " +
-        "you can disable the installation of a security manager by specifying " +
-        "the \"-noSecurityManager\" command line option when you " +
-         "bring up the Network Server.";
     }
 
     private static  String  serverBootedOK()



Mime
View raw message