Interface PasswordPolicyService
-
- All Known Implementing Classes:
ITIMPasswordPolicyImpl
public interface PasswordPolicyService
Provides features to enable password value conformance check and synchonization against externally defined policies.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getLastStatusMessage()
Get the status message returned from the previous invocation ofsynchronizePassword(String, List)
orvalidatePassword(String, List)
.void
initialize()
Perform and required post construction initialization.boolean
ready()
Ensure the password policy subsystem is available.void
setConnection(PolicyServiceConnection conn)
Set the connection.void
synchronizePassword(java.lang.String userName, java.util.List passwordValues)
Propagate the password values for the given user.void
terminate()
Perform and required cleanup in preparation for shutdown.boolean
validatePassword(java.lang.String userName, java.util.List passwordValues)
Check the password values conform to policy.
-
-
-
Method Detail
-
setConnection
void setConnection(PolicyServiceConnection conn)
Set the connection.- Parameters:
conn
- - The connection.- Throws:
java.lang.IllegalArgumentException
- if conn isnull
.
-
ready
boolean ready()
Ensure the password policy subsystem is available. For example, check that network connectivity is available. If used, this method should be called before validatePassword(List).- Returns:
- true if policy subsystem is ready.
-
validatePassword
boolean validatePassword(java.lang.String userName, java.util.List passwordValues) throws PolicyConnectionException, MalformedResponseException
Check the password values conform to policy.- Parameters:
userName
- - The user name, e.g. jdoe or eruid=jdoepasswordValues
- - List of associated password values to be checked. List must have length > 0- Returns:
- true if all passwords conform to policy.
- Throws:
PolicyConnectionException
- if connection to policy service is lost.MalformedResponseException
- if a policy service response cannot be parsed.java.lang.IllegalArgumentException
- if passwordValues.length() <= 0.
-
synchronizePassword
void synchronizePassword(java.lang.String userName, java.util.List passwordValues) throws PolicyConnectionException, MalformedResponseException, PasswordSynchException
Propagate the password values for the given user.- Parameters:
userName
- - The user name, e.g. jdoe or eruid=jdoepasswordValues
- - List of associated password values to be synchronized. List must have length > 0- Throws:
PolicyConnectionException
- if connection to policy service is lost.MalformedResponseException
- if a policy service response cannot be parsed.PasswordSynchException
- if any single password value cannot be synchronized, e.g. connection failure.java.lang.IllegalArgumentException
- if passwordValues.length() <= 0.
-
initialize
void initialize() throws PolicyInitializationException
Perform and required post construction initialization. For example, establish network connections.- Throws:
PolicyInitializationException
-
terminate
void terminate()
Perform and required cleanup in preparation for shutdown.
-
getLastStatusMessage
java.lang.String getLastStatusMessage()
Get the status message returned from the previous invocation ofsynchronizePassword(String, List)
orvalidatePassword(String, List)
.- Returns:
- The status message from the service, or
null
if no status was returned.
-
-