gov.bnl.gums.account
Class LdapAccountMapper

java.lang.Object
  extended by gov.bnl.gums.account.AccountMapper
      extended by gov.bnl.gums.account.LdapAccountMapper

public class LdapAccountMapper
extends AccountMapper

Maps a user to a local account based on the CN of the certificate and the gecos field in the NIS/YP database. The mapping can't be perfect, but contains a series of heuristics that solve up to 90% of the cases, depending on how the NIS database itself is kept.

It's suggested not to use this policy by itself, but to have it part of a CompositeAccountMapper in which a ManualAccountMapper comes first. This allows to override those user mapping that are not satisfying.

Author:
Jay Packard

Constructor Summary
LdapAccountMapper()
           
LdapAccountMapper(Configuration configuration)
           
LdapAccountMapper(Configuration configuration, java.lang.String name)
           
 
Method Summary
 AccountMapper clone(Configuration configuration)
          Create a clone of itself
 java.lang.String getAccountField()
           
 java.lang.String getDnField()
           
 java.lang.String getJndiLdapUrl()
           
 java.lang.String getType()
           
static java.lang.String getTypeStatic()
           
 java.lang.String mapUser(java.lang.String userDN, boolean createIfDoesNotExist)
          Maps a grid identity to a local account name.
 void setAccountField(java.lang.String accountField)
           
 void setDnField(java.lang.String dnField)
           
 void setJndiLdapUrl(java.lang.String jndiLdapUrl)
           
 java.lang.String toString(java.lang.String bgColor)
          Get string representation of this object for displaying in the diagnostic summary web page
 java.lang.String toXML()
          Get XML representation of this object for writing to gums.config
 
Methods inherited from class gov.bnl.gums.account.AccountMapper
getConfiguration, getDescription, getName, setConfiguration, setDescription, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapAccountMapper

public LdapAccountMapper()

LdapAccountMapper

public LdapAccountMapper(Configuration configuration)

LdapAccountMapper

public LdapAccountMapper(Configuration configuration,
                         java.lang.String name)
Method Detail

getTypeStatic

public static java.lang.String getTypeStatic()

clone

public AccountMapper clone(Configuration configuration)
Description copied from class: AccountMapper
Create a clone of itself

Specified by:
clone in class AccountMapper
Returns:

getAccountField

public java.lang.String getAccountField()

getDnField

public java.lang.String getDnField()

getJndiLdapUrl

public java.lang.String getJndiLdapUrl()

getType

public java.lang.String getType()
Overrides:
getType in class AccountMapper
Returns:
string representation of type of account mapper

mapUser

public java.lang.String mapUser(java.lang.String userDN,
                                boolean createIfDoesNotExist)
Description copied from class: AccountMapper
Maps a grid identity to a local account name.

Specified by:
mapUser in class AccountMapper
Parameters:
userDN - the certificate DN (i.e. '/DC=org/DC=doegrids/OU=People/CN=John Smith').
Returns:
a user account (i.e. 'atlas').

setAccountField

public void setAccountField(java.lang.String accountField)

setDnField

public void setDnField(java.lang.String dnField)

setJndiLdapUrl

public void setJndiLdapUrl(java.lang.String jndiLdapUrl)

toString

public java.lang.String toString(java.lang.String bgColor)
Description copied from class: AccountMapper
Get string representation of this object for displaying in the diagnostic summary web page

Specified by:
toString in class AccountMapper
Parameters:
bgColor - back ground color
Returns:

toXML

public java.lang.String toXML()
Description copied from class: AccountMapper
Get XML representation of this object for writing to gums.config

Specified by:
toXML in class AccountMapper
Returns:
xml as string


Copyright © 2004-2008. All Rights Reserved.