diadia

興味があることをやってみる。自分のメモを残しておきます。

Amazon ES

Fine-Grained Access Control in Amazon Elasticsearch Service - Amazon Elasticsearch Service

Amazon ES Security

ESのセキュリティは3つから構成されている。

Network -> Public accessVPC accessで設定できる

Domain access policy -> resource-based access policy

Fine-grained access control -> fine-grained access control evaluates the user credentials and either authenticates the user or denies the request. If fine-grained access control authenticates the user, it fetches all roles mapped to that user and uses the complete set of permissions to determine how to handle the request.

Remote Reindex in Amazon Elasticsearch Service - Amazon Elasticsearch Service

指定のURLからのみのアクセスを行う

パブリックアクセスで以下をJSON内で指定すると指定のURLのみからアクセスできる設定になる

IPベースのポリシー

https://docs.aws.amazon.com/ja_jp/elasticsearch-service/latest/developerguide/es-ac.html#es-ac-types-ip

"Condition": {
        "IpAddress": {
          "aws:SourceIp": "[アクセス元IPアドレス]/32"
        }
      }

ただ、これをIPを調べて登録してもうまく行かなかった。

https://checkip.amazonaws.com/のipを使うとうまく行った。理由はわからない。

https://aws.amazon.com/jp/premiumsupport/knowledge-center/anonymous-not-authorized-elasticsearch/