Class EnrollmentToken

java.lang.Object
org.elasticsearch.xpack.core.security.EnrollmentToken

public class EnrollmentToken extends Object
  • Field Details

  • Constructor Details

    • EnrollmentToken

      public EnrollmentToken(String apiKey, String fingerprint, List<String> boundAddress)
      Create an EnrollmentToken
      Parameters:
      apiKey - API Key credential in the form apiKeyId:ApiKeySecret to be used for enroll calls
      fingerprint - hex encoded SHA256 fingerprint of the HTTP CA cert
      boundAddress - IP Addresses and port numbers for the interfaces where the Elasticsearch node is listening on
  • Method Details

    • getApiKey

      public String getApiKey()
    • getFingerprint

      public String getFingerprint()
    • getVersion

      public String getVersion()
    • getBoundAddress

      public List<String> getBoundAddress()
    • getRaw

      public String getRaw() throws Exception
      Throws:
      Exception
    • getEncoded

      public String getEncoded() throws Exception
      Throws:
      Exception
    • decodeFromString

      public static EnrollmentToken decodeFromString(String encoded) throws IOException
      Decodes and parses an enrollment token from its serialized form (created with getEncoded()
      Parameters:
      encoded - The Base64 encoded JSON representation of the enrollment token
      Returns:
      the parsed EnrollmentToken
      Throws:
      IOException - when failing to decode the serialized token
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object