-
Notifications
You must be signed in to change notification settings - Fork 111
Closed
Description
👋 I'm finding that only ES_API_KEY (or, no auth) is working when I connect to Elasticsearch 8.15.2
I've tried prompts to test all tool types (list_indices, get_mappings, search, get_shards), but when I use ES_USERNAME and ES_PASSWORD I receive a generic authentication error, and there is no login attempt in our Elasticsearch logs:
Error: authentication_exception
The account(s) does have the required permissions as I can retrieve the available indices using basic auth with a small node app using the same esClient.cat.indices call:
const { Client } = require('@elastic/elasticsearch');
const esClient = new Client({
node: 'https://foo.bar.m:9200',
auth: { username: "foo", password: "bar" },
tls: { rejectUnauthorized: false }
});
(async () => {
const response = await esClient.cat.indices({ format: 'json' });
console.log('Response:', response);
if (response && Array.isArray(response)) {
console.log(`Found ${response.length} indices`);
response.forEach(idx => console.log(idx.index));
}
})().catch(err => console.log('Error:', err));
Metadata
Metadata
Assignees
Labels
No labels