You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by tr...@apache.org on 2005/06/13 08:41:50 UTC
svn commit: r190360 - in /directory/apacheds/branches/direve-158/core/src:
main/java/org/apache/ldap/server/ main/java/org/apache/ldap/server/jndi/
test/org/apache/ldap/server/authn/
Author: trustin
Date: Sun Jun 12 23:41:49 2005
New Revision: 190360
URL: http://svn.apache.org/viewcvs?rev=190360&view=rev
Log:
* Fixed: problems with anonymous access
* Fixed: Failing tests
* Fixed: AbstractContextFactory removed some elements of the environment map user specified
Modified:
directory/apacheds/branches/direve-158/core/src/main/java/org/apache/ldap/server/AbstractTestCase.java
directory/apacheds/branches/direve-158/core/src/main/java/org/apache/ldap/server/jndi/AbstractContextFactory.java
directory/apacheds/branches/direve-158/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryContext.java
directory/apacheds/branches/direve-158/core/src/test/org/apache/ldap/server/authn/SimpleAuthenticationTest.java
Modified: directory/apacheds/branches/direve-158/core/src/main/java/org/apache/ldap/server/AbstractTestCase.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/direve-158/core/src/main/java/org/apache/ldap/server/AbstractTestCase.java?rev=190360&r1=190359&r2=190360&view=diff
==============================================================================
--- directory/apacheds/branches/direve-158/core/src/main/java/org/apache/ldap/server/AbstractTestCase.java (original)
+++ directory/apacheds/branches/direve-158/core/src/main/java/org/apache/ldap/server/AbstractTestCase.java Sun Jun 12 23:41:49 2005
@@ -291,6 +291,7 @@
env.putAll( new ShutdownConfiguration().toJndiEnvironment() );
env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
env.put( Context.SECURITY_CREDENTIALS, "secret" );
+ env.put( Context.SECURITY_AUTHENTICATION, "simple" );
try { new InitialContext( env ); } catch( Exception e ) {}
Modified: directory/apacheds/branches/direve-158/core/src/main/java/org/apache/ldap/server/jndi/AbstractContextFactory.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/direve-158/core/src/main/java/org/apache/ldap/server/jndi/AbstractContextFactory.java?rev=190360&r1=190359&r2=190360&view=diff
==============================================================================
--- directory/apacheds/branches/direve-158/core/src/main/java/org/apache/ldap/server/jndi/AbstractContextFactory.java (original)
+++ directory/apacheds/branches/direve-158/core/src/main/java/org/apache/ldap/server/jndi/AbstractContextFactory.java Sun Jun 12 23:41:49 2005
@@ -71,6 +71,8 @@
String authentication;
String providerUrl;
+ env = ( Hashtable ) env.clone();
+
// Remove properties that can be changed
Object value = env.remove( Context.SECURITY_PRINCIPAL );
if( value == null )
Modified: directory/apacheds/branches/direve-158/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryContext.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/direve-158/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryContext.java?rev=190360&r1=190359&r2=190360&view=diff
==============================================================================
--- directory/apacheds/branches/direve-158/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryContext.java (original)
+++ directory/apacheds/branches/direve-158/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryContext.java Sun Jun 12 23:41:49 2005
@@ -237,6 +237,7 @@
finally
{
environment = null;
+ interceptorChain = null;
configuration = null;
factory.afterShutdown( this );
}
@@ -338,7 +339,7 @@
+ Context.SECURITY_PRINCIPAL + " property is set" );
}
- if( configuration.isAllowAnonymousAccess() )
+ if( !configuration.isAllowAnonymousAccess() )
{
throw new LdapNoPermissionException( "Anonymous access disabled." );
}
Modified: directory/apacheds/branches/direve-158/core/src/test/org/apache/ldap/server/authn/SimpleAuthenticationTest.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/direve-158/core/src/test/org/apache/ldap/server/authn/SimpleAuthenticationTest.java?rev=190360&r1=190359&r2=190360&view=diff
==============================================================================
--- directory/apacheds/branches/direve-158/core/src/test/org/apache/ldap/server/authn/SimpleAuthenticationTest.java (original)
+++ directory/apacheds/branches/direve-158/core/src/test/org/apache/ldap/server/authn/SimpleAuthenticationTest.java Sun Jun 12 23:41:49 2005
@@ -181,12 +181,10 @@
{
// clean out the database
tearDown();
- doDelete( new File( "target" + File.separator + "eve" ) );
Hashtable env = new Hashtable( configuration.toJndiEnvironment() );
env.put( Context.SECURITY_AUTHENTICATION, "none" );
configuration.setAllowAnonymousAccess( false );
-
try
{
setSysRoot( env );
@@ -195,8 +193,11 @@
catch( LdapNoPermissionException e )
{
}
+ tearDown();
// ok this should start up the system now as admin
+ env = new Hashtable( configuration.toJndiEnvironment() );
+ env.put( Context.SECURITY_AUTHENTICATION, "none" );
configuration.setAllowAnonymousAccess( true );
InitialLdapContext ctx = ( InitialLdapContext ) setSysRoot( env );