配置AWS ElasticSearch

时间:2018-06-07 13:13:53

标签: amazon-web-services elasticsearch

我需要保护我的Aws ElasticSearch集群。然后我设置了一个访问策略,如:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::xxxxxx:user/XXXX"
      },
      "Action": "es:*",
      "Resource": "arn:aws:es:eu-west-1:xxxxx:domain/xxx/*"
    }
  ]
}

问题:如何通过cURL访问实例?

我尝试使用我的IAM管理员用户凭据(用户/密码)为基本身份验证生成令牌

echo -n "Me:MyPassword" | base64
maiz3phaingoa7ohvooxei8O

但是,

curl -X GET -H "Authorization: Basic maiz3phaingoa7ohvooxei8O" https://search-xxxx-xxxx.eu-west-1.es.amazonaws.com/

表示:

{"message":"'maiz3phaingoa7ohvooxei8O' not a valid key=value pair (missing equal-sign) in Authorization header: 'Basic maiz3phaingoa7ohvooxei8O'."}

0 个答案:

没有答案