Skip to content

Improve authentication handling #908

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

Merged
merged 22 commits into from
Jul 18, 2019
Merged

Improve authentication handling #908

merged 22 commits into from
Jul 18, 2019

Conversation

delvedor
Copy link
Member

@delvedor delvedor commented Jul 15, 2019

  • Now you can pass the Basic authentication parameter via a custom option:
{
  auth: {
    username: 'elastic',
    password: 'changeme'
  }
}
  • Added support for ApiKey authentication:
{
  auth: {
    apiKey: 'base64ApiKey'
  }
}
// or
{
  auth: {
    apiKey: {
      id: 'foo',
      api_key: 'bar'
    }
  }
}
  • From now you can pass the Elastic cloud username and password inside the standard auth option.
{
  cloud: {
    id: 'name:bG9jYWxob3N0JGFiY2QkZWZnaA==',
  },
  auth: {
    username: 'elastic',
    password: 'changeme'
  }
}
  • Instead of storing the authentication parameter, now the Connection class caches the precomputed authorization header.

@delvedor delvedor added v6.9 and removed v5.x labels Jul 17, 2019
@delvedor delvedor added v6.9 and removed v6.9 labels Jul 17, 2019
@delvedor delvedor merged commit 0ebbd71 into master Jul 18, 2019
@delvedor delvedor deleted the improve-auth branch July 18, 2019 08:33
delvedor added a commit that referenced this pull request Jul 18, 2019
delvedor added a commit that referenced this pull request Jul 18, 2019
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

Successfully merging this pull request may close these issues.

1 participant