Interface SecretStrengthPolicy


public interface SecretStrengthPolicy
Specification of a secret strength policy validator.

Used to validate strength of secrets (passwords, keys, salts) in the configuration, and in case a weak one is identified it throws a WeakSecretException.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    validate(String label, CharSequence secret)
    Validate a secret.
  • Method Details

    • validate

      void validate(String label, CharSequence secret) throws WeakSecretException
      Validate a secret.

      Normal return is expected if the secret is secure as defined by the implementation of this spec. Exception thrown WeakSecretException otherwise.

      Parameters:
      label - the secret label, (e.g. LDAP password) used to construct a human friendly message for the exception
      secret - the actual secret value, the one to evaluate.
      Throws:
      WeakSecretException