{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-identity-platform/json-schema/google-identity-platform-google-cloud-identitytoolkit-v2-password-policy-schema.json",
  "title": "GoogleCloudIdentitytoolkitV2PasswordPolicy",
  "description": "Configuration for password policy.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-identity-platform-v2-api-openapi.yml#/components/schemas/GoogleCloudIdentitytoolkitV2PasswordPolicy",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "type": "integer",
      "description": "Output only. schema version number for the password policy",
      "readOnly": true,
      "format": "int32"
    },
    "forceUpgradeOnSignin": {
      "type": "boolean",
      "description": "Users must have a password compliant with the password policy to sign-in."
    },
    "enforcementState": {
      "readOnly": true,
      "enum": [
        "ENFORCEMENT_STATE_UNSPECIFIED",
        "OFF",
        "ENFORCE"
      ],
      "type": "string",
      "description": "Output only. Which enforcement mode to use for the password policy."
    },
    "customStrengthOptions": {
      "$ref": "#/$defs/GoogleCloudIdentitytoolkitV2CustomStrengthOptions",
      "description": "The custom strength options enforced by the password policy."
    },
    "allowedNonAlphanumericCharacters": {
      "type": "array",
      "description": "Output only. Allowed characters which satisfy the non_alphanumeric requirement.",
      "readOnly": true,
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "GoogleCloudIdentitytoolkitV2CustomStrengthOptions": {
      "description": "Custom strength options to enforce on user passwords.",
      "properties": {
        "containsNonAlphanumericCharacter": {
          "type": "boolean",
          "description": "The password must contain a non alpha numeric character."
        },
        "minPasswordLength": {
          "type": "integer",
          "description": "Minimum password length. Range from 6 to 30",
          "format": "int32"
        },
        "containsLowercaseCharacter": {
          "type": "boolean",
          "description": "The password must contain a lower case character."
        },
        "containsNumericCharacter": {
          "description": "The password must contain a number.",
          "type": "boolean"
        },
        "containsUppercaseCharacter": {
          "description": "The password must contain an upper case character.",
          "type": "boolean"
        },
        "maxPasswordLength": {
          "type": "integer",
          "format": "int32",
          "description": "Maximum password length. No default max length"
        }
      },
      "type": "object"
    }
  }
}