We are trying create manage Elastic above AWS separate tenant (customer) and assign each tenant to a different index.
Each customer will have their user name/password or similar like token, etc.
We setup a managed ES on AWS and did integration with native Elastic sdk HighRestClient
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>7.10</version>
</dependency>
Everything works fine, all our actions performed from Java code like creating index/manage/searches, etc.
This piece of code simulates the basic auth as described here https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/_basic_authentication.html
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(settings.getEsUserName(), settings.getEsUserPass()));
restClientBuilder.setHttpClientConfigCallback(builder -> builder.setDefaultCredentialsProvider(credentialsProvider));
Now we creating different index on each customer which is OK, but the problem is that now all our customers will have the same username/password.
Is it possible somehow to do this on multiple users, have multiple username/password?
So each user can interact only with his index authenticated with password.
I saw this case - https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/fgac.html#fgac-walkthrough-basic
As I understand from reading they are talking about multi tenancy on Kibana users.
Am I missing something, is it possible to achieve our goal in different ways?