Using basicauth to register snapshot in opensearch

0

Hi,

Ive created a opensearch cluster with basic auth, and trying to now register a s3 bucket for manual snapshots.

I have created a role (TheSnapshotRole) and then logged into the opensearch dashboard -> security -> internal users -> (my admin user) -> Backend roles and added the TheSnapshotRole for the.

But when i run a python script to call it, im erroring. Presuming this is down to the iam:PassRole needed? but not sure how to overcome it?

已提問 2 年前檢視次數 666 次
2 個答案
2

I have created a role (TheSnapshotRole) and then logged into the opensearch dashboard -> security -> internal users -> (my admin user) -> Backend roles and added the TheSnapshotRole for the.

TheSnapshotRole is not to be assigned to the opensearch admin user. There are some subtle differences between opensearch user and AWS IAM user and policy assignments which sometimes creates confusion :)

Using this document as reference:

  1. You have created TheSnapshotRole which is fine (IAM role row in Prereq section)
  2. Assign the policies mentioned in the Permissions row of the Prereq section of the document to an non-admin IAM user. Better to create an IAM user specific for this purpose on the basis of providing least privileges since it would be used in the next step. (The document states you can use a role ARN also but I have not tried that so I stick with recommending IAM user)
  3. Specify this IAM user's ARN (user created in previous step) in Opensearch dashboard -> security -> Roles -> manage_snapshots -> Mapped users -> Manage Mapping -> Users section.
  4. Make necessary substitutions to the python script and run the script with AWS creds of IAM user created in previous step to register the S3 repository
  5. You have an admin Opensearch user which you use to login to Opensearch dashboard and manage creation of snapshots (actuals backups) but this user to not user to create the S3 repository for snapshots

--Syd

profile picture
Syd
已回答 2 年前
0

Thanks a lot, Im lucky to find this post !
The 3. point is important, paste the ARN "arn:aws:iam::90****:user/***" as user succeeded, failed by using internal username.

steve
已回答 3 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南