@Ramya sorry for the delayed response.
It doesn't sound healthy to store your credentials for one datastore in another datastore.
take for example the scenario in which datastoreA is not available, that means you can't connect to datastoreB, which doesn't make sense.
Sensitive credentials should be stored as part of your machine environment, not sure how you run your machines.
If you have your machines running as part of a cloud service: aws \ heroku \ etc, you get support to how your provide environment variables. if you have your own on-premise machines, you should do it by yourself.
Now, about the encryption, I didn't do it because I didn't want to loose the search functionality (if you encrypt your data, you can't search on it, not using elastic queries at least). I decided to invest more in securing my es using shield.
So if you don't care about your data being searchable, your option as far as I know it, is what @danielmitterdorfer suggested. you should programmatically encrypt \ decrypt your data.