Hi,
It was just one week I started learning vault and its features, and now started doing few experiments using it.
Using hvac python library, I would like to retrieve the credentials and use them to access snowflake database. You may say, why I shouldn’t use dynamic secrets but this is another day for the experiment.
In the hvac library, it was mentioned that I should have a token (VAULT_TOKEN) and may be certificate path,
client = hvac.Client( url=‘https://localhost:8200’,
token=os.environ[‘VAULT_TOKEN’],
cert=(client_cert_path, client_key_path),
verify=server_cert_path)
client.is_authenticated()
It seems I need to set VAULT_TOKEN and also specify client certificate path. This seems that I need to expose the access information VAULT_TOKEN and other information at the python code.
My questions are:
- How securely or the best way my python code can get the static secret from the vault? If I get periodic token, it could be fine but still I need to login to the vault using root or another token to get temporary token, in turn they are again exposed.
- I will deploy the application in docker. Do I need to set the VAULT_TOKEN environment variable in the Dockerfile? But the token is again revealed.
- We have also kubernetes cluster but I not much expert in that area.
- Is there something that I can do with jenkins?
I was juggling here and there to get better understanding for long time but not much fruitful. Your hints or references could help me a developer and be a part of the community.
I hope this community helps me.
Please do not downvote or ignore my questions if you think they are irrelevant to ask or need more effort. Your hints would help me to jump in the right direction.
Thank you very much,
Hari