Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using --auth when specifying --url causes authentication exception #68

Open
sherwin684 opened this issue Aug 19, 2024 · 0 comments
Open

Comments

@sherwin684
Copy link

Using the --auth argument to specify the user credentials when a custom elasticsearch url is already defined using the argument --url, an AuthenticationException arises.

Expected Behaviour

Makelogs should start generating events

Actual Behaviour

Makelogs throws an AuthenticationException.

$ makelogs --url https://localhost:9200  --auth user:password
unknown ping error StatusCodeError: Authentication Exception
    at respond (/usr/local/lib/node_modules/@elastic/makelogs/node_modules/elasticsearch/src/lib/transport.js:349:15)
    at checkRespForFailure (/usr/local/lib/node_modules/@elastic/makelogs/node_modules/elasticsearch/src/lib/transport.js:306:7)
    at HttpConnector.<anonymous> (/usr/local/lib/node_modules/@elastic/makelogs/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
    at IncomingMessage.wrapper (/usr/local/lib/node_modules/@elastic/makelogs/node_modules/lodash/lodash.js:4991:19)
    at IncomingMessage.emit (node:events:529:35)
    at endReadableNT (node:internal/streams/readable:1400:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  status: 401,
  displayName: 'AuthenticationException',
  path: '/',
  query: {},
  body: false,
  statusCode: 401,
  response: '',
  wwwAuthenticateDirective: 'Basic realm="security" charset="UTF-8", Bearer realm="security", ApiKey',
  toString: [Function (anonymous)],
  toJSON: [Function (anonymous)]
}

Workaround

Including the user credentials directly in the --url argument works fine in this case.

$ makelogs --url https://user:password@host:port
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant