Communication between the plugins

Kibana version 6.1

we have default core plugin 'elasticsearch'
I wrote my own plugin 'project-auth' here I have a userId which I encrypted it and set to cookie

In every request of my elasticsearch I want this userId to be passed, I have "callwithInternalUser" method I can add a parameter there

    clientParams = { ...clientParams, 'userId': '1234567890' };
    return callAPI(this._client, endpoint, clientParams, options);
  }```

Now my problem is, I have userId inside the  'project-auth' plugin, I want it inside elasticsearch plugin 
what to do ??
or tell me how to pass the data from there to here.

@matw

@lukas

What does Elasticsearch need to do with this value? The elasticsearch plugin doesn't know anything about your plugin, so you might need to find a different way to transmit the value. I probably wouldn't try to leverage on callWithInternalUser as that is vendor code and you don't want it to break by giving it something new to be concerned about.

Is there any other way to create data with the userId so it can correlated to whatever else is needed?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.