skip to main content
Hybrid Data Pipeline API reference : Password Policy API : Get Password Policy
  

Try Now

Get Password Policy

Purpose

Returns the details of the enforced Password Policy

URL

https://<myserver>:<port>/api/public/passwordpolicy

Method

GET

URL Parameters

<myserver> is the hostname or IP address of the machine hosting the Hybrid Data Pipeline server for a standalone installation, or the machine hosting the load balancer for a load balancer installation. For a standalone installation, <port> is the port number specified as the Server Access Port during installation. For a load balancer installation, <port> must be either 80 for http or 443 for https. Whenever port 80 or 443 are used, it is not necessary to include the port number in the URL.
Parameter
Description
"id"
Password Policy id
"name"
Password Policy Name
"description"
Password Policy Description
"policyDefinition"
The definition of the password policy. Contains information about which rules are enforced in the password policy. Each rule has an associated ruleId, a rule title and a rule name. The rule name can be PASSWORD_LENGTH or PASSWORD_RULE_GROUP, available in HDP Password rules repository.

Sample Server Response

If the default password policy is enabled, the response will take the following format.

{
"passwordPolicy": {
"rules": [{
"ruleId": "pwdLengthRule",
"ruleName": "PASSWORD_LENGTH_RULE",
"title": "Contains atleast 8 characters",
"properties": {
"minLength": 8,
"maxLength": 12
}
}, {
"ruleId": "pwdUserNameRule",
"ruleName": "CHECK_USERNAME_RULE",
"title": "Password should not contain username",
"properties": {
"containsPortionOfUserName": false
}
}, {
"ruleId": "characterRulesGroup",
"ruleName": "PASSWORD_RULE_GROUP",
"title": "Can contain characters from these three classes",
"properties": {
"minRulesPassed": 3,
"memberRules": [{
"ruleId": "uppercaseLetterRule",
"ruleName": "CHARACTER_CLASS_RULE",
"title": "Upper Case Letters A-Z",
"properties": {
"charClass": "[A-Z]",
"minChars": 1
}
}, {
"ruleId": "lowerCaseLetterRule",
"ruleName": "CHARACTER_CLASS_RULE",
"title": "Lower Case Letters a-z",
"properties": {
"charClass": "[a-z]",
"minChars": 1
}
}, {
"ruleId": "numericRule",
"ruleName": "CHARACTER_CLASS_RULE",
"title": "Numbers 0-9",
"properties": {
"charClass": "[0-9]",
"minChars": 1
}
}, {
"ruleId": "specialCharRule",
"ruleName": "CHARACTER_CLASS_RULE",
"title": "Non-white space special characters",
"properties": {
"charClass": "[^A-Za-z0-9]",
"nonBlankSpace": true,
"minChars": 1
}
}]
}
}]
}
}
If the Default Password Policy is disabled using System Configuration options, the response will be as follows:
Status code: 200
Successful response
{
"passwordValidationResponse":
{
"passed": true
}
}

Sample Server Failure Response

{
"error": {
"code": 222206007,
"message": {
"lang": "en-US",
"value": "Invalid user ID or password."
}
}
}

Authentication/Authorization

No authentication/authorization needed for this API.