From e42e4d3568d25b00507f88a0fc533db7664bacfb Mon Sep 17 00:00:00 2001 From: Ryan Liang <109499885+RyanL1997@users.noreply.github.com> Date: Mon, 14 Aug 2023 10:12:58 -0700 Subject: [PATCH] [Feature/Extension] Remove hostmapping from create OBO endpoint. (#3161) Signed-off-by: Ryan Liang --- .../security/action/onbehalf/CreateOnBehalfOfTokenAction.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/opensearch/security/action/onbehalf/CreateOnBehalfOfTokenAction.java b/src/main/java/org/opensearch/security/action/onbehalf/CreateOnBehalfOfTokenAction.java index 69c51482b2..4a9c1b5b80 100644 --- a/src/main/java/org/opensearch/security/action/onbehalf/CreateOnBehalfOfTokenAction.java +++ b/src/main/java/org/opensearch/security/action/onbehalf/CreateOnBehalfOfTokenAction.java @@ -128,9 +128,7 @@ public void accept(RestChannel channel) throws Exception { final String service = (String) requestBody.getOrDefault("service", "self-issued"); final User user = threadPool.getThreadContext().getTransient(ConfigConstants.OPENDISTRO_SECURITY_USER); - final TransportAddress caller = threadPool.getThreadContext() - .getTransient(ConfigConstants.OPENDISTRO_SECURITY_REMOTE_ADDRESS); - Set mappedRoles = mapRoles(user, caller); + Set mappedRoles = mapRoles(user, null); builder.startObject(); builder.field("user", user.getName());