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 Answers
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
answered 2 years ago
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
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions