Module org.elasticsearch.security
Class InternalEnrollmentTokenGenerator
java.lang.Object
org.elasticsearch.xpack.security.enrollment.BaseEnrollmentTokenGenerator
org.elasticsearch.xpack.security.enrollment.InternalEnrollmentTokenGenerator
-
Field Summary
Fields inherited from class org.elasticsearch.xpack.security.enrollment.BaseEnrollmentTokenGenerator
ENROLL_API_KEY_EXPIRATION_MINUTES -
Constructor Summary
ConstructorsConstructorDescriptionInternalEnrollmentTokenGenerator(Environment environment, SSLService sslService, Client client) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateKibanaEnrollmentToken(Consumer<EnrollmentToken> consumer, Iterator<org.elasticsearch.core.TimeValue> backoff) Creates an enrollment token for Kibana instances enrolling to the current node.voidmaybeCreateNodeEnrollmentToken(Consumer<String> consumer, Iterator<org.elasticsearch.core.TimeValue> backoff) Tries to create an enrollment token for Elasticsearch nodes enrolling to the current node.
-
Constructor Details
-
InternalEnrollmentTokenGenerator
public InternalEnrollmentTokenGenerator(Environment environment, SSLService sslService, Client client)
-
-
Method Details
-
maybeCreateNodeEnrollmentToken
public void maybeCreateNodeEnrollmentToken(Consumer<String> consumer, Iterator<org.elasticsearch.core.TimeValue> backoff) Tries to create an enrollment token for Elasticsearch nodes enrolling to the current node. If node is bound only on localhost for either the transport or the HTTPS interface, no token is generated, in which case an empty string token is returned. In case of errors, including due to issues with the node's configuration, anulltoken is returned, and the exception is logged but no exception is thrown. -
createKibanaEnrollmentToken
public void createKibanaEnrollmentToken(Consumer<EnrollmentToken> consumer, Iterator<org.elasticsearch.core.TimeValue> backoff) Creates an enrollment token for Kibana instances enrolling to the current node. In case of errors, including due to issues with the node's configuration, anulltoken is returned, and the exception is logged but no exception is thrown. -
getHttpsCaFingerprint
- Throws:
Exception
-