If you have a verify function defined for a profile that a user belongs to you can't just change your password by sending in the new password. You must pass in the current and new passwords. This shouldn't be a problem as we have the current and new passwords saved in the secrets manager. The syntax for the change password when using a validate function is the following.
sql = 'ALTER USER %s IDENTIFIED BY "%s" REPLACE "%s"' % (
escaped_username,
pending_dict["password"],
current_pass,
)
You should be able to get the current_pass by looking at the current_dict or previous_dict depending on which one you are able to connect to the database with.