public class SMProxyDirectory extends JNDIDirectory
JNDIDirectoryLDAP_VERSION_2, LDAP_VERSION_3| Constructor and Description |
|---|
SMProxyDirectory(IniFile entrustIniFile)
Construct the SMProxyDirectory using an entrust.ini file.
|
SMProxyDirectory(java.lang.String smproxyHost,
int smproxyPort)
Setup the SMProxyDirectory.
|
SMProxyDirectory(java.net.URL url)
Construct the SMProxyDirectory using a URL value.
|
| Modifier and Type | Method and Description |
|---|---|
SMProxyConfig |
getSMProxyConfig()
Returns the Security Manager Proxy configuration.
|
boolean |
isAvailable()
Determines whether the Directory is available.
|
void |
setClientCredentials(User user)
Sets the client credentials using the provided
User object. |
void |
setClientCredentials(java.security.cert.X509Certificate[] chain,
java.security.PrivateKey signingKey)
Set client credentials for authenticating to a server.
|
void |
setClientCredentials(java.security.cert.X509Certificate verificationCertificate,
java.security.cert.X509Certificate caCertificate,
java.security.PrivateKey signingKey)
Not available.
|
void |
setLDAPSConfig(LDAPSConfig config)
Set the LDAPS Configuration parameters.
|
void |
setSMProxyConfig(SMProxyConfig config)
Sets the configuration for SSL connections
|
attachReferredDirectory, close, connect, getAttr, getConnectionTimeout, getCRLs, getInstance, getInstance, getInstance, getLDAPSConfig, getLdapVersion, getSearchTimeout, getSoConnectionTimeout, getURL, resetAuthentication, Search, Search, setAuthentication, setConnectionTimeout, setLdapVersion, setMaxConcurrentSearches, setSearchTimeout, setSoConnectionTimeoutpublic SMProxyDirectory(java.lang.String smproxyHost,
int smproxyPort)
throws SMProxyException
smproxyHost - the Hostname or IP of the SMProxy ServersmproxyPort - the Port to use for the SMProxy Server (usually port 80 for http)SMProxyException - if the configuration is invalidpublic SMProxyDirectory(IniFile entrustIniFile) throws SMProxyException, java.net.MalformedURLException
This constructor takes an IniFile that contains the proxy URL addresses
with a protocol value of either http or https.
i.e http://www.proxy.entrust.com or https://www.proxy.entrust.com
If the Security Manager Proxy was not configured to use default ports, the port values must be specified in the URL. ie. http://www.proxy.entrust.com:8080 or https://www.proxy.entrust.com:4443
The Entrust Settings section of the INI file must contain one of the following settings:
entrustIniFile - the IniFile object that contains the proxy settingsSMProxyException - if the configuration is invalidjava.net.MalformedURLException - if any of the SMProxy URL's are invalidSMProxyManagerTransport.SMProxyManagerTransport( IniFile entrustIniFile ),
RoamingConfiguration.RoamingConfiguration(IniFile iniFile, boolean smProxyEnabled )public SMProxyDirectory(java.net.URL url)
throws SMProxyException
url - URL that specifies the Proxy ServerSMProxyException - if the configuration is invalidpublic void setSMProxyConfig(SMProxyConfig config) throws SMProxyException
config - the configuration to setSMProxyException - if the configuration is invalidpublic void setLDAPSConfig(LDAPSConfig config)
JNDIDirectoryLDAPSTrustManager for the default EntrustSSLSocketFactory.
If a custom SSLSocketFactory has been specified, these certificates
will not be used.JNDIDirectory object then the trusted certificates
required for LDAPS to succeeded will already be configured. However, if
AllowLDAPSReferral is set to false, LDAPS will not be attempted for any referrals.
Note 2: Because JNDI creates an instance of an SSLSocketFactory
using the static getDefault() method, all trusted certificates
must be available from a static location. The certificates stored in the
LDAPSConfig are stored in a static memory cache (as well as locally).
This means every certificate added through the LDAPSConfig object will be
trusted for every subsequent LDAPS connection made with a JNDIDirectory instance.
setLDAPSConfig in class JNDIDirectoryconfig - The LDAPSConfig object which contains the SSL Configuration parameterspublic SMProxyConfig getSMProxyConfig()
public void setClientCredentials(java.security.cert.X509Certificate verificationCertificate,
java.security.cert.X509Certificate caCertificate,
java.security.PrivateKey signingKey)
JNDIDirectorysetClientCredentials in interface LdapDirectorysetClientCredentials in class JNDIDirectoryverificationCertificate - a verification certificatecaCertificate - the CA certificate that issued verificationCertificatesigningKey - the private signing key that signs messages verified by verificationCertificatepublic void setClientCredentials(java.security.cert.X509Certificate[] chain,
java.security.PrivateKey signingKey)
JNDIDirectorysetClientCredentials in class JNDIDirectorypublic boolean isAvailable()
JNDIDirectory
NOTE: This method does not determine the current directory connection status
but rather reports if the javax.naming.directory.DirContext object exists.
If the DirContext object does not exist, a new one will be created using
JNDIDirectory.connect().
isAvailable in interface LdapDirectoryisAvailable in class JNDIDirectorytrue if the directory is available,
false otherwise.public void setClientCredentials(User user) throws UserNotLoggedInException
User object.
NOTE: if client authentication is required, use setSMProxyConfig
instead.
user - the User objectUserNotLoggedInException - if the user is not logged in