diff --git a/halyard-config/src/main/java/com/netflix/spinnaker/halyard/config/validate/v1/security/LdapValidator.java b/halyard-config/src/main/java/com/netflix/spinnaker/halyard/config/validate/v1/security/LdapValidator.java index 85fa653196..edecf9f2b4 100644 --- a/halyard-config/src/main/java/com/netflix/spinnaker/halyard/config/validate/v1/security/LdapValidator.java +++ b/halyard-config/src/main/java/com/netflix/spinnaker/halyard/config/validate/v1/security/LdapValidator.java @@ -46,27 +46,27 @@ public void validate(ConfigProblemSetBuilder p, Ldap ldap) { switch (UserSearchMethod.toUserSearchMethod(ldap)) { case DN_PATTERN: // fall through. - case SEARCH_AND_OR_FILTER: + case SEARCH_AND_OR_BASE: break; case UNSPECIFIED_OR_INVALID: // fall through. default: p.addProblem( Problem.Severity.ERROR, "No valid user search method defined. Please " - + "specify with either --user-dn-pattern OR (--user-search-base and/or --user-search-filter)."); + + "specify with either --user-dn-pattern OR (--user-search-filter with an optional --user-search-base)."); } } enum UserSearchMethod { UNSPECIFIED_OR_INVALID, DN_PATTERN, - SEARCH_AND_OR_FILTER; + SEARCH_AND_OR_BASE; static UserSearchMethod toUserSearchMethod(Ldap ldap) { if (StringUtils.isNotEmpty(ldap.getUserDnPattern())) { return DN_PATTERN; } else if (StringUtils.isNotEmpty(ldap.getUserSearchFilter())) { - return SEARCH_AND_OR_FILTER; + return SEARCH_AND_OR_BASE; } return UNSPECIFIED_OR_INVALID; }