Password policy gruop provides policies for password control.
More...
Password policy gruop provides policies for password control.
Password policy group provides policies for password control
Required Header
#include <mdm.h>
Overview
This group provides APIs to control the settings related to the device password.
PASSWORD QUALITY.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.2.1.1
- See also
- mdm_set_password_quality
Enumerator |
---|
MDM_PASSWORD_QUALITY_UNSPECIFIED |
No requirements for password.
|
MDM_PASSWORD_QUALITY_SIMPLE_PASSWORD |
Eas requirement for simple password
|
MDM_PASSWORD_QUALITY_SOMETHING |
Some kind password is required, but doesn't care what it is
|
MDM_PASSWORD_QUALITY_NUMERIC |
Containing at least numeric characters
|
MDM_PASSWORD_QUALITY_ALPHABETIC |
Containing at least alphabetic (or other symbol) characters
|
MDM_PASSWORD_QUALITY_ALPHANUMERIC |
Containing at least numeric and alphabetic characters
|
Definition at line 38 of file password.h.
API to remove all password patterns.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.2.1.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin removes all password patterns.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.password
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_set_password_pattern, mdm_get_password_pattern
API to enforce password change.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- The API enforces changing an existing password (or enforces creating a password if the device has none). An administrator can use this API to present to the user a password dialog to change a password or set up a new password.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.password
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_set_password_quality
API to retrieve the forbidden strings which cannot be used in the device password.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.2.1.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can retrieve the strings which are forbidden in the device password. Personal data (variations on the user's name, email address or X400 address) are examples of data which can be forbidden. If more than one admin has set this value then the effective forbidden string list is the concatenation of the forbidden strings specified by all admins.
if (lp_data) {
GList *lp_list = (GList *)lp_data->
data;
if (lp_list) {
lp_list = g_list_first(lp_list);
while (lp_list && lp_list->data) {
printf("%s", (char *) lp_list->data);
lp_list = g_list_next(lp_list);
}
}
}
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- See also
- mdm_set_forbidden_strings
mdm_result_t mdm_get_max_inactivity_time_device_lock |
( |
int * |
p_value | ) |
|
API to get the maximum time to lock.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Called by an application that is managing the device to get the value of timeout period.
int n_value = 0;
{
}
else
{
}
- Parameters
-
[out] | p_value | Returned maximum time before locking the device. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- See also
- mdm_set_max_inactivity_time_device_lock
mdm_result_t mdm_get_maximum_character_occurrences |
( |
int * |
p_value | ) |
|
API to get the maximum number of times a character can occur in the device password.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can retrieve the maximum number of times a character can occur in the device password. If more than one admin has set this value then the least value will take preference.
int n_value = 0;
int n_num = n_value;
} else {
}
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- See also
- mdm_set_maximum_character_occurrences
mdm_result_t mdm_get_maximum_numeric_sequences_length |
( |
int * |
p_value | ) |
|
API to get the maximum numeric sequence length allowed in the device password.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.2.1.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can retrieve the length of numeric sequences which are allowed in the device password. For instance, if the return value is '3' then "123", "987", "555" would all be numeric sequences of length '3' and will be allowed in the device password. If more than one admin has set this value then the least value will take preference.
int n_value = 0;
int n_length = n_value;
} else {
}
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- See also
- mdm_set_maximum_numeric_sequences_length
API to get password policy.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This call returns mdm_password_policy_t structure containing the complete description of password policy.
if (lp_data != NULL)
{
}
else
{
}
- Returns
- mdm_password_policy_t on success, NULL on failure.
- See also
- mdm_password_policy_t
API to reset password.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- mdm_reset_password function resets the current password ignoring the restrictions introduced by the following calls:
- mdm_set_password_history,
- mdm_set_password_quality,
- mdm_set_password_minimum_length,
- mdm_set_password_pattern,
- mdm_set_maximum_character_occurences,
- mdm_set_maximum_numeric_sequences_length,
- mdm_set_forbidden_strings.
The given password must meet 2 conditions:
- maximum number of attempts has not been exceeded,
- number of days to expire has not been exceeded.
The current password is not checked.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.password
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_set_password_history,
-
mdm_set_password_quality,
-
mdm_set_password_minimum_length,
-
mdm_set_password_pattern,
-
mdm_set_maximum_character_occurrences,
-
mdm_set_maximum_numeric_sequences_length,
-
mdm_set_forbidden_strings.
mdm_result_t mdm_set_forbidden_strings |
( |
void * |
p_string_list | ) |
|
API to set strings which are forbidden in the device password.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.2.1.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Called by an admin that is managing the device to set strings that are forbidden to be used in the device password. This specifies any strings which must not be present in the device password such as personal data (variations on the user's name, email address or X400 address), or any other strings. If the parameter list has only one blank string ("") or NULL, then the stored strings are cleared.
GList *lp_List = NULL;
lp_List = g_list_append(lp_List, g_strdup("test"));
lp_List = g_list_append(lp_List, g_strdup("samsung"));
} else {
}
g_list_foreach((GList *)lp_List, (GFunc)g_free, NULL);
g_list_free((GList *)lp_List);
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.password
- Parameters
-
[in] | p_string_list | Forbidden string list (GList). It might be NULL if one wants to clear the list. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_forbidden_strings
mdm_result_t mdm_set_max_inactivity_time_device_lock |
( |
int |
value | ) |
|
API to set the maximum time to lock.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.2.1.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Called by an application to set the maximum time for user activity until the device will lock. This limits the length that the user can set. It takes effect immediately. The value is rounded up to
- 15, when 0 < value < 15,
- 30, when 15 < value < 30,
- 60, when 30 < value < 60,
- 120, when 60 < value < 120,
- 300, when 120 < value < 300,
- 600, when 300 < value.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.password
- Parameters
-
[in] | value | The new desired maximum time to lock in seconds. A value of 0 means there is no restriction. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_max_inactivity_time_device_lock
mdm_result_t mdm_set_maximum_character_occurrences |
( |
int |
n_value | ) |
|
API to set the maximum number of times a character can occur in the device password.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.2.1.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Called by an admin that is managing the device to specify that any character in the device password cannot occur more than the specified maximum number of times. Characters can be numeric or alphabetic or symbolic. "aaabcde" has 'a' which occurs 3 times, "1b1c1de" has '1' which occurs 3 times and "a@b@c@" has '@' which occurs 3 times. A value of '0' specifies that no restrictions are applied
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.password
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_maximum_character_occurrences
mdm_result_t mdm_set_maximum_failed_password_for_wipe |
( |
int |
value | ) |
|
API to set the maximum failed passwords, before device is wiped.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.2.1.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Setting this to a value greater than zero enables a built-in policy, that will perform a device wipe after too many incorrect device-unlock passwords have been entered. If the maximum count is reached, the device will be wiped immediately.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.password
- Parameters
-
[in] | value | The number of failed password attempts, before the device will wipe its data. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_password_policy
-
mdm_password_policy_t
mdm_result_t mdm_set_maximum_numeric_sequences_length |
( |
int |
n_value | ) |
|
API to set the maximum length of the numeric sequence which is allowed in the device password.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.2.1.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- API called by MDM admin to set the length of the maximum numerical sequence. A numerical sequence is a set of consecutive integers ordered increasingly (e.g. 4,5,6,7), decreasingly (e.g. 7,6,5,4) or a set of constant integers (e.g. 5,5,5,5). This function specifies that the device password must not contain numerical sequences longer than n_value. E.g. if the maximum value is set to '5' then "123456", "987654" or "555555" are not allowed. '0' argument means that no numerical sequence restriction is imposed.
- Warning
- On some devices the maximum length of numerical sequences may be fixed and not modifiable.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.password
- Parameters
-
[in] | | n_value | Maximum length of numerical sequence. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_maximum_numeric_sequences_length
mdm_result_t mdm_set_min_password_complex_chars |
( |
int |
value | ) |
|
API to set minimum complex char in password.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.2.1.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Called by an application that manages the device to set the minimum number of complex (numbers and symbols) characters in the password. An administrator can configure this setting so as to make the password more secure.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.password
- Parameters
-
[in] | value | Number of complex characters required in the password. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_password_policy
API to set the number of days password expires.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.2.1.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Called by an application that manages the device to set the maximum password age in days after which the password must be changed. An administrator can configure the password age to force the user to enter a new password after every expiration period as a means of enhancing security.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.password
- Parameters
-
[in] | value | Number of days after which the password expires. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_password_policy
-
mdm_password_policy_t
API to set the number of previous passwords, that the user cannot use when prompted to change the password.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.2.1.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Called by an application that manages the device to set the maximum password history. An administrator can configure the number of previous passwords that cannot be used when entering a new password. This setting enhances security.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.password
- Parameters
-
[in] | value | Number of previous passwords, that cannot be used when setting a new password. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_password_policy
-
mdm_password_policy_t
API to set password's minimum length.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.2.1.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can set the minimum allowed password length. After setting this, the user will not be able to enter a new password that is not at least as restrictive as what has been set. Note that the current password will remain until the user has set a new one, so the change does not take place immediately.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.password
- Parameters
-
[in] | value | The new desired minimum password length. A value of 0 means that there is no restriction. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_password_policy
-
mdm_password_policy_t
API to set the required password pattern.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.2.1.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Force User to enter password based on a regular expression.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.password
- Parameters
-
[in] | p_pattern | Regular expression with password pattern. For example, if regular expression is [a-zA-Z]{4}[0-9]{4}, the administrator can force the user to enter a 8-character password with the first 4 characters alphabetic and next 4 characters numeric. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_delete_password_pattern, mdm_get_password_pattern
API to set password quality.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.2.1.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can set the password restrictions it is imposing. After setting this, the user will not be able to enter a new password that is not at least as restrictive as what has been set.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.password
- Parameters
-
[in] | pwd_quality | The new desired quality. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_password_policy
-
mdm_password_policy_t
-
mdm_password_quality_t