summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/lookup/LDAPProperties.java
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-06-05 15:02:07 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-06-05 15:02:07 +0200
commitd4fa3bd9dd48f4d5e26850a23f5ba48a9c10ad64 (patch)
tree5ad7bfbce8ba9df9aad53ef33a8b908ca0680fc4 /src/main/java/com/c2kernel/lookup/LDAPProperties.java
parent8bb86312d4f07dcb343ca2d212f4020906dbdb52 (diff)
LDAP refactored behind interfaces. All functions of LDAP now hidden
behind interfaces: Authenticator, Lookup and NextKeyManager (LDAP property storage was already a ClusterStorage). Gateway holds additional objects, and Fixes #26 #191. Refs #27 (needs additional work for read perms and auth tokens)
Diffstat (limited to 'src/main/java/com/c2kernel/lookup/LDAPProperties.java')
-rw-r--r--src/main/java/com/c2kernel/lookup/LDAPProperties.java54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/main/java/com/c2kernel/lookup/LDAPProperties.java b/src/main/java/com/c2kernel/lookup/LDAPProperties.java
deleted file mode 100644
index df0b85d..0000000
--- a/src/main/java/com/c2kernel/lookup/LDAPProperties.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Directory Lookup Service
-*/
-
-package com.c2kernel.lookup;
-
-import java.math.BigInteger;
-import java.security.SecureRandom;
-
-import com.c2kernel.process.Gateway;
-
-/**
- * @version $Revision: 1.16 $ $Date: 2005/10/12 12:51:54 $
- * @author $Author: abranson $
- */
-public class LDAPProperties
-{
- public String mGlobalPath = null; //o=cern.ch
- public String mRootPath = null; //cn=cristal2
- public String mLocalPath = null; //cn=lab27
- public Integer mPort = null;
- public String mHost = null;
- public String mUser = null;
- public String mPassword = null;
- public static String mGeneratedPassword = null;
- public String mDbPath = null;
-
- public LDAPProperties()
- {
- mGlobalPath = Gateway.getProperties().getProperty( "LDAP.GlobalPath" );
- mRootPath = Gateway.getProperties().getProperty( "LDAP.RootPath" );
- mLocalPath = Gateway.getProperties().getProperty( "LDAP.LocalPath" );
- mPort = Gateway.getProperties().getInt( "LDAP.port", 389 );
- mHost = Gateway.getProperties().getProperty( "LDAP.host" );
- mUser = Gateway.getProperties().getProperty( "LDAP.user" );
- mPassword = Gateway.getProperties().getProperty( "LDAP.password" );
-
- mRootPath += "," + mGlobalPath;
- mLocalPath += "," + mRootPath;
-
- }
-
-
- public void generateRootPassword() {
- if (mPassword == null) {
- if (mGeneratedPassword == null) {
- SecureRandom random = new SecureRandom();
- mGeneratedPassword = new BigInteger(130, random).toString(32);
- }
- mPassword = mGeneratedPassword;
- }
- }
-}
-