Class LdapConfiguration.SearchConfiguration

java.lang.Object
io.micronaut.security.ldap.configuration.LdapConfiguration.SearchConfiguration
Enclosing class:
LdapConfiguration

@ConfigurationProperties("search") public static class LdapConfiguration.SearchConfiguration extends Object
The user search configuration.
Since:
1.0
Author:
James Kleeh
  • Field Details

  • Constructor Details

    • SearchConfiguration

      public SearchConfiguration()
  • Method Details

    • getDecoyDn

      public @Nullable String getDecoyDn()
      Returns:
      The DN of the decoy entry bound when a username matches no entry, or null for a random non-existent entry
      Since:
      5.5.2
    • setDecoyDn

      public void setDecoyDn(@Nullable String decoyDn)
      Sets the DN bound, with the supplied password, when a username matches no directory entry, so that an unknown username costs the application the same bind round trip as a wrong password. Defaults to a random non-existent entry under the search base, which equalises only the client-side cost. Point it at a real account with an unmatchable password, excluded from any lockout policy, to also equalise directory-side work (password hashing, bad-password counters).
      Parameters:
      decoyDn - The decoy DN
      Since:
      5.5.2
    • isSubtree

      public boolean isSubtree()
      Returns:
      True if the subtree should be searched
    • setSubtree

      public void setSubtree(boolean subtree)
      Sets if the subtree should be searched. Default true
      Parameters:
      subtree - The subtree
    • getBase

      public String getBase()
      Returns:
      The base DN to search from
    • setBase

      public void setBase(String base)
      Sets the base DN to search.
      Parameters:
      base - The base DN
    • getFilter

      public String getFilter()
      Returns:
      The search filter
    • setFilter

      public void setFilter(String filter)
      Sets the search filter. Default "(uid={0})"
      Parameters:
      filter - The search filter
    • getAttributes

      public String[] getAttributes()
      Returns:
      The attributes to return. Null if all
    • setAttributes

      public void setAttributes(String[] attributes)
      Sets the attributes to return. Default all
      Parameters:
      attributes - The attributes
    • getSettings

      public SearchSettings getSettings(Object[] arguments)
      Parameters:
      arguments - The search arguments
      Returns:
      The settings to search for a user