You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by tc...@apache.org on 2011/09/29 21:34:57 UTC

svn commit: r1177406 - in /juddi/trunk: docs/devguide/en-US/extras/ docs/userguide/en-US/ docs/userguide/en-US/extras/ juddi-core/src/main/java/org/apache/juddi/v3/auth/

Author: tcunning
Date: Thu Sep 29 19:34:57 2011
New Revision: 1177406

URL: http://svn.apache.org/viewvc?rev=1177406&view=rev
Log:
JUDDI-529
Fix LdapSimpleAuthenticator and update documents to refer to the correct
properties - juddi.authenticator and juddi.authenticator.url instead of the
previous juddi.auth and juddi.auth.url.

Modified:
    juddi/trunk/docs/devguide/en-US/extras/Authentication_2.java
    juddi/trunk/docs/devguide/en-US/extras/Authentication_3.java
    juddi/trunk/docs/devguide/en-US/extras/Authentication_3.xmlt
    juddi/trunk/docs/devguide/en-US/extras/Authentication_4.java
    juddi/trunk/docs/devguide/en-US/extras/Authentication_5.xmlt
    juddi/trunk/docs/userguide/en-US/Authentication.xml
    juddi/trunk/docs/userguide/en-US/extras/Authentication_2.java
    juddi/trunk/docs/userguide/en-US/extras/Authentication_3.java
    juddi/trunk/docs/userguide/en-US/extras/Authentication_3.xmlt
    juddi/trunk/docs/userguide/en-US/extras/Authentication_4.java
    juddi/trunk/docs/userguide/en-US/extras/Authentication_5.xmlt
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/v3/auth/LdapSimpleAuthenticator.java

Modified: juddi/trunk/docs/devguide/en-US/extras/Authentication_2.java
URL: http://svn.apache.org/viewvc/juddi/trunk/docs/devguide/en-US/extras/Authentication_2.java?rev=1177406&r1=1177405&r2=1177406&view=diff
==============================================================================
--- juddi/trunk/docs/devguide/en-US/extras/Authentication_2.java (original)
+++ juddi/trunk/docs/devguide/en-US/extras/Authentication_2.java Thu Sep 29 19:34:57 2011
@@ -1 +1 @@
-juddi.auth = org.apache.juddi.auth.JUDDIAuthentication
\ No newline at end of file
+juddi.authenticator = org.apache.juddi.auth.JUDDIAuthentication

Modified: juddi/trunk/docs/devguide/en-US/extras/Authentication_3.java
URL: http://svn.apache.org/viewvc/juddi/trunk/docs/devguide/en-US/extras/Authentication_3.java?rev=1177406&r1=1177405&r2=1177406&view=diff
==============================================================================
--- juddi/trunk/docs/devguide/en-US/extras/Authentication_3.java (original)
+++ juddi/trunk/docs/devguide/en-US/extras/Authentication_3.java Thu Sep 29 19:34:57 2011
@@ -1,2 +1,2 @@
-juddi.auth = org.apache.juddi.auth.XMLDocAuthentication
-juddi.usersfile = juddi-users.xml
\ No newline at end of file
+juddi.authenticator = org.apache.juddi.auth.XMLDocAuthentication
+juddi.usersfile = juddi-users.xml

Modified: juddi/trunk/docs/devguide/en-US/extras/Authentication_3.xmlt
URL: http://svn.apache.org/viewvc/juddi/trunk/docs/devguide/en-US/extras/Authentication_3.xmlt?rev=1177406&r1=1177405&r2=1177406&view=diff
==============================================================================
--- juddi/trunk/docs/devguide/en-US/extras/Authentication_3.xmlt (original)
+++ juddi/trunk/docs/devguide/en-US/extras/Authentication_3.xmlt Thu Sep 29 19:34:57 2011
@@ -1,2 +1,2 @@
-juddi.auth=org.apache.juddi.auth.JBossAuthenticator
-juddi.securityDomain=java:/jaas/other
\ No newline at end of file
+juddi.authenticator=org.apache.juddi.auth.JBossAuthenticator
+juddi.securityDomain=java:/jaas/other

Modified: juddi/trunk/docs/devguide/en-US/extras/Authentication_4.java
URL: http://svn.apache.org/viewvc/juddi/trunk/docs/devguide/en-US/extras/Authentication_4.java?rev=1177406&r1=1177405&r2=1177406&view=diff
==============================================================================
--- juddi/trunk/docs/devguide/en-US/extras/Authentication_4.java (original)
+++ juddi/trunk/docs/devguide/en-US/extras/Authentication_4.java Thu Sep 29 19:34:57 2011
@@ -1,3 +1,3 @@
-juddi.auth = org.apache.juddi.auth.CryptedXMLDocAuthentication
+juddi.authenticator = org.apache.juddi.auth.CryptedXMLDocAuthentication
 juddi.usersfile = juddi-users-encrypted.xml
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
\ No newline at end of file
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor

Modified: juddi/trunk/docs/devguide/en-US/extras/Authentication_5.xmlt
URL: http://svn.apache.org/viewvc/juddi/trunk/docs/devguide/en-US/extras/Authentication_5.xmlt?rev=1177406&r1=1177405&r2=1177406&view=diff
==============================================================================
--- juddi/trunk/docs/devguide/en-US/extras/Authentication_5.xmlt (original)
+++ juddi/trunk/docs/devguide/en-US/extras/Authentication_5.xmlt Thu Sep 29 19:34:57 2011
@@ -1,2 +1,2 @@
-juddi.auth=org.apache.juddi.auth.LdapSimpleAuthenticator
-juddi.auth.url=ldap://localhost:389
+juddi.authenticator=org.apache.juddi.auth.LdapSimpleAuthenticator
+juddi.authenticator.url=ldap://localhost:389

Modified: juddi/trunk/docs/userguide/en-US/Authentication.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/docs/userguide/en-US/Authentication.xml?rev=1177406&r1=1177405&r2=1177406&view=diff
==============================================================================
--- juddi/trunk/docs/userguide/en-US/Authentication.xml (original)
+++ juddi/trunk/docs/userguide/en-US/Authentication.xml Thu Sep 29 19:34:57 2011
@@ -46,7 +46,7 @@
        <programlisting language="Java"><xi:include href="extras/Authentication_1.java" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
 
         <para>
-        The property <property>juddi.auth</property> in the
+        The property <property>juddi.authenticator</property> in the
         <filename>juddi.properties</filename> configuration file can be used to configure
         how jUDDI is going to check the credentials passed in on the
         <classname>GetAuthToken</classname> request. By default jUDDI uses the
@@ -54,7 +54,7 @@
         authentication implementation or use any of the ones mention below. The
         implementation needs to implement the
         <interfacename>org.apache.juddi.auth.Authenticator</interfacename> interface, and
-        <property>juddi.auth</property> property should refer to the implementation class.
+        <property>juddi.authenticator</property> property should refer to the implementation class.
         </para>
 
         <para>
@@ -219,7 +219,7 @@
         <programlisting language="XML"><xi:include href="extras/Authentication_5.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
 
         <para>
-	The <classname>juddi.auth.url</classname> property configures the
+	The <classname>juddi.authenticator.url</classname> property configures the
         <classname>LdapSimpleAuthenticator</classname> class so that it knows where the LDAP
 	server resides.     Future work is planned in this area to use the LDAP uid rather than
 	the LDAP principal as the default publisher id.
@@ -250,7 +250,7 @@
         <programlisting language="XML"><xi:include href="extras/Authentication_3.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
 
         <para>
-        The <property>juddi.auth</property> property plugs the
+        The <property>juddi.authenticator</property> property plugs the
         <classname>JbossAuthenticator</classname> class into the jUDDI the Authenticator
         framework. The <classname>juddi.sercuity.domain</classname>, configures the
         <classname>JBossAuthenticator</classname> class where it can lookup the

Modified: juddi/trunk/docs/userguide/en-US/extras/Authentication_2.java
URL: http://svn.apache.org/viewvc/juddi/trunk/docs/userguide/en-US/extras/Authentication_2.java?rev=1177406&r1=1177405&r2=1177406&view=diff
==============================================================================
--- juddi/trunk/docs/userguide/en-US/extras/Authentication_2.java (original)
+++ juddi/trunk/docs/userguide/en-US/extras/Authentication_2.java Thu Sep 29 19:34:57 2011
@@ -1 +1 @@
-juddi.auth = org.apache.juddi.auth.JUDDIAuthentication
\ No newline at end of file
+juddi.authenticator = org.apache.juddi.auth.JUDDIAuthentication

Modified: juddi/trunk/docs/userguide/en-US/extras/Authentication_3.java
URL: http://svn.apache.org/viewvc/juddi/trunk/docs/userguide/en-US/extras/Authentication_3.java?rev=1177406&r1=1177405&r2=1177406&view=diff
==============================================================================
--- juddi/trunk/docs/userguide/en-US/extras/Authentication_3.java (original)
+++ juddi/trunk/docs/userguide/en-US/extras/Authentication_3.java Thu Sep 29 19:34:57 2011
@@ -1,2 +1,2 @@
-juddi.auth = org.apache.juddi.auth.XMLDocAuthentication
-juddi.usersfile = juddi-users.xml
\ No newline at end of file
+juddi.authenticator = org.apache.juddi.auth.XMLDocAuthentication
+juddi.usersfile = juddi-users.xml

Modified: juddi/trunk/docs/userguide/en-US/extras/Authentication_3.xmlt
URL: http://svn.apache.org/viewvc/juddi/trunk/docs/userguide/en-US/extras/Authentication_3.xmlt?rev=1177406&r1=1177405&r2=1177406&view=diff
==============================================================================
--- juddi/trunk/docs/userguide/en-US/extras/Authentication_3.xmlt (original)
+++ juddi/trunk/docs/userguide/en-US/extras/Authentication_3.xmlt Thu Sep 29 19:34:57 2011
@@ -1,2 +1,2 @@
-juddi.auth=org.apache.juddi.auth.JBossAuthenticator
-juddi.securityDomain=java:/jaas/other
\ No newline at end of file
+juddi.authenticator=org.apache.juddi.auth.JBossAuthenticator
+juddi.securityDomain=java:/jaas/other

Modified: juddi/trunk/docs/userguide/en-US/extras/Authentication_4.java
URL: http://svn.apache.org/viewvc/juddi/trunk/docs/userguide/en-US/extras/Authentication_4.java?rev=1177406&r1=1177405&r2=1177406&view=diff
==============================================================================
--- juddi/trunk/docs/userguide/en-US/extras/Authentication_4.java (original)
+++ juddi/trunk/docs/userguide/en-US/extras/Authentication_4.java Thu Sep 29 19:34:57 2011
@@ -1,3 +1,3 @@
-juddi.auth = org.apache.juddi.auth.CryptedXMLDocAuthentication
+juddi.authenticator = org.apache.juddi.auth.CryptedXMLDocAuthentication
 juddi.usersfile = juddi-users-encrypted.xml
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
\ No newline at end of file
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor

Modified: juddi/trunk/docs/userguide/en-US/extras/Authentication_5.xmlt
URL: http://svn.apache.org/viewvc/juddi/trunk/docs/userguide/en-US/extras/Authentication_5.xmlt?rev=1177406&r1=1177405&r2=1177406&view=diff
==============================================================================
--- juddi/trunk/docs/userguide/en-US/extras/Authentication_5.xmlt (original)
+++ juddi/trunk/docs/userguide/en-US/extras/Authentication_5.xmlt Thu Sep 29 19:34:57 2011
@@ -1,2 +1,2 @@
-juddi.auth=org.apache.juddi.auth.LdapSimpleAuthenticator
-juddi.auth.url=ldap://localhost:389
+juddi.authenticator=org.apache.juddi.auth.LdapSimpleAuthenticator
+juddi.authenticator.url=ldap://localhost:389

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/v3/auth/LdapSimpleAuthenticator.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/v3/auth/LdapSimpleAuthenticator.java?rev=1177406&r1=1177405&r2=1177406&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/v3/auth/LdapSimpleAuthenticator.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/v3/auth/LdapSimpleAuthenticator.java Thu Sep 29 19:34:57 2011
@@ -27,6 +27,7 @@ import javax.persistence.EntityTransacti
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import org.apache.juddi.config.AppConfig;
 import org.apache.juddi.config.PersistenceManager;
 import org.apache.juddi.config.Property;
@@ -37,6 +38,8 @@ import org.apache.juddi.v3.error.ErrorMe
 import org.apache.juddi.v3.error.FatalErrorException;
 import org.apache.juddi.v3.error.UnknownUserException;
 
+import org.apache.commons.configuration.ConfigurationException;
+
 /**
  * This is a implementation of jUDDI's Authenticator interface, that uses the
  * LDAP.
@@ -63,8 +66,7 @@ import org.apache.juddi.v3.error.Unknown
  * @author <a href="mailto:gunnlaugursig@gmail.com">Gunnlaugur Sigurðsson</a>
  */
 public class LdapSimpleAuthenticator implements Authenticator {
-
-	private Log log = LogFactory.getLog(this.getClass());
+    private Log logger = LogFactory.getLog(this.getClass());
 
     private LdapContext ctx = null;
     private Hashtable<String, String> env = null;
@@ -77,7 +79,7 @@ public class LdapSimpleAuthenticator imp
     	try {
     		authURL = AppConfig.getConfiguration().getString(Property.JUDDI_AUTHENTICATOR_URL, DEFAULT_URL);
     	} catch (ConfigurationException ce) {
-    		log.error("Configuration exception occurred retrieving: " + Property.JUDDI_AUTHENTICATOR_URL);
+    		logger.error("Configuration exception occurred retrieving: " + Property.JUDDI_AUTHENTICATOR_URL);
     	}
     	init(authURL);
     }
@@ -97,7 +99,7 @@ public class LdapSimpleAuthenticator imp
         try {
             ctx = new InitialLdapContext(env, null);
         } catch (NamingException e) {
-            log.error("Naming exception " + e);
+            logger.error("Naming exception " + e);
             throw e;
         }
     }
@@ -117,17 +119,17 @@ public class LdapSimpleAuthenticator imp
             env.put(Context.SECURITY_PRINCIPAL, authorizedName);
         	env.put(Context.SECURITY_CREDENTIALS, cred);
             ctx = new InitialLdapContext(env, null);
-            
-            log.info(authorizedName + " is authenticated");
+            isLdapUser = true;
+            logger.info(authorizedName + " is authenticated");
            
         } catch (NamingException e) {
-            log.error(authorizedName + " is not authenticated");
+            logger.error(authorizedName + " is not authenticated");
             throw new UnknownUserException(new ErrorMessage("errors.auth.NoPublisher", authorizedName));
         } finally {
             try {
                 ctx.close();
             } catch (NamingException e) {
-                log.error("Context close failure " + e);
+                logger.error("Context close failure " + e);
             }
         }
 
@@ -138,7 +140,7 @@ public class LdapSimpleAuthenticator imp
                 tx.begin();
                 Publisher publisher = em.find(Publisher.class, authorizedName);
                 if (publisher == null) {
-                    log.warn("Publisher was not found, adding the publisher in on the fly.");
+                    logger.warn("Publisher was not found, adding the publisher in on the fly.");
                     publisher = new Publisher();
                     publisher.setAuthorizedName(authorizedName);
                     publisher.setIsAdmin("false");
@@ -179,4 +181,4 @@ public class LdapSimpleAuthenticator imp
             em.close();
         }
     }
-}
\ No newline at end of file
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org