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

Add support for AWS Elasticsearch Service by signing request properly. #310

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

esurijon
Copy link

@esurijon esurijon commented Jul 4, 2018

Credentials are gathered from auth configuration, AWS access key maps to username and AWS secret maps to password configs
AWS Region is infered from host name

Credentials are gathered from auth configuration, AWS access key maps to username and AWS secret maps to password configs
AWS Region is infered from host name
@@ -324,7 +324,8 @@ class HTTPElasticClient @Inject()(client: WSClient) extends ElasticClient {
val request =
authentication.foldLeft(client.url(url).withMethod(method).withHttpHeaders(headers: _*)) {
case (request, auth) =>
request.withAuth(auth.username, auth.password, WSAuthScheme.BASIC)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we keep basic auth? and possibly add aws so config would look like:

  {
    host = "https://some-aws-es-domain"
    name = "AWS ES Cluster"
    aws = {
      access_key = "access"
      secrety_key = "secret"
    }
  }

BTW, its working as expected :) but cannot be mixed with basic auth

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree here. Specially if the AWS credentials are gonna be provided through an instance profile

@lmenezes
Copy link
Owner

lmenezes commented Oct 4, 2018

sorry for the very long delay. I will try to take a look at this soon 👍

@skokovic
Copy link

This is pretty useful and deserves a separate config keyword to have both auth and aws credentials.
Is there a plan to merge this anytime soon?
@lmenezes

@ankusshdevops
Copy link

Hey, can you help me with the build instructions for the source code. I am trying to build the source code and getting in unresolved dependencies. BTW I am new to scala. Your help is very much appreciated.

@ndeitch
Copy link

ndeitch commented May 31, 2019

+1 for this feature.

@lmenezes what is missing to bump a version with this feature?


object AwsSigner {

def sing(method: String, url: String, headers: Seq[(String, String)], body: Option[String], secret: String, key: String) : Seq[(String, String)] = {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this method should be: sign and not sing, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. Should I fix it and do another PR?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, I don't know, because this PR is open for so long. Did you build a docker image from your branch? if so, could share it with us, meanwhile they don't merge your PR.

@wvidana
Copy link

wvidana commented Jun 3, 2019

How would this work with the AWS credential provider chain? Like if the basic auth for cerebro differs from AWS keys, and the latter won't be provided since it might be picked up from the env vars, instance profile... https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html

@ghost
Copy link

ghost commented Oct 14, 2019

this PR has been open for a very long time, whats up ?

@deimosfr
Copy link

deimosfr commented Feb 1, 2020

Hi, any news about it?

@HugoDL
Copy link

HugoDL commented Feb 6, 2020

News?

@zeph
Copy link

zeph commented Jun 9, 2020

credentials can be taken from the associated profile

... this endpoint is available at any EC2 instance
http://169.254.169.254/latest/meta-data/iam/security-credentials

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.