There are a number of storage systems that provide an S3-compatible API, and the repository-s3 plugin allows you to use these systems in place of AWS S3. To do so, you should set the s3.client.CLIENT_NAME.endpoint setting to the system’s endpoint. This setting accepts IP addresses and hostnames and may include a port. For example, the endpoint may be 172.17.0.2 or 172.17.0.2:9000 . You may also need to set s3.client.CLIENT_NAME.protocol to http if the endpoint does not support HTTPS.
I'd say that in 99% of the time you don't need this. But if you want to be able to restore from a region X and snapshot to a region Y, then you need to have 2 clients.
Is that what you are looking for? What exactly is your question?
We're looking into this option b/c we use Okta manage access to AWS through assumed roles. When we authenticate with Okta we're given a session token + temp. AWS tokens to access that are good for ~12 hrs. We'd like to create a wrapper script and introduce it as our own client to facilitate the loading of our temp creds into ES and then use them.
Why can you not put these credentials directly into Elasticsearch? Elasticsearch reads the credentials (access key, secret key and session token) from the keystore, and you can reload credentials at runtime.
I can think of other more complicated solutions (e.g. use Minio in S3 Gateway mode, or emulate EC2's own instance metadata service) but I'm trying to understand why the tools that Elasticsearch already provides aren't sufficient.
We can absolutely put the creds into ES. One of our issues is that the creds expire after 12 hrs and so new ones would need to get created prior to the 12 hr expiry window. How would you propose these get "reloaded"?
Part of my assumption with the keystore is that this would also need to get updated across all the instances of the ES cluster.
From ES docs:
When changing multiple reloadable secure settings, modify all of them, on each cluster node, and then issue a reload_secure_settings call, instead of reloading after each modification.
So in our scenario, I auth to Okta using their CLI tool, I get 3 things back (AWS tokens + session token), I need to add this to all my cluster nodes keystores and hit the API. 12hrs later I need to do the same thing.
With the pieces ES has provided me how would I accomplish this?
It feels like I have to do this outside of the cluster, update all the node's individual keystores, and then hit the API to trigger the reloading.
Well for starters, it would be preferable if we could update the secret material via the API. what you're suggesting is that I would have to write something that every ~12hrs will SSH to all our ES nodes and run the keystore cmds to update the secrets on said nodes, and then reload them.
That feels very dirty and not really like a good way to do this.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.