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, String name)
           
 
Method Summary
 AccountMapper clone(Configuration configuration)
          Create a clone of itself
 boolean equals(Object obj)
           
 String getAccountField()
           
 String getDnField()
           
 String getJndiLdapUrl()
           
 String getPeopleObject()
           
 String getType()
           
static String getTypeStatic()
           
 String mapUser(GridUser user, boolean createIfDoesNotExist)
          Maps a grid identity to a local account name.
 void setAccountField(String accountField)
           
 void setDnField(String dnField)
           
 void setJndiLdapUrl(String jndiLdapUrl)
           
 void setPeopleObject(String peopleObject)
           
 String toString(String bgColor)
          Get string representation of this object for displaying in the diagnostic summary web page
 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, mapUser, setConfiguration, setDescription, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapAccountMapper

public LdapAccountMapper()

LdapAccountMapper

public LdapAccountMapper(Configuration configuration)

LdapAccountMapper

public LdapAccountMapper(Configuration configuration,
                         String name)
Method Detail

getTypeStatic

public static 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:

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getAccountField

public String getAccountField()

getDnField

public String getDnField()

getJndiLdapUrl

public String getJndiLdapUrl()

getPeopleObject

public String getPeopleObject()

getType

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

mapUser

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

Specified by:
mapUser in class AccountMapper
Returns:
a user account (i.e. 'atlas').

setAccountField

public void setAccountField(String accountField)

setDnField

public void setDnField(String dnField)

setJndiLdapUrl

public void setJndiLdapUrl(String jndiLdapUrl)

setPeopleObject

public void setPeopleObject(String peopleObject)

toString

public String toString(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 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-2009. All Rights Reserved.