I have a server (A) where i have installed the hasicorp listenning on https::8200, and i have approle enabled on this vault i have a service running on server (B), and configured all the needed details like roleid,secretid in server (B) but when i try to enbale vault on server (B) its throwing permission denied error can you please help me here
– verified on Server (A)
it is having all access to path in .hcl file
using same command vault read -secreid <> roleid <> giving result in server (A) but on server (B) throwing permission error 403
Sounds like you are trying to set up Vault on your own compute instances (enterprise or community)? This was tagged for the HCP, and HCP Consul categories so just trying to make sure I understand what you are trying to set up.
Can you please confirm which of the scenarios you are working on?
Server A is running Vault server, and server B is trying to read a secret from Vault on server A?
or
Server A is running Vault server, and you are trying to set up server B to be the 2nd node in a Vault cluster?
Using community edition hasicorp vault, as i have a mysql server running on server B and vault running on server A as per the doc https://dev.mysql.com/blog-archive/mysql-keyring-now-speaks-hashicorp-vault/ i have did all the steps at the last step mysql is throwing permission denied error when i try to read the data using the roleid and secret id from server B even im getting same permission denied 403 error
Thanks for confirming and sharing the link you’re following. I will try to take a look at the MySQL tutorial in a few days in more detail. Caveat, it’s been many years since I’ve supported MySQL, so certainly not an expert there.
Off the top of my head, since you’re running Vault and MySQL on two separate instances, you can try and update your Vault config to:
I think the MySQL tutorial assumes you are running both MySQL and Vault on the same instance (e.g. both on serverA).
Setting the TCP listener to 0.0.0.0:8200 and setting the API and cluster addr to the actual IP of serverA will allow incoming connections on IPs other than localhost/127.0.0.1.
If you look at the output from the " Configuring the plugin" section, it shows the URL as for k_h_commit_server_url and k_h_server_url connecting to https://127.0.0.1:8200 which is literally looking at itself/serverB.
I will try to review in the next few days. Until then, you may get more help by posting this with some additional detail (such as your Vault config) in the Vault category instead of HCP rather than just tagging it Vault.
The tutorial and associated documentation from MySQL has some info gaps for a MySQL novice like myself, but one thing you may need to try adding to your MySQL configuration:
That was the only bit from the documentation that stood out given your scenario of having Vault and MySQL running on different instances.
I tried to start up a MySQL container with the config file suggested in the doc you provided a link to, but it won’t stay running. Seems to fail to start if I pass the --early-plugin-load parameter. Guessing that is not supported by the MySQL container image.
I’ve meticulously configured Vault on my primary server (Server A), ensuring flawless operation with AppRole authentication. When I attempt to replicate christmas spin wheel this success on a secondary server (Server B) using identical Role ID and Secret ID credentials, a persistent permission denied error (403). My rigorous verification of credentials, meticulous network configuration, and meticulous policy setup within Vault, the elusive resolution remains beyond my grasp.
I would suggest starting a new post in the Vault topic, as this topic is for the HashiCorp Cloud Platform. You may get some additional people to see the post.
Also, if you can share some more details in your new post, that would be helpful as well. Is server (A) and server (B) part of the same cluster? Different clusters? Also sharing your Vault configuration would be helpful.