arlut.csd.ganymede
Interface pass_field

All Superinterfaces:
db_field, java.rmi.Remote
All Known Implementing Classes:
PasswordDBField

public interface pass_field
extends db_field


Method Summary
 boolean allowed(char c)
          Convenience method to identify if a particular character is acceptable in this field.
 java.lang.String allowedChars()
          Returns a string containing the list of acceptable characters.
 boolean crypted()
          Returns true if the password stored in this field is hash-crypted.
 java.lang.String disallowedChars()
          Returns a string containing the list of forbidden characters for this field.
 boolean matchPlainText(java.lang.String text)
          This method is used for authenticating a provided plaintext password against the stored contents of this password field.
 int maxSize()
           
 int minSize()
           
 arlut.csd.ganymede.ReturnVal setAllHashes(java.lang.String crypt, java.lang.String md5crypt, java.lang.String apacheMd5crypt, java.lang.String LANMAN, java.lang.String NTUnicodeMD4, boolean local, boolean noWizards)
          This method is used to force all known hashes into this password field.
 arlut.csd.ganymede.ReturnVal setApacheMD5CryptedPass(java.lang.String text)
          This method is used to set a pre-crypted Apache-style MD5Crypt password for this field.
 arlut.csd.ganymede.ReturnVal setCryptPass(java.lang.String text)
          This method is used to set a pre-crypted password for this field.
 arlut.csd.ganymede.ReturnVal setMD5CryptedPass(java.lang.String text)
          This method is used to set a pre-crypted FreeBSD-style MD5Crypt password for this field.
 arlut.csd.ganymede.ReturnVal setPlainTextPass(java.lang.String text)
          This method is used to set the password for this field, crypting it in various ways if this password field is stored crypted.
 arlut.csd.ganymede.ReturnVal setWinCryptedPass(java.lang.String LANMAN, java.lang.String NTUnicodeMD4)
          This method is used to set pre-crypted Windows-style password hashes for this field.
 
Methods inherited from interface arlut.csd.ganymede.db_field
addElement, addElements, containsElement, deleteAllElements, deleteElement, deleteElement, deleteElements, getComment, getElement, getEncodingString, getFieldInfo, getFieldTemplate, getID, getName, getType, getTypeDesc, getValue, getValues, getValueString, isBuiltIn, isDefined, isEditable, isEditInPlace, isVector, isVisible, setElement, setValue, size
 

Method Detail

maxSize

public int maxSize()
            throws java.rmi.RemoteException
java.rmi.RemoteException

minSize

public int minSize()
            throws java.rmi.RemoteException
java.rmi.RemoteException

allowedChars

public java.lang.String allowedChars()
                              throws java.rmi.RemoteException
Returns a string containing the list of acceptable characters. If the string is null, it should be interpreted as meaning all characters not listed in disallowedChars() are allowable by default.

java.rmi.RemoteException

disallowedChars

public java.lang.String disallowedChars()
                                 throws java.rmi.RemoteException
Returns a string containing the list of forbidden characters for this field. If the string is null, it should be interpreted as meaning that no characters are specifically disallowed.

java.rmi.RemoteException

allowed

public boolean allowed(char c)
                throws java.rmi.RemoteException
Convenience method to identify if a particular character is acceptable in this field.

java.rmi.RemoteException

crypted

public boolean crypted()
                throws java.rmi.RemoteException
Returns true if the password stored in this field is hash-crypted.

java.rmi.RemoteException

matchPlainText

public boolean matchPlainText(java.lang.String text)
                       throws java.rmi.RemoteException

This method is used for authenticating a provided plaintext password against the stored contents of this password field. The password field may have stored the password in plaintext, or in any of a variety of cryptographic hash formats. matchPlainText() will perform whatever operation on the provided plaintext as is required to determine whether or not it matches with the stored password data.

Returns:
true if the given plaintext matches the stored password
java.rmi.RemoteException

setPlainTextPass

public arlut.csd.ganymede.ReturnVal setPlainTextPass(java.lang.String text)
                                              throws java.rmi.RemoteException

This method is used to set the password for this field, crypting it in various ways if this password field is stored crypted.

java.rmi.RemoteException

setCryptPass

public arlut.csd.ganymede.ReturnVal setCryptPass(java.lang.String text)
                                          throws java.rmi.RemoteException

This method is used to set a pre-crypted password for this field. This method will return false if this password field is not stored crypted.

java.rmi.RemoteException

setMD5CryptedPass

public arlut.csd.ganymede.ReturnVal setMD5CryptedPass(java.lang.String text)
                                               throws java.rmi.RemoteException

This method is used to set a pre-crypted FreeBSD-style MD5Crypt password for this field. This method will return false if this password field is not stored crypted.

java.rmi.RemoteException

setApacheMD5CryptedPass

public arlut.csd.ganymede.ReturnVal setApacheMD5CryptedPass(java.lang.String text)
                                                     throws java.rmi.RemoteException

This method is used to set a pre-crypted Apache-style MD5Crypt password for this field. This method will return false if this password field is not stored crypted.

java.rmi.RemoteException

setWinCryptedPass

public arlut.csd.ganymede.ReturnVal setWinCryptedPass(java.lang.String LANMAN,
                                                      java.lang.String NTUnicodeMD4)
                                               throws java.rmi.RemoteException

This method is used to set pre-crypted Windows-style password hashes for this field. These strings are formatted as used in Samba's encrypted password files. This method will return an error code if this password field is not configured to accept Windows-hashed password strings.

java.rmi.RemoteException

setAllHashes

public arlut.csd.ganymede.ReturnVal setAllHashes(java.lang.String crypt,
                                                 java.lang.String md5crypt,
                                                 java.lang.String apacheMd5crypt,
                                                 java.lang.String LANMAN,
                                                 java.lang.String NTUnicodeMD4,
                                                 boolean local,
                                                 boolean noWizards)
                                          throws java.rmi.RemoteException

This method is used to force all known hashes into this password field. Ganymede does no verifications to insure that all of these hashes really match the same password, so caveat emptor. If any of these hashes are null or empty string, those hashes will be cleared.

Calling this method will clear the password's stored plaintext, if any.

If this password field is not configured to support any of the various hash formats in the Ganymede schema, an error will be returned.

java.rmi.RemoteException