public final class User extends java.lang.Object implements KeyAndCertContainer
User is a high-level class representing a user of a Public Key
Infrastructure (PKI).
Once instantiated, a User object uniquely represents an end user
in a PKI and has access to the accessor methods of the class. As well as
allowing a User instance to log in and log out, the methods in
this class provide the following:
Users whose credentials are stored in an Entrust Profile Format (.epf file, PKCS#11 token, ...) have the concept of certificate streams. A certificate stream is a set of keys/certificates that can be used for a specific purpose. It contains the latest key/certificate as well as a history of all of old keys/certificates that have resulted from updating the certificate stream. A certificate in a certificate stream is superseded when it is no longer the latest certificate in that stream (the certificate stream has been updated).
Users that exist on an Entrust Security Manager 7.0 and later can have any number of certificate streams, each of which corresponds to a certificate definition and is configured according the certificate definition policy. Users that exist on an Entrust Security Manager pre-7.0 have only two certificate streams, one for signing/verification and one for encryption/decryption, which are configured according to the client policy settings. For all users that exist on Entrust Security Managers, key management of the user's keys and certificates is supported.
All other non-Entrust users must have at least one signing/verification or one encryption/decryption key/certificate to be supported. For these non-Entrust users, key management is not supported.
A user's signing key and verification certificate are considered to be the first key/certificate found in the user's profile that has not been superseded and meets one of the following requirements:
A user's decryption key and encryption certificate are considered to be the first key/certificate found in the user's profile that has not been superseded and meets one of the following requirements:
Each of the user's keys/certificates requires key-update when they have not been superseded and one of the following conditions is met:
The rollover period is always a portion of the private key lifetime. For verification certificates (ANY of 'digitalSignature' or 'nonRepudiation' bits set in the key usage extension or does not have a key usage extension), the private key lifetime is extracted from the privateKeyUsagePeriod extension when it is present, or set to 70% of the certificate lifetime when it is not present. For encryption certificates (ONLY 'dataEncipherment' or 'keyEncipherment' bits set in the key usage extension) the private key lifetime is extracted from the privateKeyUsagePeriod extension when it is present, or set to the certificate lifetime when it is not present.
For users on an Entrust Security Manager 7.0 or later, the rollover period starts once a percentage private key lifetime has passed. This percentage is specified in the 'Update cert at % of lifetime' certificate definition policy setting. For all other users, the rollover period starts at 100 days from the end of the private key lifetime or at 50% of the private key lifetime, whichever is less.
For a User object to be of use, it must be logged in to
using the login method. This method requires a
CredentialReader object,
which is used to read the credentials, and a password which is used to unlock
the credentials. The Toolkit includes the following credential readers:
CapiCredentialReaderCredentialCreatorCredentialRecovererCredentialCreatorOrRecovererFilenameProfileReaderPKCS12ReaderRoamingCredentialReaderSingleLoginReaderStreamProfileReaderInputStream.TokenCredentialCreatorTokenCredentialRecovererTokenCredentialCreatorOrRecovererTokenReaderUALCredentialReader
While a User is logged in, the credentials may require an update
if new keys or certificates are obtained, or the password is changed.
In order to write the credentials,
a CredentialWriter
must be set using the setCredentialWriter method.
This can be called before login() so that key management checks
can be performed as part of the login procedure. If no CredentialWriter
is set, the Toolkit will check for necessary key updates, but will not
perform them.
The Toolkit includes the following credential writers:
FilenameProfileWriterPKCS12WriterRoamingCredentialWriterStreamProfileWriterTokenWriterTokenInitializer
Not all CredentialReader and CredentialWriter
combinations are valid. The following table
shows the which credential readers and writers can be used together:
FilenameProfileWriter |
PKCS12Writer1 |
RoamingCredentialWriter |
StreamProfileWriter2 |
TokenWriter |
TokenInitializer |
|
CapiCredentialReader |
No | No | No | No | No | No |
CredentialCreator3 |
Yes | Yes | Yes | Yes | No | No |
CredentialRecoverer3 |
Yes | Yes | Yes | Yes | No | No |
CredentialCreatorOrRecoverer3 |
Yes | Yes | Yes | Yes | No | No |
FilenameProfileReader |
Yes | Yes | Yes | Yes | No | Yes |
PKCS12Reader1 |
Yes | Yes | No | Yes | No | Yes |
RoamingCredentialReader |
Yes | No | Yes | Yes | No | No |
SingleLoginReader4 |
No | No | No | No | No | No |
StreamProfileReader |
Yes | Yes | Yes | Yes | No | Yes |
TokenCredentialCreator3 |
No | No | No | No | Yes | No |
TokenCredentialRecoverer3 |
No | No | No | No | Yes | No |
TokenCredentialCreatorOrRecoverer3 |
No | No | No | No | Yes | No |
TokenReader |
No | No | No | No | Yes | No |
UALCredentialReader5 |
Yes5 | Yes5 | Yes5 | Yes5 | Yes5 | Yes5 |
1 Key management is not possible when using PKCS12 readers or writers as they do not provide information required for management operations.
2 A StreamProfileWriter can only write credentials once.
Credentials may be automatically written during each attempt to login or do key management. To
prevent write failures, a new instance of a StreamProfileWriter should be set
before each attempt to login or do key management.
3These credential readers require that a credential writer be
set, and that setConnections() has been called in order to use them.
4While it is not possible to set a credential writer with this reader, it is still possible to perform a password change.
5A UALCredentialReader wraps another credential reader,
and whether or not the combination is possible depends on the type of reader it wraps.
The procedure for logging in to a User object usually
looks something like the following pseudo-code :
User user = new User();
// Optionally create a connection to the Directory so that certificates can
// be validated
LdapDirectory directory = new JNDIDirectory(DIRECTORY_IP, DIRECTORY_PORT);
// Optionally create a connection to an Entrust PKI so that key
// management is possible.
ManagerTransport transport = new ManagerTransport(MANAGER_IP, MANAGER_PORT);
// Set the connections.
user.setConnections(directory, transport);
// Create a credential reader appropriate to the application.
CredentialReader credentialReader = ...
// Set a CredentialWriter so that key updates and can be performed and any
// changes to the credentials can be written.
CredentialWriter credentialWriter = ...
user.setCredentialWriter(credentialWriter);
// Actually log in to the User object.
SecureStringBuffer securePassword = new SecureStringBuffer(PASSWORD);
user.login(credentialReader, securePassword);
// Examine status codes set by the login procedure.
UserStatus status = user.getStatus();
if (status.isStatusPresent(UserStatus.PASSWORD_EXPIRED))
{
// password has expired, prompt for password change
}
...
UserStatus,
CredentialReader,
CredentialWriter| Modifier and Type | Field and Description |
|---|---|
static int |
WARNING_DIRECTORY_IS_OLD
Indicates that the directory is old; publication of a user certificate
is pending (has not occurred yet) - only applies to Entrust V1-key-pair
users.
|
static int |
WARNING_DN_CHANGE_REQUIRED
Indicates that the user requires a DN change.
|
static int |
WARNING_DN_CHANGED
Indicates that the user's DN was changed.
|
static int |
WARNING_ENC_KEY_UPDATED
Indicates that the user's decryption/encryption key/certificate was
updated.
|
static int |
WARNING_ENCRYPTION_KEY_NEEDS_UPDATE
Indicates that the user's decryption/encryption key/certificate requires
an update.
|
static int |
WARNING_OPTIONS_CHANGED
Indicates that the 'Options' information in an Entrust file-based Digital
Identity store has been tampered (modified by a third-party).
|
static int |
WARNING_OPTIONS_NOT_AVAILABLE
Indicates that the 'Options' information in an Entrust file-based Digital
Identity store is not available (missing/empty or MAC protection is
missing).
|
static int |
WARNING_OPTIONS_UPDATED
Indicates that the 'Options' information in an Entrust file-based Digital
Identity store has been updated.
|
static int |
WARNING_PW_EXPIRED
Indicates that according to the user's password history, the user's current
password has expired and must be changed.
|
static int |
WARNING_PW_NOT_VALID
Indicates that according to the user's password rules found in their
client policy settings, the user's current password is not valid.
|
static int |
WARNING_SIGN_KEY_UPDATED
Indicates that the user's signing/verification key/certificate was
updated.
|
static int |
WARNING_SIGNING_KEY_NEEDS_UPDATE
Indicates that the user's signing/verification key/certificate requires an
update.
|
static int |
WARNING_X500NAME_CHANGED
Indicates that the 'User X.500 Name' information in an Entrust file-based
Digital Identity store has been tampered (modified by a third-party).
|
| Constructor and Description |
|---|
User()
Creates a new
User object. |
User(java.lang.String profile,
SecureStringBuffer password,
java.lang.String inifile)
Creates a new
User object and automatically logs in using
settings retrieved from the user's entrust.ini file. |
User(UserConfigSettings userConfigSettings)
Creates a new
User object that will use/obey the indicated
user configuration settings. |
| Modifier and Type | Method and Description |
|---|---|
void |
addLogoutListener(LogoutListener logoutListener)
Adds the given
LogoutListener to the list of
LogoutListeners. |
void |
addTrustedCertificate(X509Certificate trustedCert)
Adds a trusted certificate from an address book, for example.
|
void |
addTrustedCertificate(X509Certificate trustedCert,
boolean revcheck)
Adds a trusted certificate from an address book, for example.
|
void |
blockELILogout()
Deprecated.
since 8.0; There is no longer a need to maintain this feature as
the Entrust Login Interface has been discontinued. This method will be removed in a
future release.
|
void |
changePassword(SecureStringBuffer oldPassword,
SecureStringBuffer newPassword)
Changes the password protecting the Digital Identity.
|
void |
closeConnections()
Closes the connection to the PKI.
|
void |
completeUserExport(LdapDirectory directory,
ManagerTransport managerTransport)
Completes a user export operation.
|
void |
doRequiredKeyManagement()
Does all required key management for a user.
|
boolean |
encryptionKeyUpdateRequired()
Determines whether the user's encryption/decryption key/certificate needs
to be updated.
|
X509Certificate |
getCaCertificate()
Returns the Certification Authority (CA) certificate stored in the credentials
if the user is logged in.
|
X509Certificate[] |
getCaCertificateChain()
Returns an array of CA certificates forming a chain to the user's root
CA.
|
CollectionCS |
getCertificateStore()
Returns the main certificate store used for certificate validation.
|
ValidationInfo |
getCertVerifier()
Returns the object that validates certificates for this user.
|
ClientSettings |
getClientSettings()
Gets the client settings that were used during user login.
|
CredentialReader |
getCredentialReader()
Gets the
CredentialReader. |
CredentialWriter |
getCredentialWriter()
Gets the
CredentialWriter. |
Name[] |
getDecryptionIssuers()
Returns the history of the decryption key issuers.
|
java.security.PrivateKey |
getDecryptionKey()
Returns the latest decryption private key stored in the credentials.
|
java.security.PrivateKey |
getDecryptionKey(Name issuer,
java.lang.String serialNumber)
Returns the decryption private key and serial number for the given issuer.
|
java.security.PrivateKey[] |
getDecryptionKeys()
Returns the decryption keys stored in the credentials.
|
java.lang.String[] |
getDecryptionSerialNumbers()
Returns the history of the decryption key serial numbers.
|
LdapDirectory |
getDirectory()
Returns the Directory that was set by calling
setConnections(). |
X509Certificate |
getEncryptionCertificate()
Returns the user's encryption certificate.
|
ExtensionTester |
getExtensionTester()
Returns the extension tester used for certificate validation.
|
java.util.Hashtable |
getExtensionTestlets()
Returns extension testlets registered by application.
|
IniFile |
getIniFile()
Returns the Entrust initialization file that was set in the
constructor of this class, if any.
|
ManagerTransport |
getManagerTransport()
Returns the
ManagerTransport that was set by calling
setConnections(). |
java.lang.String |
getOption(java.lang.String optionName)
Returns the option Value that corresponds to the provided option Name if
one exists; otherwise
null is returned. |
java.util.Date |
getPasswordExpiryDate()
Returns the date/time at which the user's password expires.
|
IniFile |
getPolicyCertificate()
Gets the policy certificate.
|
CollectionRS |
getRevocationStore()
Returns the main revocation store used for certificate validation.
|
X509Certificate |
getRootCaCertificate()
Returns the top-level trusted root CA certificate for users in a CA
hierarchy.
|
java.security.PrivateKey |
getSigningKey()
Returns the latest signing key stored in the credentials.
|
UserStatus |
getStatus()
Returns an object that provides information about the user's status
during the current login session.
|
X509Certificate |
getUserCertificate(Name issuer,
java.math.BigInteger serialNumber)
Returns the user's certificate that corresponds to the specified issuer
DN and serial number.
|
X509Certificate[] |
getUserCertificates()
Returns all the user's current certificates (excludes superseded
certificates).
|
X509Certificate[] |
getUserCertificates(boolean includedSuperseded)
Returns all the user's certificates (includes superseded certificates)
|
X509Certificate[] |
getUserCertificates(KeyUsage keyUsage)
Returns the user's certificates that can be used for purposes indicated
by the key usage provided.
|
X509Certificate[] |
getUserCertificatesByExactKeyUsage(KeyUsage keyUsage)
Returns the user's certificates that can ONLY be used for purposes indicated
by the key usage provided.
|
UserConfigSettings |
getUserConfigSettings()
Returns the user's configuration settings.
|
Name |
getUserDN()
Returns the user's distinguished name (DN).
|
java.security.PrivateKey |
getUserPrivateKey(Name issuer,
java.math.BigInteger serialNumber)
Returns the user's private key that corresponds to the specified certificate
issuer and serial number.
|
java.security.PrivateKey |
getUserPrivateKey(X509Certificate certificate)
Returns the user's private key that corresponds to the specified
certificate.
|
X509Certificate |
getVerificationCertificate()
Returns the user's verification certificate.
|
boolean |
isDuplicatePassword(SecureStringBuffer password)
This method may be used to determine if the supplied password
is contained in the User's password history.
|
boolean |
isLoggedIn()
Indicates whether or not the user is logged in.
|
boolean |
isOnline()
Indicates the user's working mode (online or offline).
|
boolean |
isV2KeyPairUpgradeEnabled()
Indicates whether Entrust's V2-key-pair user upgrade feature is enabled.
|
boolean |
keyUpdatePerformed()
Determines whether a key update has been performed on any of the user's
keys/certificates since this
User was created. |
boolean |
keyUpdateRequired()
Determines whether any of the user's keys/certificates need to be updated.
|
boolean |
keyUpdateRequired(X509Certificate certificate)
Determines whether the user's key/certificate that corresponds to the
specified certificate needs to be updated.
|
X509Certificate[] |
keyUpdatesRequired()
Determines whether any of the user's keys/certificates need to be updated.
|
int |
login(CredentialReader credentialReader,
SecureStringBuffer password)
Logs in a user.
|
void |
logout()
Logs out a user.
|
void |
registerExtensionTestlet(ExtensionTestlet testlet,
ObjectID extension)
Register a testlet for a certificate extension.
|
void |
requireCRL(boolean required)
Determines whether certificate validation fails when no CRL can be found.
|
void |
setConnections(java.io.InputStream entrustIniFile)
Sets the connections to the Entrust Authority Security Manager (EASM) using
settings retrieved from the user's
entrust.ini file. |
void |
setConnections(java.io.InputStream entrustIniFile,
boolean enableSMProxy)
Sets the connections to the Entrust Authority Security Manager (EASM) using
settings retrieved from the user's
entrust.ini file. |
void |
setConnections(LdapDirectory directory,
ManagerTransport managerTransport)
Sets the connections to a Public Key Infrastructure (PKI).
|
void |
setConnections(java.lang.String entrustIniFile)
Sets the connections to the Entrust Authority Security Manager (EASM) using
settings retrieved from the user's
entrust.ini file. |
void |
setConnections(java.lang.String entrustIniFile,
boolean smProxyEnabled)
Sets the connections to the Entrust Authority Security Manager (EASM) using
settings retrieved from the user's
entrust.ini file. |
void |
setCredentialWriter(CredentialWriter credentialWriter)
Sets the
CredentialWriter that will be used to write this
user's credentials. |
void |
setPolicyCertificate(IniFile policyCertificateCache)
Sets the user's policy certificate from a cache (.pch) file.
|
void |
setV2KeyPairUpgradeEnabled(boolean enable)
Enables/Disables Entrust's V2-key-pair user upgrade feature.
|
void |
setWriteCaUpdates(boolean writeCaUpdates)
Set whether or not updates detected to any CA certificates are written
back to the digital identity immediately.
|
boolean |
signingKeyUpdateRequired()
Determines whether the user's signing/verification key/certificate needs to
be updated.
|
void |
unblockELILogout()
Deprecated.
since 8.0; There is no longer a need to maintain this feature as
the Entrust Login Interface has been discontinued. This method will be removed in a
future release.
|
void |
updateAllKeys()
Updates all the user's keys/certificates, which HAVE NOT been superseded.
|
boolean |
updateEncryptionKeys()
Attempts to update the user's encryption/decryption key/certificate.
|
boolean |
updateSigningKeys()
Attempts to update the user's signing/verification key/certificate.
|
void |
updateUserKeys(X509Certificate[] certificates)
Updates the user's keys/certificates that correspond to the indicated
certificates, which MUST NOT have been superseded.
|
X509Certificate[] |
validate(X509Certificate certificate)
Validates an X.509 certificate.
|
void |
write()
Writes a user's credentials to the
CredentialWriter
that was set in setCredentialWriter(). |
public static final int WARNING_OPTIONS_CHANGED
UserStatus.OPTIONS_CHANGED field.public static final int WARNING_OPTIONS_NOT_AVAILABLE
UserStatus.OPTIONS_NOT_AVAILABLE field.public static final int WARNING_X500NAME_CHANGED
UserStatus.X500NAME_CHANGED field.public static final int WARNING_ENC_KEY_UPDATED
UserStatus.ENCRYPTION_CERTIFICATE_UPDATE_OCCURRED field.public static final int WARNING_SIGN_KEY_UPDATED
UserStatus.VERIFICATION_CERTIFICATE_UPDATE_OCCURRED field.public static final int WARNING_PW_EXPIRED
UserStatus.PASSWORD_EXPIRED field.public static final int WARNING_SIGNING_KEY_NEEDS_UPDATE
UserStatus.VERIFICATION_CERTIFICATE_UPDATE_REQUIRED field.public static final int WARNING_ENCRYPTION_KEY_NEEDS_UPDATE
UserStatus.ENCRYPTION_CERTIFICATE_UPDATE_REQUIRED field.public static final int WARNING_PW_NOT_VALID
UserStatus.PASSWORD_NOT_VALID field.public static final int WARNING_DN_CHANGED
UserStatus.DN_CHANGE_OCCURRED field.public static final int WARNING_DN_CHANGE_REQUIRED
UserStatus.DN_CHANGE_REQUIRED field.public static final int WARNING_DIRECTORY_IS_OLD
UserStatus.DIRECTORY_IS_OLD field.public static final int WARNING_OPTIONS_UPDATED
UserStatus.OPTIONS_UPDATED field;public User()
User object.
A default set of user configuration settings are also created for this user; the user will use/obey these settings.
public User(UserConfigSettings userConfigSettings)
User object that will use/obey the indicated
user configuration settings.
When user configuration settings are not provided, a default set of configuration settings is used.
userConfigSettings - user configuration settings (OPTIONAL)public User(java.lang.String profile,
SecureStringBuffer password,
java.lang.String inifile)
throws java.io.FileNotFoundException,
UserBadPasswordException,
UserFatalException
User object and automatically logs in using
settings retrieved from the user's entrust.ini file.
This constructor retrieves Directory server and authority location
information from an entrust.ini file, and uses the
information to log in the user to a specified Entrust Profile.
A default set of user configuration settings are also created for this user; the user will use/obey these settings.
profile - the path to the EPF file that contains the user's Digital
Identity (usually has a .epf filename
extension)password - the user's passwordinifile - the path to the the user's entrust.ini filejava.io.FileNotFoundException - if profile or inifile cannot be
foundUserBadPasswordException - if the given password is incorrectUserFatalException - if connections to the Directory and PKI cannot be set, the
user's profile cannot be read, or the user's CA certificate
could not be validated.public void setConnections(java.lang.String entrustIniFile)
throws java.io.FileNotFoundException,
UserFatalException
entrust.ini file.
This method retrieves both the Directory and the Security Manager location information from the file. It also retrieves Directory connections settings (connection timeout, search timeout) used to configure the Directory; when this information is not found, default values of 30 seconds are used for both.
The Security Manager connection is required during digital identity creation, recovery, and key management (key update, DN change, ...). The Directory connection aids certificate validation by allowing certificates and certificate revocation lists to be retrieved.
entrustIniFile - the location of the user's entrust.ini filejava.io.FileNotFoundException - if the entrust.ini file could not be foundUserFatalException - if the connections could not be set properly (entrust.ini
not correctly formatted or missing entries, Directory not available)public void setConnections(java.lang.String entrustIniFile,
boolean smProxyEnabled)
throws java.io.FileNotFoundException,
UserFatalException
entrust.ini file.
This method retrieves both the Directory and the Security Manager location
information from the file. It also retrieves Directory connections settings
(connection timeout, search timeout) used to configure the Directory; when
this information is not found, default values of 30 seconds are used for both.
If a Security Manager Proxy has been configured in the entrust.ini,
the use of the proxy can be controlled with the enableSMProxy
parameter.
Note: If enableSMProxy is set, the SMProxy values will
take precedence.
The Security Manager connection is required during digital identity creation, recovery, and key management (key update, DN change, ...). The Directory connection aids certificate validation by allowing certificates and certificate revocation lists to be retrieved.
entrustIniFile - the location of the user's entrust.ini filesmProxyEnabled - determines if the Security Manager Proxy should be usedjava.io.FileNotFoundException - if the entrust.ini file could not be foundUserFatalException - if the connections could not be set properly (entrust.ini
not correctly formatted or missing entries, Directory not available)public void setConnections(java.io.InputStream entrustIniFile)
throws UserFatalException
entrust.ini file.
This method retrieves both the Directory and the Security Manager location information from the file. It also retrieves Directory connections settings (connection timeout, search timeout) used to configure the Directory; when this information is not found, default values of 30 seconds are used for both. If the Directory is not found in the file an offline login will occur.
The Security Manager connection is required during digital identity creation, recovery, and key management (key update, DN change, ...). The Directory connection aids certificate validation by allowing certificates and certificate revocation lists to be retrieved.
Note: Secure LDAP is enabled by using the SecureLDAP=1 setting under [Directory Connection Settings]. In this mode, the directory is obtained from the SecureLDAPServer= line from the [Directory Connection Settings] section. If no SecureLDAPServer line is found when in this mode, an offline connection will be performed.entrustIniFile - an input stream from which the user's entrust.ini file can
be readjava.io.FileNotFoundException - if the entrust.ini file could not be foundUserFatalException - if the connections could not be set properly (entrust.ini
not correctly formatted or missing entries, Directory not available)public void setConnections(java.io.InputStream entrustIniFile,
boolean enableSMProxy)
throws UserFatalException
entrust.ini file.
This method retrieves both the Directory and the Security Manager location
information from the file. It also retrieves Directory connections settings
(connection timeout, search timeout) used to configure the Directory; when
this information is not found, default values of 30 seconds are used for both.
If the Directory is not found in the file an offline login will occur. If a
Security Manager Proxy has been configured in the entrust.ini,
the use of the proxy can be controlled with the enableSMProxy
parameter.
Note: If enableSMProxy is set, the SMProxy values will
take precedence.
The Security Manager connection is required during digital identity creation, recovery, and key management (key update, DN change, ...). The Directory connection aids certificate validation by allowing certificates and certificate revocation lists to be retrieved.
Note: Secure LDAP is enabled by using the SecureLDAP=1 setting under [Directory Connection Settings]. In this mode, the directory is obtained from the SecureLDAPServer= line from the [Directory Connection Settings] section. If no SecureLDAPServer line is found when in this mode, an offline connection will be performed.entrustIniFile - an input stream from which the user's entrust.ini file can
be readenableSMProxy - determines if the Security Manager Proxy should be usedjava.io.FileNotFoundException - if the entrust.ini file could not be foundUserFatalException - if the connections could not be set properly (entrust.ini
not correctly formatted or missing entries, Directory not available)public void setConnections(LdapDirectory directory, ManagerTransport managerTransport) throws UserFatalException
This includes a connection to an Certification Authority (CA) and a Directory. Whenever you create or recover credentials, or update keys, you must connect to, and communicate with, the PKI. This method should also be used when you want to retrieve information, such as revocation lists, from the Directory server.
If you are using anHttpsDirectoryClient or HttpsManagerClient
to protect access to the Directory and Manager through SSL, the toolkit
will use the SSL configurations specified in HttpsDirectoryClient or
HttpsManagerClient if they have been configured before the call to this method.
If no SSL configuration has been configured the toolkit will set the SSL
configuration using the certificates contained in the Identity being logged
into by this User object.directory - the connection to the Directory (OPTIONAL)managerTransport - the connection to the CA (OPTIONAL)UserFatalException - if the connection to the CA and/or Directory, when provided,
cannot be used (incorrect IP/Port, service down or not available)public void closeConnections()
If the connections to the Directory and the Security Manager are closed, the user works in offline mode. In offline mode, the user cannot create or recover credentials, update the keys in the credentials, or retrieve new revocation information when validating certificates.
public boolean isOnline()
The user is online if the connection to the Directory is set.
true if the user is online, otherwise returns
false.public boolean isLoggedIn()
The user is logged in after successfully calling the login
method.
true if the user is logged in, otherwise
returns false.public void setPolicyCertificate(IniFile policyCertificateCache)
If the user is working in offline mode, the policy certificate cannot be obtained from the Directory and must be set using this method.
policyCertificateCache - the policy certificate cache file.public void setCredentialWriter(CredentialWriter credentialWriter)
CredentialWriter that will be used to write this
user's credentials.
The CredentialWriter must be set when creating or recovering
credentials, or when updating the keys in credentials. The new credentials are
written to the specified CredentialWriter.
If a CredentialWriter is already set when this method is called,
it will be replaced by the new one.
Note: the type of the credential writer is not checked for compatibility with the reader until an attempt is made to write the credentials. See the class documentation for details on which reader/writer combinations are possible.
credentialWriter - the CredentialWriter to be used to write the credentials.public int login(CredentialReader credentialReader, SecureStringBuffer password) throws UserFatalException, UserRecoverException, UserBadPasswordException, java.security.cert.CertificateException
The login method reads the user's credentials from the
CredentialReader. The user's credentials are keys, certificates,
and other data that constitute the user's identity.
Note: After calling this method, the getStatus() method
should be called so that an application can see details of what updates
occurred or are required.
credentialReader - the selected CredentialReaderpassword - the user's passwordWARNING fields
defined in this class. For example, if both encryption and signing keys
were updated, the value would be
WARNING_ENC_KEY_UPDATED | WARNING_SIGN_KEY_UPDATED.
However, there are more status codes that are not
returned as part of this value. After login, the getStatus() method
should be called, which includes all of the status codes. The return value
of this method is for compatibility with applications written for older versions
of the Toolkit.UserFatalException - thrown if a non-recoverable error occurs during the login process. This could include
a communication failure with the PKI during credential creation, or failure to
find required information in the credentials.UserRecoverException - if an error occurs that causes the login process to fail and may
require the user to be recovered (Digital Identity store
corrupt/invalid)UserBadPasswordException - thrown if a user is being created/recovered, and the password does not
follow the password rules in the client policy settings, or if an
existing user is being logged in and the password is incorrectjava.security.cert.CertificateException - thrown if there is a problem with the user's client settings policy
certificates, or the user's CA certificate could not be validatedgetStatus()public UserStatus getStatus()
This method should be called after login or any method
that may attempt key management to see what the result was.
Note: The user's status information is cleared before every login attempt; this ensure that user's status information from one login session is not carried over into another.
null if the user is not logged in.public void logout()
throws UserNotLoggedInException
After calling the logout method, the User object
no longer has access to its credentials, such as keys and certificates.
UserNotLoggedInException - if the user is not logged in.public void changePassword(SecureStringBuffer oldPassword, SecureStringBuffer newPassword) throws UserNotLoggedInException, UserFatalException, UserBadPasswordException
For a password change to be possible, a credential writer that is capable of doing at least one more write operation must have been set, because the Digital Identity must be written to complete the password change operation.
If the Digital Identity was logged in using a SingleLoginReader,
the password change is performed via the Entrust Login Interface.
In all other cases, the password change operation consists of the following steps:
oldPassword - the current password protecting the Digital IdentitynewPassword - the new passwordUserNotLoggedInException - thrown if the user is not logged in.UserFatalException - thrown if an error occurred during the password change operationUserBadPasswordException - thrown if the new password is not valid according the the password
rules in the user's client policy settingssetCredentialWriterpublic java.lang.String getOption(java.lang.String optionName)
throws UserNotLoggedInException
null is returned.optionName - the string Name of the optionUserNotLoggedInExceptionpublic java.util.Date getPasswordExpiryDate()
throws UserNotLoggedInException,
UserFatalException
The user's client policy settings contain a set of password rules which indicate the 'password expiry in weeks'. This value indicates how long a password can be used for (in weeks) before it must be changed. This value, along with a timestamp of when the password (retrieved from the user's Digital Identity), it can be determined if the password is expired at the present date/time.
If the password rules contain a value of zero for 'password expiry in
weeks', then the password never expires and null is
returned. If the Digital Identity does not contain a password timestamp,
then the password never expires and null is returned.
null if the
password never expiresUserNotLoggedInException - if the user is not logged inUserFatalException - if the user's password rules could not be extracted from their client
policy settingspublic boolean signingKeyUpdateRequired()
throws UserNotLoggedInException
true if the user's signing/verification key/certificate
needs to be updated; false otherwiseUserNotLoggedInException - thrown if the user has not yet been logged inpublic boolean encryptionKeyUpdateRequired()
throws UserNotLoggedInException
true if the user's encryption/decryption key/certificate
needs to be updated; false otherwiseUserNotLoggedInException - thrown if the user has not yet been logged inpublic boolean keyUpdateRequired()
throws UserNotLoggedInException
true if any of the user's keys/certificates need to be
updated; false otherwiseUserNotLoggedInException - thrown if the user has not yet been logged inpublic boolean keyUpdateRequired(X509Certificate certificate) throws UserNotLoggedInException
certificate - the user's certificatetrue if the user's key/certificate needs to be updated;
false otherwiseUserNotLoggedInException - thrown if the user has not yet been logged inpublic X509Certificate[] keyUpdatesRequired() throws UserNotLoggedInException
UserNotLoggedInException - thrown if the user has not yet been logged inpublic boolean updateSigningKeys()
throws UserNotLoggedInException,
UserRecoverException
true if the signing/verification key/certificate was
updated successfully; false otherwiseUserNotLoggedInException - thrown if the user has not yet been logged inUserRecoverException - if a fatal error occurs that causes the update operation to fail and
may require the user to be recovered (Digital Identity store
corrupt/invalid)public boolean updateEncryptionKeys()
throws UserNotLoggedInException,
UserRecoverException
true if the encryption/decryption key/certificate was
updated successfully; false otherwiseUserNotLoggedInException - thrown if the user has not yet been logged inUserRecoverException - if a fatal error occurs that causes the update operation to fail and
may require the user to be recovered (Digital Identity store
corrupt/invalid)public void updateUserKeys(X509Certificate[] certificates) throws UserNotLoggedInException, UserKeyManagementException, UserFatalException, UserRecoverException
certificates - the certificates to be updatedUserNotLoggedInException - thrown if the user has not yet been logged inUserKeyManagementException - thrown when an update operation is not possible (no directory
connection, no credential writer ...)UserFatalException - if an error occurs that causes the update operation to failUserRecoverException - if an error occurs that causes the update operation to fail and may
require the user to be recovered (Digital Identity store
corrupt/invalid)public void updateAllKeys()
throws UserNotLoggedInException,
UserKeyManagementException,
UserFatalException,
UserRecoverException
UserNotLoggedInException - thrown if the user has not yet been logged inUserKeyManagementException - thrown when an update operation is not possible (no directory
connection, no credential writer ...)UserFatalException - if an error occurs that causes the update operation to failUserRecoverException - if an error occurs that causes the update operation to fail and may
require the user to be recovered (Digital Identity store
corrupt/invalid)public void doRequiredKeyManagement()
throws UserNotLoggedInException,
UserKeyManagementException,
UserFatalException,
UserRecoverException
The different types of key management operations that can occur are listed below:
Certificate streams that have become obsolete are not managed. This happens when a V2-key-pair user has a certificate-definition removed from their certificate-type.
Note: This method contacts the security manager, so it can be considered an expensive check to perform. A less expensive check can be done withkeyUpdateRequired(),
which will only check for key updates due to pending key and certificate expiry.UserNotLoggedInException - thrown if the user has not yet been logged inUserKeyManagementException - thrown when key management is not possible (no directory connection,
no credential writer ...)UserFatalException - if an error occurs that causes the key management operation to failUserRecoverException - if an error occurs that causes the key management operation to fail and
may require the user to be recovered (Digital Identity store
corrupt/invalid)public boolean keyUpdatePerformed()
User was created.
To see more details about which keys were updated during the previous
call to perform key management, call getStatus().
true if a key update has been performed;
false otherwisepublic void write()
throws UserNotLoggedInException,
UserFatalException
CredentialWriter
that was set in setCredentialWriter().
The write is only possible when the user has a credential writer that is capable of doing at least one more write operation, and the user is not logged in using Entrust Single Login.
UserNotLoggedInException - thrown if the user is not logged in.UserFatalException - thrown if an error occurred during the write operation. This may
be caused by trying to write credentials using a writer that is not
compatible with the reader used during login. See the
class documentation for details
on which reader/writer combinations are possible.setCredentialWriter()public void registerExtensionTestlet(ExtensionTestlet testlet, ObjectID extension)
If a testlet already exists for the given ObjectID, this testlet, as the most recent to be registered, will be used to test the extension.
An extension testlet only need to be registered once for a user object. It is not necessary to re-register the testlet before every user login.
testlet - the new testlet to be registeredextension - the object ID of the extension that testlet
validatespublic X509Certificate[] validate(X509Certificate certificate) throws CertificationException, UserNotLoggedInException
The validation comprises three steps:
certificate to the root
of trust.
The method returns a certificate chain from the root of trust to the given
certificate if a chain is found and successfully validated. It throws a
CertificateException if no chain is found, or if a chain is
found but fails to validate.
certificate - the certificate to validateCertificationException - if no valid certificate chain is found.UserNotLoggedInException - if the user is not logged inpublic void blockELILogout()
throws UserNotLoggedInException
Use this method if a user has logged in using Entrust Login Interface,
i.e. used a SingleLoginReader,
to prevent the user from being logged out
when ELI times out. The ELI timeout can be defined using Entrust Entelligence.
There might be situations when the Toolkit user does not want to be logged out at the same time as ELI logs out. This might be the case, for example, when performing unattended security operations over an extended period of time. Using this method, the user can block the logout until the operations have been completed.
Call the method to remove the logout
restriction.
unblockELILogout
UserNotLoggedInException - if the user is not logged inpublic void unblockELILogout()
throws UserNotLoggedInException
blockELILogout
method.UserNotLoggedInException - if the user is not logged inpublic void addTrustedCertificate(X509Certificate trustedCert) throws CertificationRootException
Trusted certificates are stored in a static memory based repository. The
fact that the repository is static means that any certificate marked as
trusted will be recognized as trusted by all User objects
and/or CertVerifier certificate validation engine objects
in an application. Because the repository is memory based it is
non-persistent, meaning it exists only while the application is running
and is not shared between separate applications.
CertificationRootException
exception.trustedCert - the trusted certificateCertificationRootException - if the policy settings prohibit adding trusted
certificates.public void addTrustedCertificate(X509Certificate trustedCert, boolean revcheck) throws CertificationException
If revcheck is set to true, a revocation check of the certificate will be done before the certificate is added. If the certificate is revoked, or revocation information could not be found for the certificate, it will not be added as a trusted certificate. In this case a CertificationException will be thrown.
If revcheck is set to false, it is the same as calling addTrustedCertificate(X509Certificate)
Trusted certificates are stored in a static memory based repository. The
fact that the repository is static means that any certificate marked as
trusted will be recognized as trusted by all User objects
and/or CertVerifier certificate validation engine objects
in an application. Because the repository is memory based it is
non-persistent, meaning it exists only while the application is running
and is not shared between separate applications.
CertificationRootException exception.trustedCert - - the trusted certificaterevcheck - - true if revocation checking of the certificate should
be done before it is added, false if no revocation checking will be used.CertificationException - - if revocation information could not be determinedRevocationException - - if the certificate is revokedpublic void requireCRL(boolean required)
throws UserNotLoggedInException
By default, if there is a connection to an LDAP directory and no CRL can be found for a certificate, the certificate is considered to be invalid. If there is no connection to an LDAP directory, the certificate is considered to be not revoked, even if no CRL can be found for it.
This method changes the default behaviour.
required - if true, certificate validation fails if no CRL
can be found for a certificate. If false,
certificate validation succeeds even if no CRL can be found
for a certificateUserNotLoggedInException - if the user is not logged inpublic void addLogoutListener(LogoutListener logoutListener)
LogoutListener to the list of
LogoutListeners. Each listener will be called when
the logout() method is called.logoutListener - the object that will be notified when the logout method is
called.public IniFile getIniFile()
Returns null if no initialization file was set; e.g.
the User instance logged in with the login() method,
not the User constructor.
IniFile object that specifies the settings
used during login, such as location information of the Directory
server and the PKI Authority.User(String, SecureStringBuffer, String)public LdapDirectory getDirectory()
setConnections().null.public ManagerTransport getManagerTransport()
ManagerTransport that was set by calling
setConnections().MangerTransport if the user is working
online, otherwise returns null.public IniFile getPolicyCertificate()
Returns the policy certificate that was set using the
setPolicyCertificate() method.
null.public ClientSettings getClientSettings()
Allows the application to examine the client settings that were used during a login. This is useful if a login attempt failed. For example, user creation might have failed because the initial profile password did not conform to the rules specified in the client settings.
public CredentialReader getCredentialReader()
CredentialReader.
Returns the CredentialReader used when calling
the login method.
CredentialReader used when calling the
login() method.public CredentialWriter getCredentialWriter()
CredentialWriter.
Returns the CredentialWriter set by the setCredentialWriter method.
CredentialWriter set by the setCredentialWriter()
method.public X509Certificate getVerificationCertificate() throws UserNotLoggedInException
The verification certificate is used to verify signatures that are created with the user's private signing key. This key/certificate pair can be used together to provide data integrity (assurance that data has not changed over time).
For users that exist created on an Entrust Security Manager version 7.0 or later, it is possible for the user to have multiple verification certificates. In this case, the verification certificate returned is determined using the following order of precedence:
For users whose credentials are stored in an Entrust Profile Format that supports the concept of certificate streams (EPF, token, ...), the certificate that is returned is always the latest, one that has not been superseded. A certificate in a certificate stream is superseded when it is no longer the latest certificate in that stream (the certificate stream has been updated).
getVerificationCertificate in interface KeyAndCertContainerUserNotLoggedInException - thrown if the user has not yet been logged inpublic X509Certificate getEncryptionCertificate() throws UserNotLoggedInException
The encryption certificate is used to protect information that can only be unprotected with the user's private decryption key. This key/certificate pair can be used together to provide data protection (assurance that protected data cannot be read by anyone other than the user).
For users that exist created on an Entrust Security Manager version 7.0 or later, it is possible for the user to have multiple encryption certificates. In this case, the encryption certificate returned is determined using the following order of precedence:
For users whose credentials are stored in an Entrust Profile Format that supports the concept of certificate streams (EPF, token, ...), the certificate that is returned is always the latest, one that has not been superseded. A certificate in a certificate stream is superseded when it is no longer the latest certificate in that stream (the certificate stream has been updated).
getEncryptionCertificate in interface KeyAndCertContainerUserNotLoggedInException - thrown if the user has not yet been logged inpublic X509Certificate[] getUserCertificates() throws UserNotLoggedInException
For users whose credentials are stored in an Entrust Digital Identity store that supports the concept of certificate streams (EPF, Entrust PKCS#11, ...), the certificates that are returned are always the latest - ones that have not been superseded. Otherwise all certificates are considered to be from a different stream (and thus not superseded). A certificate in a certificate stream is superseded when it is no longer the latest certificate in that stream (the certificate stream has been updated). Superseded certificates should generally not be used; the latest certificate in the certificate stream should be used instead.
UserNotLoggedInException - thrown if the user has not yet been logged inpublic X509Certificate[] getUserCertificates(boolean includedSuperseded) throws UserNotLoggedInException
A certificate in a certificate stream is superseded when it is no longer the latest certificate in that stream (the certificate stream has been updated). Superseded certificates should generally not be used; the latest certificate in the certificate stream should be used instead.
UserNotLoggedInException - thrown if the user has not yet been logged inpublic X509Certificate getUserCertificate(Name issuer, java.math.BigInteger serialNumber) throws UserNotLoggedInException
All of the user's certificates are searched, including the user's certificates that have been superseded (non-current).
issuer - the issuer of the certificateserialNumber - the serial number of the certificatenull if no such certificate existsUserNotLoggedInException - thrown if the user has not yet been logged inpublic X509Certificate[] getUserCertificates(KeyUsage keyUsage) throws UserNotLoggedInException
It searches for certificates that have a key usage extension that indicates they can be used for the requested purpose. This includes any certificates with a key usage extension that contains all of the key usage bits in the key usage provided. These certificates may also contain additional key usage bits that were not requested, but they will at a bare minimum contain all the key usage bits requested. This also includes certificates that do not have a key usage extension, since these certificates have no restrictions on the purpose for which they can be used.
When the requested key usage is null, only certificates that
do not have key usage extension are returned.
For users whose credentials are stored in an Entrust Profile Format that supports the concept of certificate streams (EPF, token, ...), the certificates that are returned are always the latest, ones that have not been superseded. A certificate in a certificate stream is superseded when it is no longer the latest certificate in that stream (the certificate stream has been updated). Superseded certificates should NOT be used; the latest certificate in the certificate stream should be used instead.
keyUsage - the requested key usage (OPTIONAL)UserNotLoggedInException - if the user has not yet been logged inpublic X509Certificate[] getUserCertificatesByExactKeyUsage(KeyUsage keyUsage) throws UserNotLoggedInException
It searches for certificates that have a key usage extension that is identical to the key usage provided. This only includes certificates with a key usage extension that contains the exact key usage bits in the key usage provided.
When the requested key usage is null, only certificates that
do not have a key usage extension are returned.
For users whose credentials are stored in an Entrust Profile Format that supports the concept of certificate streams (EPF, token, ...), the certificates that are returned are always the latest, ones that have not been superseded. A certificate in a certificate stream is superseded when it is no longer the latest certificate in that stream (the certificate stream has been updated). Superseded certificates should NOT be used; the latest certificate in the certificate stream should be used instead.
keyUsage - the requested key usage (OPTIONAL)UserNotLoggedInException - if the user has not yet been logged inpublic java.security.PrivateKey getSigningKey()
throws UserNotLoggedInException
getSigningKey in interface KeyAndCertContainerPrivateKey object, or null
if the user does not have a signing key.UserNotLoggedInException - if the user is not logged in.public java.security.PrivateKey[] getDecryptionKeys()
throws UserNotLoggedInException
PrivateKey objects.UserNotLoggedInException - if the user is not logged in.public java.lang.String[] getDecryptionSerialNumbers()
throws UserNotLoggedInException
String.UserNotLoggedInException - if the user is not logged in.public Name[] getDecryptionIssuers() throws UserNotLoggedInException, CodingException, Base64Exception
Name array of the decryption key issuersUserNotLoggedInException - if the user is not logged in.CodingException - if the issuer name component of the decryption key/certificate
key identifier is incorrectly formatted (does not contain Base64
encoded DER encoded data)Base64Exception - if the issuer name component of the decryption key/certificate
key identifier is incorrectly formatted (does not contain Base64
encoded data)public java.security.PrivateKey getDecryptionKey()
throws UserNotLoggedInException
PrivateKey object,
or null if there is no decryption key in the credentials.UserNotLoggedInException - if the user is not logged in.public java.security.PrivateKey getDecryptionKey(Name issuer, java.lang.String serialNumber) throws UserNotLoggedInException
getDecryptionKey in interface KeyAndCertContainerissuer - the issuer of the certificateserialNumber - the serial number of the certificatePrivateKey object.UserNotLoggedInException - if the user is not logged in.public java.security.PrivateKey getUserPrivateKey(X509Certificate certificate) throws UserNotLoggedInException
certificate - the certificate that corresponds to the requested private keynull if no such private key existsUserNotLoggedInException - thrown if the user has not yet been logged inpublic java.security.PrivateKey getUserPrivateKey(Name issuer, java.math.BigInteger serialNumber) throws UserNotLoggedInException
issuer - the issuer of the certificate that corresponds to the requested private
keyserialNumber - the serial number of the certificate that corresponds to the requested
private keynull if no such private key
existsUserNotLoggedInException - thrown if the user has not yet been logged inpublic Name getUserDN() throws UserNotLoggedInException
UserNotLoggedInException - if the user has not yet been logged inpublic X509Certificate getCaCertificate() throws UserNotLoggedInException
CredentialWriter, LdapDirectory and
ManagerTransport.UserNotLoggedInException - thrown if the user has not yet been logged inpublic X509Certificate getRootCaCertificate() throws UserNotLoggedInException
Depending on whether or not the user is in a hierarchy, the top-level trusted root CA certificate can be either the same or different from the user's issuing CA certificate.
null
if the user is not part of a CA hierarchy.UserNotLoggedInException - thrown if the user has not yet been logged ingetCaCertificate()public X509Certificate[] getCaCertificateChain() throws UserFatalException, UserNotLoggedInException
The first element of the array is the immediate CA certificate and the last element is the top level trusted root certificate.
Note: The CA certificate chain returned from this method is always the latest CA certificate chain. For example, if the CA certificate chain contains certificates that have been rolled, and the user calling this method is from a previously rolled CA, the chain returned will contain the latest CA certificates, not the certificates which have since been rolled. If a chain containing these older certificates is required, a call tovalidate(X509Certificate)
will return the desired chain.getCaCertificateChain in interface KeyAndCertContainerUserFatalException - thrown if the chain cannot be built.UserNotLoggedInException - thrown if the user is not logged in.public CollectionCS getCertificateStore() throws UserNotLoggedInException
getCertificateStore in interface KeyAndCertContainerUserNotLoggedInException - thrown if the user is not logged in.public CollectionRS getRevocationStore() throws UserNotLoggedInException
UserNotLoggedInException - if the user is not logged inpublic ValidationInfo getCertVerifier() throws UserNotLoggedInException
All information that is accessible through the returned
ValidationInfo is also available
through the User object directly, and should be accessed
there.
At each login, a new ValidationInfo object is created.
ValidationInfo object that is used by the user to
validate certificates.UserNotLoggedInException - if the user is not logged inpublic ExtensionTester getExtensionTester() throws UserNotLoggedInException
ExtensionTester objectUserNotLoggedInException - if the user is not logged inpublic java.util.Hashtable getExtensionTestlets()
public void setWriteCaUpdates(boolean writeCaUpdates)
If changes are written immediately, and no certificate cache is set up, the User will not be able to log in again without a connection to a Directory until they experience a key update.
This method is only effective if called before login
The default is for changes to be written immediately.
writeCaUpdates - set to true if updates to CA certificates should be
written to the digital identity immediately, false if
changes should only be written when the user receives a certificate
signed by a new CA certificate.public void completeUserExport(LdapDirectory directory, ManagerTransport managerTransport) throws UserNotLoggedInException, UserKeyManagementException, UserFatalException, UserRecoverException
In order for this operation to be possible, the following prerequisites must be met:
This operation does a signed key recovery of the user at the Security Manager they have been exported to. Once complete, the user will be in the active state at the new Security Manager. The user's Digital Identity store will have been be updated to contain all the user's keys/certificates known to the Security Manager. This will include the user's backed-up keys/certificates issued by the old Security Manager as well as all the user's keys/certificate issued by the new Security Manager.
directory - the Directory used by the new Security ManagermanagerTransport - a connection to the Security Manager the user has been exported toUserNotLoggedInException - if the user is not logged inUserKeyManagementException - if the complete export user operation is not possible because one of
the prerequisites has not been metUserFatalException - if an error occurs that causes the complete user export operation to
failUserRecoverException - if an error occurs that causes the complete user export operation to
fail and may require the user to be recovered (Digital Identity store
corrupt/invalid)public void setV2KeyPairUpgradeEnabled(boolean enable)
By default, V2-key-pair user upgrade is enabled; for a description of how
this feature works, refer to isV2KeyPairUpgradeEnabled()
enable - indicates whether the V2-key-pair user upgrade is to be enabled
or disabledisV2KeyPairUpgradeEnabled()public boolean isV2KeyPairUpgradeEnabled()
The terminology V1-key-pair and V2-key-pair only applies to users created against an Entrust Authority Security Manager (EASM), whose digital identity exists in Entrust format (Entrust Profile (EPF), Entrust format on a smart card or token, or Entrust format in the Microsoft CryptoAPI repository). These terms are defined as follows:
When a V1-key-pair user that exists on a 7.0 (or later) EASM is logged in online using the 7.0 Toolkit (or later), it will be detected that a V2-key-pair upgrade is required. This involves associating each of the user's keys/certificates with an appropriate certificate definition and doing any necessary key management. By default, a V2-key-pair upgrade is done automatically when any other key management operation is required (key rollover, forced key update, ...).
The consequence of upgrading a user to V2-key-pair is that any pre-7.0
client is no longer capable of doing key management for this user. For this
reason, under certain circumstances, it may desirable to disable the
V2-key-pair upgrade feature; This can be done using
setV2KeyPairUpgradeEnabled(boolean). For instance, Entrust user's
that will use both pre-7.0 and 7.0 (or later) based client applications
should disable V2-key-pair upgrade.
true if V2-key-pair user upgrade is enabled;
false otherwisesetV2KeyPairUpgradeEnabled(boolean)public boolean isDuplicatePassword(SecureStringBuffer password) throws UserFatalException, UserNotLoggedInException
This method may be used before the changePassword(SecureStringBuffer, SecureStringBuffer)
method is called for applications that need to know whether a
password has already been used.
This method may only be called after the User has been logged in.
password - The password to check against the User's password
history.UserFatalExceptionUserNotLoggedInException#changePassword(SecureStringBuffer, SecureStringBuffer)}public UserConfigSettings getUserConfigSettings()
User configuration settings can be specified when the User
object is instantiated. If not specified, a default set of configuration
settings is automatically created. These configuration settings allow the
calling application to have control over various aspects of user
operation. The settings can be changed at any point with the change
taking effect immediately.