Open albgus opened 1 year ago
@nisgoel-amazon, can you please advise on this request? Thanks!
@hdhalter This is related to which plugin. Can you point out the documentation page.
Got it, this is related to snapshot restore. https://github.com/opensearch-project/documentation-website/blob/bce6a3a6bcaf439c3576f540188f360c3f779ba9/_tuning-your-cluster/availability-and-recovery/snapshots/snapshot-restore.md?plain=1#L95
@yigithub / @neetikasinghal can you help on this one.
What do you want to do?
Tell us about your request: The documentation for taking and restoring snapshots suggests building credentials into your docker container. This seems to me like an extremely poor security practice being encouraged by the documentation..
I'm pretty sure this line wouldn't even work well either:
RUN echo $AWS_SESSION_TOKEN | /usr/share/opensearch/bin/opensearch-keystore add --stdin s3.client.default.session_token
. Since the AWS_SESSION_TOKEN is usually only used with temporary credentials that expires in a few hours. For the example to be usable the container would need to be continously be re-built with new credentials and re-deployed.Also, for the IRSA step it says the following:
Specifically
If copying is not an option
suggests that it would be possible to simply copy the token file. Ignoring that there's no suggestion of how to implement this at runtime, simply copying the file at container start would be a bad idea as the token file by default expires in 24 hours. Normally the IRSA controller would take care of refreshing the token file during the containers lifetime, but if it's copied somewhere else it would not be refreshed.