directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1197185 - /directory/apacheds/branches/apacheds-osgi/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java
Date Thu, 03 Nov 2011 15:28:25 GMT
Author: elecharny
Date: Thu Nov  3 15:28:24 2011
New Revision: 1197185

URL: http://svn.apache.org/viewvc?rev=1197185&view=rev
Log:
Removed the Lookup bypass, replaced it with a direct call to nexus.lookup()

Modified:
    directory/apacheds/branches/apacheds-osgi/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java

Modified: directory/apacheds/branches/apacheds-osgi/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java?rev=1197185&r1=1197184&r2=1197185&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java
Thu Nov  3 15:28:24 2011
@@ -22,12 +22,8 @@ package org.apache.directory.server.core
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
 import org.apache.directory.server.core.api.interceptor.BaseInterceptor;
@@ -80,30 +76,6 @@ public class KeyDerivationInterceptor ex
     public static final String NAME = "keyDerivationService";
 
     /**
-     * Define the interceptors to bypass upon user lookup.
-     */
-    private static final Collection<String> USERLOOKUP_BYPASS;
-    static
-    {
-        Set<String> c = new HashSet<String>();
-        c.add( "NormalizationInterceptor" );
-        c.add( "AuthenticationInterceptor" );
-        c.add( "ReferralInterceptor" );
-        c.add( "AciAuthorizationInterceptor" );
-        c.add( "DefaultAuthorizationInterceptor" );
-        c.add( "AdministrativePointInterceptor" );
-        c.add( "ExceptionInterceptor" );
-        c.add( "OperationalAttributeInterceptor" );
-        c.add( "SchemaInterceptor" );
-        c.add( "CollectiveAttributeInterceptor" );
-        c.add( "SubentryInterceptor" );
-        c.add( "EventInterceptor" );
-        c.add( "TriggerInterceptor" );
-        USERLOOKUP_BYPASS = Collections.unmodifiableCollection( c );
-    }
-
-
-    /**
      * Intercept the addition of the 'userPassword' and 'krb5PrincipalName' attributes. 
Use the 'userPassword'
      * and 'krb5PrincipalName' attributes to derive Kerberos keys for the principal.  If
the 'userPassword' is
      * the special keyword 'randomKey', set random keys for the principal.  Set the key version
number (kvno)
@@ -272,7 +244,7 @@ public class KeyDerivationInterceptor ex
         Dn principalDn = modContext.getDn();
 
         LookupOperationContext lookupContext = modContext.newLookupContext( principalDn );
-        lookupContext.setByPassed( USERLOOKUP_BYPASS );
+        //lookupContext.setByPassed( USERLOOKUP_BYPASS );
         lookupContext.setAttrsId( new String[]
         {
             SchemaConstants.OBJECT_CLASS_AT,
@@ -280,7 +252,7 @@ public class KeyDerivationInterceptor ex
             KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT
         } );
 
-        Entry userEntry = modContext.lookup( lookupContext );
+        Entry userEntry = directoryService.getPartitionNexus().lookup( lookupContext );
 
         if ( userEntry == null )
         {



Mime
View raw message