com.sap.security.api
Interface ISecurityPolicy


public interface ISecurityPolicy

This interface handles UME Security Policy settings. Note: It is not possible to change the current security policy settings with the setter methods at runtime. If you want to change these settings, change the configuration and restart the server.

Version:
1.0

Field Summary
static java.lang.String ACCOUNT_LOCKED_ADMIN
           
static java.lang.String ACCOUNT_LOCKED_LOGON
           
static java.lang.String ALPHA_NOT_ALLOWED
           
static java.lang.String ALPHANUM_REQUIRED_FOR_LOGONID
           
static java.lang.String ALPHANUM_REQUIRED_FOR_PSWD
           
static java.lang.String CERT_AUTH_FAILED
           
static java.lang.String CERT_GET_ERROR
           
static java.lang.String CERT_NOT_UNIQUE
           
static java.lang.String CHANGE_PASSWORD_NOT_ALLOWED
           
static java.lang.String INVALID_UID
           
static java.lang.String LOGONID_IS_NULL
           
static java.lang.String LOGONID_TOO_LONG
           
static java.lang.String LOGONID_TOO_SHORT
           
static java.lang.String LOWERCASE_NOT_ALLOWED
           
static java.lang.String LOWERCASE_REQUIRED
           
static java.lang.String MISSING_NEW_PASSWORD
           
static java.lang.String MISSING_PASSWORD
           
static java.lang.String MISSING_PASSWORD_CONFIRM
           
static java.lang.String MISSING_UID
           
static java.lang.String MIXED_CASE_REQUIRED_FOR_LOGONID
           
static java.lang.String MIXED_CASE_REQUIRED_FOR_PSWD
           
static java.lang.String NEW_PASSWORD_IMPERMISSIBLE
           
static java.lang.String NEW_PASSWORD_INVALID
           
static java.lang.String NEW_PASSWORDS_UNMATCHED
           
static java.lang.String NO_CERTIFICATE
           
static java.lang.String NO_PASSWORD_LOGON
           
static java.lang.String NO_USER_CERTIFICATE
           
static java.lang.String NUMERIC_NOT_ALLOWED
           
static java.lang.String NUMERIC_REQUIRED
           
static java.lang.String OLDPASSWORD_IN_NEWPASSWORD
           
static java.lang.String PASSWORD_CONTAINED_IN_HISTORY
           
static java.lang.String PASSWORD_EXPIRED
           
static java.lang.String PASSWORD_MAX_IDLE_TIME_EXCEEDED
           
static java.lang.String PASSWORD_TOO_LONG
           
static java.lang.String PASSWORD_TOO_SHORT
           
static java.lang.String SAPSTAR_ACTIVATED
           
static java.lang.String SPEC_CHARS_REQUIRED_FOR_LOGONID
           
static java.lang.String SPEC_CHARS_REQUIRED_FOR_PSWD
           
static java.lang.String SPECIAL_CHARS_NOT_ALLOWED
           
static java.lang.String TOO_MANY_INVALID_LOGON_ATTEMPTS
           
static java.lang.String USER_ALREADY_EXIST
           
static java.lang.String USER_ALREADY_LOGGED_IN
           
static java.lang.String USER_AUTH_FAILED
           
static java.lang.String USER_IS_CURRENTLY_NOT_VALID
           
static java.lang.String USERID_CONTAINED_IN_PASSWORD
           
static java.lang.String USERID_NOT_FOUND
           
static java.lang.String WHITESPACES_NOT_ALLOWED
           
static java.lang.String WRONG_OLD_PASSWORD
           
static java.lang.String WRONG_PASSWORD
           
static java.lang.String wrongOldPassword
           
 
Method Summary
 void commit()
          Commit saved Security Policy to the principal store.
 java.lang.String generateLogonId()
          Generate a logon id for this security policy.
 java.lang.String generatePassword()
          Generate a password for this security policy.
 java.lang.String generatePassword(java.lang.String userid)
          Generate a password for this security policy.
 int getAutoUnlockTime()
          Gets the AutoUnlockTime(in seconds) attribute of the ISecurityPolicy object
 boolean getCertLogonRequired()
          Deprecated.  
 int getCookieLifeTime()
          Deprecated.  
 boolean getEnforcePolicyAtLogon()
          Returns a boolean indicating whether users who have a productive password that doesn't match the security policy settings have to change it during password logon.
 java.lang.String getLocalizedMessage(java.util.Locale locale, java.lang.Exception ex)
          Return a localized password exception message for the given key.
 java.lang.String getLocalizedMessage(java.util.Locale locale, java.lang.String key)
          Return a localized password exception message for the given key.
 int getLockAfterInvalidAttempts()
          Gets the Number of Allowed Logon Attempts (AllowedLogonAttempts) attribute of the ISecurityPolicy object
 int getLogonIdLowerCaseRequired()
          Return a number indicating how many capical and lower case letters the logon id must contain.
 int getLogonIdMaxLength()
          Return the integer value indicating the maximum length of a logon id.
 int getLogonIdMinLength()
          Return the integer value indicating the minimum length of a logon id.
 int getLogonIdNumericDigitsRequired()
          Return the number indicating how many alphabets and numeric values the logon id must contain.
 int getLogonIdSpecialCharRequired()
          Return a number indicating how many special characters the logon id must contain.
 boolean getOldInNewAllowed()
          Return a boolean indicating whether the password need to be different from the old password.
 int getPasswordAlphaNumericRequired()
          Return the number indicating how many alphabets and numeric values the password must contain.
 boolean getPasswordChangeAllowed()
          Return the boolean value indicating whether the password is allowed to be changed.
 boolean getPasswordChangeRequired()
          Return the boolean value indicating whether the password is enforced to change at the first logon.
 int getPasswordExpiredDays()
          Return the numbers of days the password is set to expired.
 int getPasswordHistory()
          Gets the PasswordHistory attribute of the SecurityPolicy object.
 java.lang.String getPasswordImpermissiblePattern()
          Returns a comma-separated list of impermissible passwords.
 java.util.Date getPasswordLastChangeDateDefault()
          Returns the PasswordLastChangeDateDefault (MM/DD/YYYY) attribute of the ISecurityPolicy object.
 int getPasswordMaxIdleTime()
          Returns the PasswordMaxIdleTime(in days) attribute of the ISecurityPolicy object.
 int getPasswordMaxLength()
          Gets the Password Maximum Length(PasswordMaxLength) attribute of the ISecurityPolicy object
 int getPasswordMinLength()
          Gets the Password Minimum Length(PasswordMinLength) attribute of the ISecurityPolicy object
 int getPasswordMixCaseRequired()
          Return a number indicating how many capical and lower case letters the password must contain.
 int getPasswordSpecialCharRequired()
          Return the number indicating how many special characters the password must contain.
 java.util.Date getPasswordSuccessfulCheckDateDefault()
          Returns the PasswordSuccessfulCheckDateDefault attribute of the ISecurityPolicy object.
 java.lang.String getUniqueID()
          Gets the unique identifier which unambiguously identifies the object's principal type and principal's data record(s) in the data store (e.g.
 java.lang.String getUniqueName()
          Get uniqueName of this ISecurityPolicy object.
 boolean getUseridInPasswordAllowed()
          Return a boolean indicating whether the password need to be different from the user id(uid).
 boolean isLogonIdValid(java.lang.String logonId)
          Check the validity of the logon id against the security policy
 boolean isPasswordValid(java.lang.String pass)
          Deprecated. please use isPasswordValid(String pass, String logonId)
 boolean isPasswordValid(java.lang.String pass, java.lang.String logonId)
          Check the validity of the password against the password policy
 boolean isPasswordValidAtLogon(java.lang.String pass, java.lang.String logonId)
          Check the validity of the password against the password policy without the check if the password is in history.
 void rollback()
          Roll back (i.e.
 void save()
          Call this function to save/update the security policy data.
 void setAutoUnlockTime(int time)
          Sets the AutoUnlockTime(in seconds) attribute of the ISecurityPolicy object
 void setCertLogonRequired(boolean clr)
          Deprecated.  
 void setCookieLifeTime(int lifeTime)
          Deprecated.  
 void setEnforcePolicyAtLogon(boolean enforcePolicyAtLogon)
          Sets whether users who have a productive password that doesn't match the security policy settings have to change it during password logon.
 void setLockAfterInvalidAttempts(int count)
          Sets the Number of Allowed Logon Attempts (AllowedLogonAttempts) attribute of the ISecurityPolicy object
 void setLogonIdLowerCaseRequired(int number)
          Sets the number indicating how many capical and lower case letters the logon id must contain.
 void setLogonIdMaxLength(int length)
          Sets the integer value indicating the maximum length of a logon id.
 void setLogonIdMinLength(int length)
          Sets the integer value indicating the minimum length of a logon id.
 void setLogonIdNumericDigitsRequired(int number)
          Sets the number indicating how many alphabets and numeric values the logon id must contain.
 void setLogonIdSpecialCharRequired(int number)
          Sets the number indicating how many special characters the logon id must contain.
 void setOldInNewAllowed(boolean allow)
          Sets the boolean indicating whether the password need to be different from the old password.
 void setPasswordAlphaNumericRequired(int number)
          Sets the number indicating how many alphabets and numeric values the password must contain.
 void setPasswordChangeAllowed(boolean pca)
          Sets the boolean value indicating whether the password is allowed to be changed.
 void setPasswordChangeRequired(boolean pca)
          Sets the boolean value indicating whether the password is enforced to change.
 void setPasswordExpiredDays(int days)
          Sets the numbers of days the password is to be expired.
 void setPasswordHistory(int length)
          Sets the PasswordHistory attribute of the SecurityPolicy object
 void setPasswordImpermissiblePattern(java.lang.String forbiddenPattern)
          Sets Returns a comma-separated list of impermissible passwords.
 void setPasswordMaxIdleTime(int time)
          Sets the PasswordMaxIdleTime(in days) attribute of the ISecurityPolicy object.
 void setPasswordMaxLength(int length)
          Sets the Password Maximum Length(PasswordMaxLength) attribute of the ISecurityPolicy object
 void setPasswordMinLength(int length)
          Sets the Password Minimum Length(PasswordMinLength) attribute of the ISecurityPolicy object
 void setPasswordMixCaseRequired(int number)
          Sets the number indicating how many capical and lower case letters the password must contain.
 void setPasswordPasswordLastChangeDateDefault(java.util.Date newDate)
          Sets the PasswordLastChangeDateDefault attribute of the ISecurityPolicy object.
 void setPasswordSpecialCharRequired(int number)
          Sets the number indicating how many special characters the password must contain.
 void setPasswordSuccessfulCheckDateDefault(java.util.Date newDate)
          Sets the PasswordSuccessfulCheckDateDefault attribute of the ISecurityPolicy object.
 void setUseridInPasswordAllowed(boolean pwnur)
          Sets the boolean indicating whether the password need to be different from the user id(uid).
 void setUserName(java.lang.String id)
          Deprecated.  
 java.lang.String validatePassword(java.lang.String pass)
          Deprecated. please use validatePassword(String pass, String uid)
 java.lang.String validatePassword(java.lang.String pass, java.lang.String uid)
          Check the validity of the password against the password policy.
 

Field Detail

ACCOUNT_LOCKED_ADMIN

public static final java.lang.String ACCOUNT_LOCKED_ADMIN

ACCOUNT_LOCKED_LOGON

public static final java.lang.String ACCOUNT_LOCKED_LOGON

ALPHANUM_REQUIRED_FOR_PSWD

public static final java.lang.String ALPHANUM_REQUIRED_FOR_PSWD

CERT_GET_ERROR

public static final java.lang.String CERT_GET_ERROR

CERT_NOT_UNIQUE

public static final java.lang.String CERT_NOT_UNIQUE

CHANGE_PASSWORD_NOT_ALLOWED

public static final java.lang.String CHANGE_PASSWORD_NOT_ALLOWED

MISSING_NEW_PASSWORD

public static final java.lang.String MISSING_NEW_PASSWORD

MISSING_PASSWORD

public static final java.lang.String MISSING_PASSWORD

MISSING_PASSWORD_CONFIRM

public static final java.lang.String MISSING_PASSWORD_CONFIRM

MISSING_UID

public static final java.lang.String MISSING_UID

MIXED_CASE_REQUIRED_FOR_PSWD

public static final java.lang.String MIXED_CASE_REQUIRED_FOR_PSWD

NEW_PASSWORD_INVALID

public static final java.lang.String NEW_PASSWORD_INVALID

NEW_PASSWORD_IMPERMISSIBLE

public static final java.lang.String NEW_PASSWORD_IMPERMISSIBLE

NEW_PASSWORDS_UNMATCHED

public static final java.lang.String NEW_PASSWORDS_UNMATCHED

NO_CERTIFICATE

public static final java.lang.String NO_CERTIFICATE

NO_USER_CERTIFICATE

public static final java.lang.String NO_USER_CERTIFICATE

NUMERIC_REQUIRED

public static final java.lang.String NUMERIC_REQUIRED

OLDPASSWORD_IN_NEWPASSWORD

public static final java.lang.String OLDPASSWORD_IN_NEWPASSWORD

PASSWORD_CONTAINED_IN_HISTORY

public static final java.lang.String PASSWORD_CONTAINED_IN_HISTORY

PASSWORD_EXPIRED

public static final java.lang.String PASSWORD_EXPIRED

PASSWORD_MAX_IDLE_TIME_EXCEEDED

public static final java.lang.String PASSWORD_MAX_IDLE_TIME_EXCEEDED

PASSWORD_TOO_LONG

public static final java.lang.String PASSWORD_TOO_LONG

PASSWORD_TOO_SHORT

public static final java.lang.String PASSWORD_TOO_SHORT

SAPSTAR_ACTIVATED

public static final java.lang.String SAPSTAR_ACTIVATED

SPEC_CHARS_REQUIRED_FOR_PSWD

public static final java.lang.String SPEC_CHARS_REQUIRED_FOR_PSWD

USER_AUTH_FAILED

public static final java.lang.String USER_AUTH_FAILED

USER_IS_CURRENTLY_NOT_VALID

public static final java.lang.String USER_IS_CURRENTLY_NOT_VALID

USERID_CONTAINED_IN_PASSWORD

public static final java.lang.String USERID_CONTAINED_IN_PASSWORD

USERID_NOT_FOUND

public static final java.lang.String USERID_NOT_FOUND

WRONG_OLD_PASSWORD

public static final java.lang.String WRONG_OLD_PASSWORD

WRONG_PASSWORD

public static final java.lang.String WRONG_PASSWORD

LOGONID_IS_NULL

public static final java.lang.String LOGONID_IS_NULL

LOGONID_TOO_LONG

public static final java.lang.String LOGONID_TOO_LONG

LOGONID_TOO_SHORT

public static final java.lang.String LOGONID_TOO_SHORT

WHITESPACES_NOT_ALLOWED

public static final java.lang.String WHITESPACES_NOT_ALLOWED

SPEC_CHARS_REQUIRED_FOR_LOGONID

public static final java.lang.String SPEC_CHARS_REQUIRED_FOR_LOGONID

MIXED_CASE_REQUIRED_FOR_LOGONID

public static final java.lang.String MIXED_CASE_REQUIRED_FOR_LOGONID

ALPHANUM_REQUIRED_FOR_LOGONID

public static final java.lang.String ALPHANUM_REQUIRED_FOR_LOGONID

ALPHA_NOT_ALLOWED

public static final java.lang.String ALPHA_NOT_ALLOWED

NUMERIC_NOT_ALLOWED

public static final java.lang.String NUMERIC_NOT_ALLOWED

SPECIAL_CHARS_NOT_ALLOWED

public static final java.lang.String SPECIAL_CHARS_NOT_ALLOWED

USER_ALREADY_EXIST

public static final java.lang.String USER_ALREADY_EXIST

wrongOldPassword

public static final java.lang.String wrongOldPassword

NO_PASSWORD_LOGON

public static final java.lang.String NO_PASSWORD_LOGON

TOO_MANY_INVALID_LOGON_ATTEMPTS

public static final java.lang.String TOO_MANY_INVALID_LOGON_ATTEMPTS

INVALID_UID

public static final java.lang.String INVALID_UID

CERT_AUTH_FAILED

public static final java.lang.String CERT_AUTH_FAILED

USER_ALREADY_LOGGED_IN

public static final java.lang.String USER_ALREADY_LOGGED_IN

LOWERCASE_REQUIRED

public static final java.lang.String LOWERCASE_REQUIRED

LOWERCASE_NOT_ALLOWED

public static final java.lang.String LOWERCASE_NOT_ALLOWED
Method Detail

getPasswordSuccessfulCheckDateDefault

public java.util.Date getPasswordSuccessfulCheckDateDefault()
Returns the PasswordSuccessfulCheckDateDefault attribute of the ISecurityPolicy object. Default value is 12/31/9999
Returns:
The PasswordSuccessfulCheckDateDefault value

setPasswordSuccessfulCheckDateDefault

public void setPasswordSuccessfulCheckDateDefault(java.util.Date newDate)
Sets the PasswordSuccessfulCheckDateDefault attribute of the ISecurityPolicy object. This value is used to enforce the PasswordMaxIdleTime policy if no successful logon date is available (because no logon succeeded yet).
Parameters:
newDate - The new PasswordSuccessfulCheckDateDefault value

setPasswordPasswordLastChangeDateDefault

public void setPasswordPasswordLastChangeDateDefault(java.util.Date newDate)
Sets the PasswordLastChangeDateDefault attribute of the ISecurityPolicy object. This value is used to enforce the PasswordExpiredDays policy if no password change date is available (because it is not changed yet).
Parameters:
newDate - The new PasswordLastChangeDateDefault value

getPasswordLastChangeDateDefault

public java.util.Date getPasswordLastChangeDateDefault()
Returns the PasswordLastChangeDateDefault (MM/DD/YYYY) attribute of the ISecurityPolicy object.
Returns:
The PasswordLastChangeDateDefault value

setPasswordMaxIdleTime

public void setPasswordMaxIdleTime(int time)
Sets the PasswordMaxIdleTime(in days) attribute of the ISecurityPolicy object. If a password is not successfully used for the set period, the password is expired and can't be used for logon until a new password is set by an administrator. Default value is 0 which means no expiration.
Parameters:
time - The new PasswordMaxIdleTime value

getPasswordMaxIdleTime

public int getPasswordMaxIdleTime()
Returns the PasswordMaxIdleTime(in days) attribute of the ISecurityPolicy object. Default value is 0 which means no expiration.
Returns:
The PasswordMaxIdleTime value

isPasswordValid

public boolean isPasswordValid(java.lang.String pass)
                        throws InvalidPasswordException
Deprecated. please use isPasswordValid(String pass, String logonId)

Check the validity of the password against the password policy Set the logonID of the user before with the method setUserName().
Parameters:
pass - password to check
Returns:
boolean is the password valid

isPasswordValid

public boolean isPasswordValid(java.lang.String pass,
                               java.lang.String logonId)
                        throws InvalidPasswordException
Check the validity of the password against the password policy
Parameters:
pass - password to check
logonId - logonID to check against the password.
Returns:
boolean is the password valid

isPasswordValidAtLogon

public boolean isPasswordValidAtLogon(java.lang.String pass,
                                      java.lang.String logonId)
                               throws InvalidPasswordException
Check the validity of the password against the password policy without the check if the password is in history.
Parameters:
pass - password to check
logonId - logonID to check against the password.
Returns:
boolean is the password valid

validatePassword

public java.lang.String validatePassword(java.lang.String pass)
Deprecated. please use validatePassword(String pass, String uid)

Check the validity of the password against the password policy. Set the logonID of the user before with the method setUserName().
Parameters:
pass - password to check
Returns:
the error message why the password is not valid or null

validatePassword

public java.lang.String validatePassword(java.lang.String pass,
                                         java.lang.String uid)
Check the validity of the password against the password policy.
Parameters:
pass - password to check
Returns:
the error message why the password is not valid or null

generatePassword

public java.lang.String generatePassword()
Generate a password for this security policy.
Returns:
a valid password

generatePassword

public java.lang.String generatePassword(java.lang.String userid)
Generate a password for this security policy.
Parameters:
userid - the user id to generate a password for
Returns:
a valid password

getLockAfterInvalidAttempts

public int getLockAfterInvalidAttempts()
Gets the Number of Allowed Logon Attempts (AllowedLogonAttempts) attribute of the ISecurityPolicy object
Returns:
The AllowedLogonAttempts value

setLockAfterInvalidAttempts

public void setLockAfterInvalidAttempts(int count)
Sets the Number of Allowed Logon Attempts (AllowedLogonAttempts) attribute of the ISecurityPolicy object
Parameters:
count - The new AllowedLogonAttempts value

getAutoUnlockTime

public int getAutoUnlockTime()
Gets the AutoUnlockTime(in seconds) attribute of the ISecurityPolicy object
Returns:
The AutoUnlockTime value

setAutoUnlockTime

public void setAutoUnlockTime(int time)
Sets the AutoUnlockTime(in seconds) attribute of the ISecurityPolicy object
Parameters:
time - The new AutoUnlockTime value

getPasswordMinLength

public int getPasswordMinLength()
Gets the Password Minimum Length(PasswordMinLength) attribute of the ISecurityPolicy object
Returns:
The PasswordMinLength value

setPasswordMinLength

public void setPasswordMinLength(int length)
Sets the Password Minimum Length(PasswordMinLength) attribute of the ISecurityPolicy object
Parameters:
length - The new PasswordMinLength value

getPasswordMaxLength

public int getPasswordMaxLength()
Gets the Password Maximum Length(PasswordMaxLength) attribute of the ISecurityPolicy object
Returns:
The PasswordMaxLength value

setPasswordMaxLength

public void setPasswordMaxLength(int length)
Sets the Password Maximum Length(PasswordMaxLength) attribute of the ISecurityPolicy object
Parameters:
length - The new PasswordMaxLength value

getUseridInPasswordAllowed

public boolean getUseridInPasswordAllowed()
Return a boolean indicating whether the password need to be different from the user id(uid).
Returns:
a boolean indicating whether the password need to be different from the user id(uid).

setUseridInPasswordAllowed

public void setUseridInPasswordAllowed(boolean pwnur)
Sets the boolean indicating whether the password need to be different from the user id(uid).
Parameters:
pwnur - a boolean indicating whether the password need to be different from the user id(uid).

getOldInNewAllowed

public boolean getOldInNewAllowed()
Return a boolean indicating whether the password need to be different from the old password.
Returns:
a boolean indicating whether the password need to be different from old password.

getEnforcePolicyAtLogon

public boolean getEnforcePolicyAtLogon()
Returns a boolean indicating whether users who have a productive password that doesn't match the security policy settings have to change it during password logon.
Returns:
whether the plolicy is enforced at logon or not.

setEnforcePolicyAtLogon

public void setEnforcePolicyAtLogon(boolean enforcePolicyAtLogon)
Sets whether users who have a productive password that doesn't match the security policy settings have to change it during password logon.
Parameters:
enforcePolicyAtLogon - specifies whether the plolicy is enforced at logon or not.

setOldInNewAllowed

public void setOldInNewAllowed(boolean allow)
Sets the boolean indicating whether the password need to be different from the old password.
Parameters:
allow - a boolean indicating whether the password need to be different from old password.

getPasswordMixCaseRequired

public int getPasswordMixCaseRequired()
Return a number indicating how many capical and lower case letters the password must contain.
Returns:
number of required both capical and lower case letters.

setPasswordMixCaseRequired

public void setPasswordMixCaseRequired(int number)
Sets the number indicating how many capical and lower case letters the password must contain.
Parameters:
number - the number of both capical and lower case letters.

getLogonIdLowerCaseRequired

public int getLogonIdLowerCaseRequired()
Return a number indicating how many capical and lower case letters the logon id must contain.
Returns:
number of required both capical and lower case letters.

setLogonIdLowerCaseRequired

public void setLogonIdLowerCaseRequired(int number)
Sets the number indicating how many capical and lower case letters the logon id must contain.
Parameters:
number - the number of both capical and lower case letters.

getPasswordAlphaNumericRequired

public int getPasswordAlphaNumericRequired()
Return the number indicating how many alphabets and numeric values the password must contain.
Returns:
number of required both alphabets and numeric values.

setPasswordAlphaNumericRequired

public void setPasswordAlphaNumericRequired(int number)
Sets the number indicating how many alphabets and numeric values the password must contain.
Parameters:
number - the number of required both alphabets and numeric values.

getLogonIdNumericDigitsRequired

public int getLogonIdNumericDigitsRequired()
Return the number indicating how many alphabets and numeric values the logon id must contain.
Returns:
number of required both alphabets and numeric values.

setLogonIdNumericDigitsRequired

public void setLogonIdNumericDigitsRequired(int number)
Sets the number indicating how many alphabets and numeric values the logon id must contain.
Parameters:
number - the number of required both alphabets and numeric values.

getPasswordSpecialCharRequired

public int getPasswordSpecialCharRequired()
Return the number indicating how many special characters the password must contain.
Returns:
a number indicating whether the password has to include both alphabets and numeric values Return the boolean indicating whether the password has to include special character

setPasswordSpecialCharRequired

public void setPasswordSpecialCharRequired(int number)
Sets the number indicating how many special characters the password must contain.
Parameters:
number - the number of required special characters.

getPasswordExpiredDays

public int getPasswordExpiredDays()
Return the numbers of days the password is set to expired. If the return value is 0, that means the password does not expired.
Returns:
The numbers of days the password is set to expired

getPasswordHistory

public int getPasswordHistory()
Gets the PasswordHistory attribute of the SecurityPolicy object. If the return value is 0, that means that no password history is used.
Returns:
The PasswordHistory value

setPasswordExpiredDays

public void setPasswordExpiredDays(int days)
Sets the numbers of days the password is to be expired. If the value is set to be 0, that means the password will not expired.
Parameters:
days - The numbers of days the password is set to expired

setPasswordHistory

public void setPasswordHistory(int length)
Sets the PasswordHistory attribute of the SecurityPolicy object
Parameters:
length - The new PasswordHistory value

getPasswordChangeAllowed

public boolean getPasswordChangeAllowed()
Return the boolean value indicating whether the password is allowed to be changed.
Returns:
A boolean value indicating whether the password is allowed to be changed

setPasswordChangeAllowed

public void setPasswordChangeAllowed(boolean pca)
Sets the boolean value indicating whether the password is allowed to be changed.
Parameters:
pca - The boolean value indicating whether the password is allowed to changed

getPasswordChangeRequired

public boolean getPasswordChangeRequired()
Return the boolean value indicating whether the password is enforced to change at the first logon.
Returns:
A boolean value indicating whether the password is enforced to change

setPasswordChangeRequired

public void setPasswordChangeRequired(boolean pca)
Sets the boolean value indicating whether the password is enforced to change.
Parameters:
pca - The boolean value indicating whether the password is enforced to change

getLogonIdMinLength

public int getLogonIdMinLength()
Return the integer value indicating the minimum length of a logon id.
Returns:
The integer value indicating the minimum length of a logon id.

setLogonIdMinLength

public void setLogonIdMinLength(int length)
Sets the integer value indicating the minimum length of a logon id.
Parameters:
length - integer value indicating the minimum length of a logon id.

getLogonIdMaxLength

public int getLogonIdMaxLength()
Return the integer value indicating the maximum length of a logon id.
Returns:
The integer value indicating the maximum length of a logon id.

setLogonIdMaxLength

public void setLogonIdMaxLength(int length)
Sets the integer value indicating the maximum length of a logon id.
Parameters:
length - integer value indicating the maximum length of a logon id.

getLogonIdSpecialCharRequired

public int getLogonIdSpecialCharRequired()
Return a number indicating how many special characters the logon id must contain.
Returns:
number of required special characters.

setLogonIdSpecialCharRequired

public void setLogonIdSpecialCharRequired(int number)
Sets the number indicating how many special characters the logon id must contain.
Parameters:
number - the number of special characters.

isLogonIdValid

public boolean isLogonIdValid(java.lang.String logonId)
                       throws InvalidLogonIdException
Check the validity of the logon id against the security policy
Parameters:
logonId - logonid to check
Returns:
boolean true if the logon id is valid
Throws:
InvalidLogonIdException - if the logon id is invalid

generateLogonId

public java.lang.String generateLogonId()
                                 throws InvalidLogonIdException
Generate a logon id for this security policy.
Returns:
a valid logon id
Throws:
InvalidLogonIdException - if security policy configuration cannot be fullfilled

getCertLogonRequired

public boolean getCertLogonRequired()
Deprecated.  


setCertLogonRequired

public void setCertLogonRequired(boolean clr)
Deprecated.  


getCookieLifeTime

public int getCookieLifeTime()
Deprecated.  


setCookieLifeTime

public void setCookieLifeTime(int lifeTime)
Deprecated.  


setUserName

public void setUserName(java.lang.String id)
Deprecated.  


getLocalizedMessage

public java.lang.String getLocalizedMessage(java.util.Locale locale,
                                            java.lang.Exception ex)
Return a localized password exception message for the given key.
Parameters:
locale - the locale
ex - the exception which hold the key as message
Returns:
the localized message or when not available

getLocalizedMessage

public java.lang.String getLocalizedMessage(java.util.Locale locale,
                                            java.lang.String key)
Return a localized password exception message for the given key.
Parameters:
locale - the locale
key - the key
Returns:
the localized message or when not available

getPasswordImpermissiblePattern

public java.lang.String getPasswordImpermissiblePattern()
Returns a comma-separated list of impermissible passwords. The list contains character combinations or terms, where the asterisk (*) and question mark (?) can be used as placeholders. Asterisk (*) stands for a character sequence, and the question mark (?) for a single character.
Returns:
impermissible password pattern

setPasswordImpermissiblePattern

public void setPasswordImpermissiblePattern(java.lang.String forbiddenPattern)
Sets Returns a comma-separated list of impermissible passwords. The list contains character combinations or terms, where the asterisk (*) and question mark (?) can be used as placeholders. Asterisk (*) stands for a character sequence, and the question mark (?) for a single character.
Parameters:
forbiddenPattern - The _passwordForbiddenPattern to set.
Returns:
forbidden password pattern

getUniqueID

public java.lang.String getUniqueID()
Gets the unique identifier which unambiguously identifies the object's principal type and principal's data record(s) in the data store (e.g. a relational database).

Note: the unique ID is a case sensitive string

Use this identifier to keep and persist references to principals. As this identifier contains internal information and is usually not readable, it should not be displayed in user interfaces.

UME implementation guarantees to return Strings which are not longer than 255 characters.

Returns:
a non-null String identifying this security policy

getUniqueName

public java.lang.String getUniqueName()
Get uniqueName of this ISecurityPolicy object. A (usually) unique readable name of an instance of ISecurityPolicy.

Note: Depending on the persistence layer it is not guaranteed that this name is unique. The uniqueName may change over time. Thus, do not persist the uniqueName. Always use the unique identifier (UniqueID) of getUniqueID() for this purpose.

Use the uniqueName for searching and displaying in user interfaces.

Returns:
uniqueName of ISecurityPolicy

commit

public void commit()
            throws UMException
Commit saved Security Policy to the principal store. Calling one of commit() or rollback will be required to unlock the Security Policy if the SecurityPolicy factory employs pessimistic locking. Note: This method will throw a
Throws:
UMException - if the data can't be committed to the principal store.

rollback

public void rollback()
Roll back (i.e. discard) the changes applied to a security policy object up to the point until the latest call of commit. Calling one of commit() or rollback will be required to unlock the security policy if the security policy factory employs pessimistic locking.

save

public void save()
          throws UMException
Call this function to save/update the security policy data. However, the data will not be stored permanently until commit() is called. rollback() may be called to revert back to the old state. rollback() must be called to release the resources (like db connections) and locks (if implemented). The purpose of this method is to simulate a commit operation. Instead of committing the changes the data store checks if there are potential errors which would prevent the principal to be stored successfully. This method can be called optionally before doing a commit. Depending on the data store which is used to store security policies there might be different UMExceptions which could be thrown.