douzi4724 2017-01-18 17:24
浏览 152

通过AWS请求签名无法访问ES

I am building a golang RESTful API and trying to access ES using signed requests. I have followed documentation on AWS the documentation of the Golang AWS elastic search client package I am using (olivere/elastic)

Following golang code is used to create a new client

signer := v4.NewSigner(credentials.NewStaticCredentials("IAM_USER_ID", "IAM_USER_SECRET", ""))
awsClient, err := aws_signing_client.New(signer, nil, "es", "us-east-1")
if err != nil {
    return nil, err
}
return elastic.NewClient(
    elastic.SetURL("https://my-aws-endpoint.us-east-1.es.amazonaws.com"),
    elastic.SetScheme("https"),
    elastic.SetHttpClient(awsClient),
    elastic.SetSniff(false), // See note below
)

In ElasticSearch AWS console, I have modified an access policy like that: selected access policy template access policy

Seems I am able to discover the ES node, but when I try to execute a query, ES return http status 403 – don't have permission.

I also have tried to grant IAM user with the AmazonESFullAccess policy but seems it doesn't have any effect.

  • 写回答

1条回答 默认 最新

  • dreamer1231 2017-02-06 05:16
    关注

    There appears to be an issue in the signing library. The following pull request fixed it. (not yet merged) https://github.com/sha1sum/aws_signing_client/pull/3

    评论

报告相同问题?

悬赏问题

  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据
  • ¥20 软件测试决策法疑问求解答