拒绝AWS OpenSearch写作许可

发布于 2025-01-28 04:25:19 字数 995 浏览 2 评论 0原文

我正在尝试将春季启动应用程序从AWS EKS连接到AWS OpenSearch,这两者都位于VPC中。尽管连接成功,我无法将任何数据写入索引。

所有AWS资源 - EKS和OpenSearch均使用Terraform配置。我已经提到了附加到应用程序的出口中的Elasticsearch子网CIDR。此外,该应用程序正确地假设了EKS服务帐户和POD角色 - 我在Services Stanza for Elasticsearch中提到了这一点。在附加到POD角色的策略中,我看到了所有提到的权限-ESHTTPPPOST,ESHTTPGET,ESHTTPPPUT等。

这是我遇到的错误,

{"error":{"root_cause": [{"type":"security_exception", "reason":"no 
permissions for [indices:data/write/index] and User 
[name=arn:aws:iam::ACCOUNT_NO:role/helloworld-demo-eks-PodRle- 
hellodemo-role-1,backend_roles= 
[arn:aws:iam::ACCOUNT_NO:role/helloworld-demo-eks-PodRle-hellodemo 
role-1], requested 
Tenant=null]"}],"type":"security_exception", "reason":"no 
permissions for [indices:data/write/index] and User 
[name=arn:aws:iam::ACCOUNT_NO:role/helloworld demo-eks-PodRle- 
hellodemo-role-1,
backend_roles=[arn:aws:iam::ACCOUNT_NO:role/helloworld-demo-eks- 
PodRle-hellodemo role-1], requested Tenant=null]"},"status":403}

在配置时是否有任何我错过的东西?

I'm trying to connect a spring boot application from AWS EKS to AWS Opensearch both of which reside in a VPC. Though the connection is successful im unable to write any data to the index.

All the AWS resources - EKS and Opensearch are configured using terraform. I have mentioned the elasticsearch subnet CIDR in the egress which is attached to the application. Also, the application correctly assumes the EKS service account and the pod role - which I mentioned in the services stanza for Elasticsearch. In the policy which is attached to the pod role, I see all the permissions mentioned - ESHttpPost, ESHttpget, ESHttpPut, etc.

This is the error I get,

{"error":{"root_cause": [{"type":"security_exception", "reason":"no 
permissions for [indices:data/write/index] and User 
[name=arn:aws:iam::ACCOUNT_NO:role/helloworld-demo-eks-PodRle- 
hellodemo-role-1,backend_roles= 
[arn:aws:iam::ACCOUNT_NO:role/helloworld-demo-eks-PodRle-hellodemo 
role-1], requested 
Tenant=null]"}],"type":"security_exception", "reason":"no 
permissions for [indices:data/write/index] and User 
[name=arn:aws:iam::ACCOUNT_NO:role/helloworld demo-eks-PodRle- 
hellodemo-role-1,
backend_roles=[arn:aws:iam::ACCOUNT_NO:role/helloworld-demo-eks- 
PodRle-hellodemo role-1], requested Tenant=null]"},"status":403}

Is there anything that I'm missing out on while configuring?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

潜移默化 2025-02-04 04:25:19

可以通过将POD角色分配给Elasticsearch Terraform中的额外_roles键来解决此错误。当AWS STS收到EKS的请求时,它在内部受到了照顾。

This error can be resolved by assigning the pod role to additional_roles key in the Elasticsearch terraform. This internally is taken care by AWS STS when it receives a request from EKS.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文