You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by er...@apache.org on 2007/05/07 02:26:58 UTC
svn commit: r535691 - in
/directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store:
./ operations/
Author: erodriguez
Date: Sun May 6 17:26:57 2007
New Revision: 535691
URL: http://svn.apache.org/viewvc?view=rev&rev=535691
Log:
Minor warning clean-up in kerberos-shared, some javadocs.
Modified:
directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/JndiPrincipalStoreImpl.java
directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/KerberosCatalog.java
directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStore.java
directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStoreEntry.java
directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java
directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java
Modified: directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/JndiPrincipalStoreImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/JndiPrincipalStoreImpl.java?view=diff&rev=535691&r1=535690&r2=535691
==============================================================================
--- directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/JndiPrincipalStoreImpl.java (original)
+++ directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/JndiPrincipalStoreImpl.java Sun May 6 17:26:57 2007
@@ -21,7 +21,6 @@
import javax.naming.spi.InitialContextFactory;
-import javax.security.auth.kerberos.KerberosKey;
import javax.security.auth.kerberos.KerberosPrincipal;
import org.apache.directory.server.protocol.shared.ServiceConfiguration;
@@ -47,7 +46,13 @@
private PrincipalStore store;
- public JndiPrincipalStoreImpl(ServiceConfiguration config, InitialContextFactory factory)
+ /**
+ * Creates a new instance of JndiPrincipalStoreImpl.
+ *
+ * @param config
+ * @param factory
+ */
+ public JndiPrincipalStoreImpl( ServiceConfiguration config, InitialContextFactory factory )
{
this.config = config;
this.factory = factory;
Modified: directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/KerberosCatalog.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/KerberosCatalog.java?view=diff&rev=535691&r1=535690&r2=535691
==============================================================================
--- directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/KerberosCatalog.java (original)
+++ directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/KerberosCatalog.java Sun May 6 17:26:57 2007
@@ -37,7 +37,12 @@
private Map map;
- public KerberosCatalog(Map map)
+ /**
+ * Creates a new instance of KerberosCatalog.
+ *
+ * @param map
+ */
+ public KerberosCatalog( Map map )
{
this.map = map;
}
Modified: directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java?view=diff&rev=535691&r1=535690&r2=535691
==============================================================================
--- directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java (original)
+++ directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java Sun May 6 17:26:57 2007
@@ -28,7 +28,6 @@
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
import javax.naming.spi.InitialContextFactory;
-import javax.security.auth.kerberos.KerberosKey;
import javax.security.auth.kerberos.KerberosPrincipal;
import org.apache.directory.server.core.configuration.ConfigurationException;
@@ -54,16 +53,16 @@
class MultiBaseSearch implements PrincipalStore
{
private InitialContextFactory factory;
- private Hashtable env;
+ private Hashtable<String, Object> env;
private Catalog catalog;
- MultiBaseSearch(ServiceConfiguration config, InitialContextFactory factory)
+ MultiBaseSearch( ServiceConfiguration config, InitialContextFactory factory )
{
this.factory = factory;
- env = new Hashtable( config.toJndiEnvironment() );
+ env = new Hashtable<String, Object>( config.toJndiEnvironment() );
env.put( Context.INITIAL_CONTEXT_FACTORY, config.getInitialContextFactory() );
env.put( Context.PROVIDER_URL, config.getCatalogBaseDn() );
Modified: directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStore.java?view=diff&rev=535691&r1=535690&r2=535691
==============================================================================
--- directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStore.java (original)
+++ directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStore.java Sun May 6 17:26:57 2007
@@ -31,17 +31,53 @@
*/
public interface PrincipalStore
{
+ /**
+ * Add a principal.
+ *
+ * @param entry
+ * @return The name of the principal being added.
+ * @throws Exception
+ */
public String addPrincipal( PrincipalStoreEntry entry ) throws Exception;
+ /**
+ * Change a principal's password.
+ *
+ * @param principal
+ * @param newPassword
+ * @return The name of the principal whose password is being changed.
+ * @throws Exception
+ */
public String changePassword( KerberosPrincipal principal, String newPassword ) throws Exception;
+ /**
+ * Delete a principal.
+ *
+ * @param principal
+ * @return The name of the principal being deleted.
+ * @throws Exception
+ */
public String deletePrincipal( KerberosPrincipal principal ) throws Exception;
+ /**
+ * Get all principals for a given realm.
+ *
+ * @param realm
+ * @return An array of {@link PrincipalStoreEntry}'s.
+ * @throws Exception
+ */
public PrincipalStoreEntry[] getAllPrincipals( String realm ) throws Exception;
+ /**
+ * Get a {@link PrincipalStoreEntry} given a Kerberos principal.
+ *
+ * @param principal
+ * @return The {@link PrincipalStoreEntry} for the given Kerberos principal.
+ * @throws Exception
+ */
public PrincipalStoreEntry getPrincipal( KerberosPrincipal principal ) throws Exception;
}
Modified: directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStoreEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStoreEntry.java?view=diff&rev=535691&r1=535690&r2=535691
==============================================================================
--- directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStoreEntry.java (original)
+++ directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStoreEntry.java Sun May 6 17:26:57 2007
@@ -83,90 +83,165 @@
}
+ /**
+ * Returns whether this account is disabled.
+ *
+ * @return Whether this account is disabled.
+ */
public boolean isDisabled()
{
return disabled;
}
+ /**
+ * Returns whether this account is locked-out.
+ *
+ * @return Whether this account is locked-out.
+ */
public boolean isLockedOut()
{
return lockedOut;
}
+ /**
+ * Returns the expiration time.
+ *
+ * @return The expiration time.
+ */
public KerberosTime getExpiration()
{
return expiration;
}
+ /**
+ * Returns the common name.
+ *
+ * @return The common name.
+ */
public String getCommonName()
{
return commonName;
}
+ /**
+ * Returns the user ID.
+ *
+ * @return The user ID.
+ */
public String getUserId()
{
return userId;
}
+ /**
+ * Returns the key map.
+ *
+ * @return The key map.
+ */
public Map<EncryptionType, EncryptionKey> getKeyMap()
{
return keyMap;
}
+ /**
+ * Returns the KDC flags.
+ *
+ * @return The KDC flags.
+ */
public int getKDCFlags()
{
return kdcFlags;
}
+ /**
+ * Returns the max life.
+ *
+ * @return The max life.
+ */
public int getMaxLife()
{
return maxLife;
}
+ /**
+ * Returns the maximum renew time.
+ *
+ * @return The maximum renew time.
+ */
public int getMaxRenew()
{
return maxRenew;
}
+ /**
+ * Returns the expiration time for the password.
+ *
+ * @return The expiration time for the password.
+ */
public KerberosTime getPasswordEnd()
{
return passwordEnd;
}
+ /**
+ * Returns the principal.
+ *
+ * @return The principal.
+ */
public KerberosPrincipal getPrincipal()
{
return principal;
}
+ /**
+ * Returns the realm name.
+ *
+ * @return The realm name.
+ */
public String getRealmName()
{
return realmName;
}
+ /**
+ * Returns the end of validity.
+ *
+ * @return The end of validity.
+ */
public KerberosTime getValidEnd()
{
return validEnd;
}
+ /**
+ * Returns the start of validity.
+ *
+ * @return The start of validity.
+ */
public KerberosTime getValidStart()
{
return validStart;
}
+ /**
+ * Returns the single-use authentication (SAM) type.
+ *
+ * @return The single-use authentication (SAM) type.
+ */
public SamType getSamType()
{
return samType;
Modified: directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java?view=diff&rev=535691&r1=535690&r2=535691
==============================================================================
--- directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java (original)
+++ directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java Sun May 6 17:26:57 2007
@@ -27,7 +27,6 @@
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
import javax.naming.spi.InitialContextFactory;
-import javax.security.auth.kerberos.KerberosKey;
import javax.security.auth.kerberos.KerberosPrincipal;
import org.apache.directory.server.core.configuration.ConfigurationException;
@@ -52,9 +51,9 @@
private DirContext ctx;
- SingleBaseSearch(ServiceConfiguration config, InitialContextFactory factory)
+ SingleBaseSearch( ServiceConfiguration config, InitialContextFactory factory )
{
- Hashtable env = new Hashtable( config.toJndiEnvironment() );
+ Hashtable<String, Object> env = new Hashtable<String, Object>( config.toJndiEnvironment() );
env.put( Context.INITIAL_CONTEXT_FACTORY, config.getInitialContextFactory() );
env.put( Context.PROVIDER_URL, config.getEntryBaseDn() );
Modified: directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java?view=diff&rev=535691&r1=535690&r2=535691
==============================================================================
--- directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java (original)
+++ directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java Sun May 6 17:26:57 2007
@@ -64,7 +64,7 @@
{
SearchControls controls = new SearchControls();
- List answers = new ArrayList();
+ List<PrincipalStoreEntry> answers = new ArrayList<PrincipalStoreEntry>();
try
{