Class NativeRealmValidationUtil

java.lang.Object
org.elasticsearch.xpack.core.security.support.NativeRealmValidationUtil

public final class NativeRealmValidationUtil extends Object
Provides utility methods for validating user and role names stored in the native realm. Note: This class is a wrapper of the Validation which allow names to have MAX_NAME_LENGTH.
  • Field Details

    • MAX_NAME_LENGTH

      public static final int MAX_NAME_LENGTH
      In the native realm, the maximal user and role name lenght is influenced by the maximal document ID (see IndexRequest.MAX_DOCUMENT_ID_LENGTH_IN_BYTES). Because the document IDs are prefixed by either user- or role-, the actual possible max length is 507 chars. Note: If we choose (in the future) to allow more than 507 chars we should either consider increasing the max allowed size for document ID or consider hashing names longer than 507 in order to fit into document ID.
      See Also:
  • Method Details