Updated on 2025-08-11 GMT+08:00

Validating Password Strength

Function

This API is used to verify the security of user root password. Before calling this API:

URI

POST /v3/{project_id}/weak-password-verification

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

Request Parameters

Table 2 Parameter description

Name

Mandatory

Type

Description

password

Yes

String

Definition

Password of the database account.

Constraints

N/A

Range

It must contain 8 to 32 characters, including at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters. Supported special characters: ~ ! @ # % ^ * - _ = + ? ,

Default Value

N/A

Response Parameters

Table 3 Parameter description

Parameter

Type

Description

is_weak_password

Boolean

Definition

Whether the password is weak.

Range

  • true: It is a weak password.
  • false: It is not a weak password.

Example Request

Checking whether the password of a database account is weak
POST https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/weak-password-verification
{ 
  "password" : "******" 
}

Example Response

Weak password verification succeeded.

{ 
  "is_weak_password" : false 
}

Status Codes

Error Codes

For details, see Error Codes.