Skip to content

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

Open
esurijon wants to merge 1 commit into
lmenezes:mainfrom
esurijon:master
Open

Add support for AWS Elasticsearch Service by signing request properly.#310
esurijon wants to merge 1 commit into
lmenezes:mainfrom
esurijon:master

Conversation

@esurijon

@esurijon esurijon commented Jul 4, 2018

Copy link
Copy Markdown

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
val request =
authentication.foldLeft(client.url(url).withMethod(method).withHttpHeaders(headers: _*)) {
case (request, auth) =>
request.withAuth(auth.username, auth.password, WSAuthScheme.BASIC)

Copy link
Copy Markdown

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
Copy Markdown

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

lmenezes commented Oct 4, 2018

Copy link
Copy Markdown
Owner

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

@skokovic

Copy link
Copy Markdown

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
Copy Markdown

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

ndeitch commented May 31, 2019

Copy link
Copy Markdown

+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
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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

wvidana commented Jun 3, 2019

Copy link
Copy Markdown

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

ghost commented Oct 14, 2019

Copy link
Copy Markdown

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

@deimosfr

deimosfr commented Feb 1, 2020

Copy link
Copy Markdown

Hi, any news about it?

@HugoDL

HugoDL commented Feb 6, 2020

Copy link
Copy Markdown

News?

@zeph

zeph commented Jun 9, 2020

Copy link
Copy Markdown

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.