How can I get access token of OIDC (Open ID Connect) provider?

Hi there,
We are developing a custom plugin in Kibana. We integrate our authentication with OIDC. Now we want to make external API requests from our custom plugin. These requests need the access token of the same OIDC provider. How can I get the provider OIDC token? What should be the approach?

Here's some feedback by our security team, if it's possible to access that Token in Kibana:

it's not possible. It's ES that talks to OIDC Identity Provider and returns its own access/refresh token pair to Kibana.


@matw , thanks for your answer. Is there any way to use elasticsearch as a relay between that external API and our custom plugin?