SSL Security

Hope you can help me.
I am using es 6.8
So, my problem is that I want to use java high level client with SSL with an ingest plugin.
First I tried to configure my client in a simple main method and it works perfectly. (I used this documents : https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.8/_encrypted_communication.html /https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.8/_basic_authentication.html)

But, when I try to use the client from my plugin ingests (with the same config) I get 401 Unauthorized failed to authenticate user [elastic]

You will need to share some additional information. What is your "plugin ingests" ? How do you use the java high level rest client ? How does the code look like ( you need to share the relevant parts at least ).

Unfortunately, it is unlikely that someone will be able to assist you with what you have shared so far.