Help creating a java custom passwordValidator class

This topic has 2 replies, 2 voices, and was last updated 8 months, 2 weeks ago by d.rosales.carranza.

  • Author
  • #26940

    Hi everyone i have to code a custom passwordValidator extending java class for opendj 3.5, and i cannot find an example that i can reuse, i found in the opends/server/extensions some password validators, but the question is if i create my custom class just paste it there and can i use it or what are the step for doing this, im new in this and i will very glad if some one could help me thanks

     Bill Nelson


    Take a look in the config/config.ldif; this file is a persistent representation of the configuration settings for your DS instance. In that file, you will find several existing password validators contained in the cn=Password Validators,cn=config container. Each validator has an associated java class as specified by the ds-cfg-java-class attribute; this is a pointer to your custom validator and must be found in your java class path. The other properties in the entry allow you to configure the validator at start time (rather than being hard coded).

    Once you have your custom validator, you can then use the dsconfig command to create the password validator as follows:

    dsconfig create-password-validator --set java-class:{{Your Custom Validator}} --set enabled:false --type custom --validator-name "Get Off My Pass" --hostname localhost --port 6444 --bindDn "cn=directory manager" --trustAll --bindPassword {{Your rootDN Password}} --no-prompt

    Or run the command in interactive mode.


    how did you config the logs that you use in the custom class

    LocalizableMessage message =
    throw new ConfigException(message);

    How did you build that custom ERR_CUSTOM_VALIDATOR_LOG_FOR_PROPERTIES for my class, and other properties files so i can use it and, include those in my running opendj

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

©2020 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?