From 9d758f9166e6af76589ab403a6ee5ec22792bc64 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Wed, 10 May 2023 02:31:35 -0400 Subject: [PATCH] Use ExtensionsManager.lookupExtensionSettingsById when verifying extension unique id (#2749) Signed-off-by: Craig Perkins --- .../opensearch/security/transport/SecurityRequestHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/opensearch/security/transport/SecurityRequestHandler.java b/src/main/java/org/opensearch/security/transport/SecurityRequestHandler.java index 860f955292..c6c80ba50e 100644 --- a/src/main/java/org/opensearch/security/transport/SecurityRequestHandler.java +++ b/src/main/java/org/opensearch/security/transport/SecurityRequestHandler.java @@ -338,7 +338,7 @@ protected void addAdditionalContextValues(final String action, final TransportRe String extensionUniqueId = getThreadContext().getHeader("extension_unique_id"); if (extensionUniqueId != null) { ExtensionsManager extManager = OpenSearchSecurityPlugin.GuiceHolder.getExtensionsManager(); - if (extManager.lookupInitializedExtensionById(extensionUniqueId).isPresent()) { + if (extManager.lookupExtensionSettingsById(extensionUniqueId).isPresent()) { getThreadContext().putTransient(ConfigConstants.OPENDISTRO_SECURITY_SSL_TRANSPORT_EXTENSION_REQUEST, Boolean.TRUE); } }