public class SamAccountNameRfc2247Mapper extends SamAccountNameMapper
sAMAccountName
and 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 the sAMAccountName
and the realm is transformed to a
search base according to RFC 2247. Moreover,
this implementation mimics
DsCrackNames
with formatOffered
set to DS_USER_PRINCIPAL_NAME
and
formatDesired
set to DS_FQDN_1779_NAME
. Verified against
Samba's implementation of DsCrackNames
.
Note: This mapper requires to operate from the RootDSE
of a domain
controller or better yet, a GC. No root DN normalization (stripping DC components) happens here
(yet).
SamAccountNameMapper.SamAccountNameMappedValues
UsernameSearchMapper.MappedValues
Constructor and Description |
---|
SamAccountNameRfc2247Mapper() |
Modifier and Type | Method and Description |
---|---|
UsernameSearchMapper.MappedValues |
map(DirContext context,
GSSName gssName)
Maps a GSS name to AD search parameters.
|
public UsernameSearchMapper.MappedValues map(DirContext context, GSSName gssName) throws NamingException
UsernameSearchMapper
context
when 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.context
- the search contextgssName
- the GSS name to be mappedNamingException
- if a context-related error has occuredCopyright © 2013–2020 Michael Osipov. All rights reserved.