public class SharePointADAuthority extends BaseAuthorityConnector
Modifier and Type | Class and Description |
---|---|
protected static class |
SharePointADAuthority.AuthorizationResponseDescription
This is the cache object descriptor for cached access tokens from
this connector.
|
protected static class |
SharePointADAuthority.DCConnectionParameters
Class describing the connection parameters to a domain controller.
|
protected static class |
SharePointADAuthority.DCRule
Class describing a domain suffix and corresponding domain controller name rule.
|
protected static class |
SharePointADAuthority.DCSessionInfo
Class representing the session information for a specific domain controller
connection.
|
Modifier and Type | Field and Description |
---|---|
static String |
_rcsid |
protected static StringSet |
emptyStringSet |
RESPONSE_UNREACHABLE, RESPONSE_UNREACHABLE_ADDITIVE, RESPONSE_USERNOTFOUND, RESPONSE_USERNOTFOUND_ADDITIVE, RESPONSE_USERUNAUTHORIZED, RESPONSE_USERUNAUTHORIZED_ADDITIVE
currentContext, params
GLOBAL_DENY_TOKEN
Constructor and Description |
---|
SharePointADAuthority()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected static void |
addDomainController(Set<String> seenDomains,
ConfigParams parameters,
String suffix,
String domainControllerName,
String userName,
String password,
String authentication,
String userACLsUsername) |
protected static String |
authenticatedUserGroup() |
String |
check()
Check connection for sanity.
|
void |
clearThreadContext()
Clear thread context.
|
void |
connect(ConfigParams configParams)
Connect.
|
protected LdapContext |
createDCSession(String domainController)
Create or lookup a session for a domain controller.
|
protected static Map<String,String> |
createDomainControllerMap(IPasswordMapperActivity mapper,
String suffix,
String domainControllerName,
String userName,
String password,
String authentication,
String userACLsUsername) |
protected static String |
deobfuscate(String input) |
void |
disconnect()
Close the connection.
|
protected static String |
everyoneGroup() |
protected static void |
fillInCacheTab(Map<String,Object> velocityContext,
IPasswordMapperActivity mapper,
ConfigParams parameters) |
protected static void |
fillInDomainControllerTab(Map<String,Object> velocityContext,
IPasswordMapperActivity mapper,
ConfigParams parameters) |
protected List<String> |
getADTokens(String userPart,
String domainPart,
String userName)
Get the AD-derived access tokens for a user and domain
|
AuthorizationResponse |
getAuthorizationResponse(String userName)
Obtain the access tokens for a given user name.
|
protected AuthorizationResponse |
getAuthorizationResponseUncached(String userName)
Obtain the access tokens for a given user name, uncached.
|
AuthorizationResponse |
getDefaultAuthorizationResponse(String userName)
Obtain the default access tokens for a given user name.
|
protected String |
getDistinguishedName(LdapContext ctx,
String userName,
String searchBase,
String userACLsUsername)
Obtain the DistinguishedName for a given user logon name.
|
protected void |
getSessionParameters()
Get parameters needed for caching.
|
protected static String |
groupTokenFromSID(String SID) |
boolean |
isConnected()
This method is called to assess whether to count this connector instance should
actually be counted as being connected.
|
protected static String |
ldapEscape(String input)
LDAP escape a string.
|
void |
outputConfigurationBody(IThreadContext threadContext,
IHTTPOutput out,
Locale locale,
ConfigParams parameters,
String tabName)
Output the configuration body section.
|
void |
outputConfigurationHeader(IThreadContext threadContext,
IHTTPOutput out,
Locale locale,
ConfigParams parameters,
List<String> tabsArray)
Output the configuration header section.
|
void |
poll()
Poll.
|
String |
processConfigurationPost(IThreadContext threadContext,
IPostParameters variableContext,
Locale locale,
ConfigParams parameters)
Process a configuration post.
|
void |
setThreadContext(IThreadContext tc)
Set thread context.
|
protected static String |
sid2String(byte[] SID)
Convert a binary SID to a string
|
protected static String |
userTokenFromLoginName(String loginName) |
protected static String |
userTokenFromSID(String SID) |
void |
viewConfiguration(IThreadContext threadContext,
IHTTPOutput out,
Locale locale,
ConfigParams parameters)
View configuration.
|
getAccessTokens, getDefaultAccessTokens
deinstall, getConfiguration, install, outputConfigurationBody, outputConfigurationHeader, outputConfigurationHeader, pack, packFixedList, packList, packList, processConfigurationPost, unpack, unpackFixedList, unpackList, viewConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deinstall, getConfiguration, install
public static final String _rcsid
protected static StringSet emptyStringSet
public void setThreadContext(IThreadContext tc) throws ManifoldCFException
setThreadContext
in interface IConnector
setThreadContext
in class BaseConnector
ManifoldCFException
public void clearThreadContext()
clearThreadContext
in interface IConnector
clearThreadContext
in class BaseConnector
public void connect(ConfigParams configParams)
connect
in interface IConnector
connect
in class BaseConnector
configParams
- are the configuration parameters for this connection.public String check() throws ManifoldCFException
check
in interface IConnector
check
in class BaseConnector
ManifoldCFException
protected LdapContext createDCSession(String domainController) throws ManifoldCFException
ManifoldCFException
public void poll() throws ManifoldCFException
poll
in interface IConnector
poll
in class BaseConnector
ManifoldCFException
public boolean isConnected()
isConnected
in interface IConnector
isConnected
in class BaseConnector
public void disconnect() throws ManifoldCFException
disconnect
in interface IConnector
disconnect
in class BaseConnector
ManifoldCFException
public AuthorizationResponse getAuthorizationResponse(String userName) throws ManifoldCFException
getAuthorizationResponse
in interface IAuthorityConnector
getAuthorizationResponse
in class BaseAuthorityConnector
userName
- is the user name or identifier.ManifoldCFException
protected AuthorizationResponse getAuthorizationResponseUncached(String userName) throws ManifoldCFException
userName
- is the user name or identifier.ManifoldCFException
public AuthorizationResponse getDefaultAuthorizationResponse(String userName)
getDefaultAuthorizationResponse
in interface IAuthorityConnector
getDefaultAuthorizationResponse
in class BaseAuthorityConnector
userName
- is the user name or identifier.protected List<String> getADTokens(String userPart, String domainPart, String userName) throws NameNotFoundException, NamingException, ManifoldCFException
protected static String everyoneGroup()
protected static String authenticatedUserGroup()
public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out, Locale locale, ConfigParams parameters, List<String> tabsArray) throws ManifoldCFException, IOException
outputConfigurationHeader
in interface IConnector
outputConfigurationHeader
in class BaseConnector
threadContext
- is the local thread context.out
- is the output to which any HTML should be sent.parameters
- are the configuration parameters, as they currently exist, for this connection being configured.tabsArray
- is an array of tab names. Add to this array any tab names that are specific to the connector.ManifoldCFException
IOException
public void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out, Locale locale, ConfigParams parameters, String tabName) throws ManifoldCFException, IOException
outputConfigurationBody
in interface IConnector
outputConfigurationBody
in class BaseConnector
threadContext
- is the local thread context.out
- is the output to which any HTML should be sent.parameters
- are the configuration parameters, as they currently exist, for this connection being configured.tabName
- is the current tab name.ManifoldCFException
IOException
protected static void fillInDomainControllerTab(Map<String,Object> velocityContext, IPasswordMapperActivity mapper, ConfigParams parameters)
protected static Map<String,String> createDomainControllerMap(IPasswordMapperActivity mapper, String suffix, String domainControllerName, String userName, String password, String authentication, String userACLsUsername)
protected static void fillInCacheTab(Map<String,Object> velocityContext, IPasswordMapperActivity mapper, ConfigParams parameters)
public String processConfigurationPost(IThreadContext threadContext, IPostParameters variableContext, Locale locale, ConfigParams parameters) throws ManifoldCFException
processConfigurationPost
in interface IConnector
processConfigurationPost
in class BaseConnector
threadContext
- is the local thread context.variableContext
- is the set of variables available from the post, including binary file post information.parameters
- are the configuration parameters, as they currently exist, for this connection being configured.ManifoldCFException
protected static void addDomainController(Set<String> seenDomains, ConfigParams parameters, String suffix, String domainControllerName, String userName, String password, String authentication, String userACLsUsername) throws ManifoldCFException
ManifoldCFException
public void viewConfiguration(IThreadContext threadContext, IHTTPOutput out, Locale locale, ConfigParams parameters) throws ManifoldCFException, IOException
viewConfiguration
in interface IConnector
viewConfiguration
in class BaseConnector
threadContext
- is the local thread context.out
- is the output to which any HTML should be sent.parameters
- are the configuration parameters, as they currently exist, for this connection being configured.ManifoldCFException
IOException
protected void getSessionParameters() throws ManifoldCFException
ManifoldCFException
protected String getDistinguishedName(LdapContext ctx, String userName, String searchBase, String userACLsUsername) throws ManifoldCFException
ctx
- is the ldap context to use.userName
- (Domain Logon Name) is the user name or identifier.searchBase
- (Full Domain Name for the search ie: DC=qa-ad-76,DC=metacarta,DC=com)ManifoldCFException
protected static String sid2String(byte[] SID)