Skip to content

Commit

Permalink
Troubleshooting user injection.
Browse files Browse the repository at this point in the history
Signed-off-by: AWSHurneyt <[email protected]>
  • Loading branch information
AWSHurneyt committed Jan 26, 2024
1 parent c7842dd commit 64b0600
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,14 @@ class TransportGetRemoteIndexesAction @Inject constructor(
.getTransient<String>(ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT)
log.info("hurneyt TransportGetRemoteIndexesAction::userStr = {}", userStr)

val userStr2 = client.threadPool().threadContext
.getTransient<String>(ConfigConstants.INJECTED_USER)
log.info("hurneyt TransportGetRemoteIndexesAction::userStr2 = {}", userStr2)

client.threadPool().threadContext.stashContext().use {
client.threadPool().threadContext.putTransient(ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT, userStr)
if (userStr2.isNotEmpty())
client.threadPool().threadContext.putTransient(ConfigConstants.INJECTED_USER, userStr2)

scope.launch {
val clusterIndexesList = mutableListOf<ClusterIndexes>()

Expand Down

0 comments on commit 64b0600

Please sign in to comment.