Class SamAccountNameRfc2247Mapper
- java.lang.Object
- 
- net.sf.michaelo.tomcat.realm.mapper.SamAccountNameMapper
- 
- net.sf.michaelo.tomcat.realm.mapper.SamAccountNameRfc2247Mapper
 
 
- 
- All Implemented Interfaces:
- UsernameSearchMapper
 
 public class SamAccountNameRfc2247Mapper extends SamAccountNameMapper A mapper for the AD attributesAMAccountNameand the realm. This mapper splits the GSS name in the primary and realm component. The instance component is completely ignored. The primary component is assigned to thesAMAccountNameand the realm is transformed to a search base according to RFC 2247. Moreover, this implementation mimicsDsCrackNameswithformatOfferedset toDS_USER_PRINCIPAL_NAMEandformatDesiredset toDS_FQDN_1779_NAME. Verified against Samba's implementation ofDsCrackNames.Note: This mapper requires to operate from the RootDSEof a domain controller or better yet, a GC. No root DN normalization (stripping DC components) happens here (yet).
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class net.sf.michaelo.tomcat.realm.mapper.SamAccountNameMapperSamAccountNameMapper.SamAccountNameMappedValues
 - 
Nested classes/interfaces inherited from interface net.sf.michaelo.tomcat.realm.mapper.UsernameSearchMapperUsernameSearchMapper.MappedValues
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected static OidKRB5_NT_PRINCIPAL
 - 
Constructor SummaryConstructors Constructor Description SamAccountNameRfc2247Mapper()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Oid[]getSupportedStringNameTypes()Returns an array of name type OIDs which a mapper is able to map into AD search space.UsernameSearchMapper.MappedValuesmap(DirContext context, GSSName gssName)Maps a GSS name to AD search space parameters.booleansupportsGssName(GSSName gssName)Determines whether a mapper is able to map a given GSS name into AD search space.
 
- 
- 
- 
Field Detail- 
KRB5_NT_PRINCIPALprotected static final Oid KRB5_NT_PRINCIPAL 
 
- 
 - 
Method Detail- 
getSupportedStringNameTypespublic Oid[] getSupportedStringNameTypes() Description copied from interface:UsernameSearchMapperReturns an array of name type OIDs which a mapper is able to map into AD search space.- Returns:
- supported string name type OIDs
 
 - 
supportsGssNamepublic boolean supportsGssName(GSSName gssName) Description copied from interface:UsernameSearchMapperDetermines whether a mapper is able to map a given GSS name into AD search space.- Parameters:
- gssName- the gssName to test
- Returns:
-  if this mapper is able to map a name, falseotherwise
 
 - 
mappublic UsernameSearchMapper.MappedValues map(DirContext context, GSSName gssName) throws NamingException Description copied from interface:UsernameSearchMapperMaps a GSS name to AD search space parameters. A mapper implementation must assure that the user can be found in the givencontextwhen an approriate GSS name is presented. The implementor must be aware that the returned search base might need to be relativized to the root DN of the context.- Parameters:
- context- the search context
- gssName- the GSS name to be mapped
- Returns:
- mapped values for user retrieval
- Throws:
- NamingException- if a context-related error has occured
 
 
- 
 
-