My question is : is there a way to delete the initial token and tell vault1 to use the latest token from the config that vault2 has generated?
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/vault/issues
IRC: #vault-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Vault" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vault-tool+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vault-tool/0f3bbc25-89cf-4e16-b460-8ed76f32f3ee%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to vault...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to vault-tool+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vault-tool/852bb315-b0af-4b71-88d7-3ea449db092f%40googlegroups.com.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/vault/issues
IRC: #vault-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Vault" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vault-tool+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vault-tool/0f3bbc25-89cf-4e16-b460-8ed76f32f3ee%40googlegroups.com.
Sorry, I meant vault1.
To view this discussion on the web visit https://groups.google.com/d/msgid/vault-tool/852bb315-b0af-4b71-88d7-3ea449db092f%40googlegroups.com.
Hi Rohan,
First time when vault1 unseals itself with vault2 it sends your unseal keys to the transit endpoint.
Unseal key are stored encrypted at your vault1. Second time when vault1 tries to unseal itself, it detects the encrypted unseal keys locally and tries to decrypt them via the transit endpoint from your vault2. (described by ...@michel@hashicorp.com in the above mail)
Saurabh
To unsubscribe from this group and stop receiving emails from it, send an email to vault...@googlegroups.com.
Hi Rohan,
Unseal key are stored encrypted at your vault1. Second time when vault1 tries to unseal itself, it detects the encrypted unseal keys locally and tries to decrypt them via the transit endpoint from your vault2. (described by ...@mic...@hashicorp.com in the above mail)
Saurabh
To unsubscribe from this group and stop receiving emails from it, send an email to vault-tool+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vault-tool/16097be0-8227-4c48-a3f1-b71d5debc0f8%40googlegroups.com.
Hi Rohan,
First time when vault1 unseals itself with vault2 it sends your unseal keys to the transit endpoint.
Unseal key are stored encrypted at your vault1. Second time when vault1 tries to unseal itself, it detects the encrypted unseal keys locally and tries to decrypt them via the transit endpoint from your vault2. (described by ...@michel@hashicorp.com in the above mail)
Saurabh
To unsubscribe from this group and stop receiving emails from it, send an email to vault...@googlegroups.com.
1. Create a client token with autounseal policy attached, this token will be used by vault1 for unsealing.
# vault token create -address=http://127.0.0.1:8200 -policy="autounseal" -wrap-ttl=2120 2. Unwrap the token generated in step1. # VAULT_TOKEN="s.eH0lMqWb8NIydWj2FK1ZjhBE" vault unwrap -address=http://127.0.0.1:8200
3. Use the unwrapped token from step 2 and add it in the seal config of vault1.
For refreshing your token:
It depends upon how you want to do:
1) if you want execute script or command then use cron job(linux).
token refresh command:
curl --header "X-Vault-Token:<your token?" --data '{"increment":"168h"}' http://127.0.0.1:8200/v1/auth/token/renew-self
2. every programming language has some functionality for timers.
I work on golang, so I will do something like this:
step 1: start a go-routine when your service/process starts.
step 2: start a timer in your go-routine.
func main() {
go renewVaultToken(<some time in minutes>)
}
func renewVaultToken(tokenRenewalInterval uint64) {
ticker := time.NewTicker(time.Duration(tokenRenewalInterval) * time.Minute)
for range ticker.C {
//call api for token renewal
//curl --header "X-Vault-Token:<your token?" --data '{"increment":"168h"}' http://127.0.0.1:8200/v1/auth/token/renew-self
}
}
Hi Saurabh,
Can you help me with the command for creating a new token on vault 2 using the old key on Vault 2. I have currently requested to restore my system to a backdate which will take the system where we had the old Key on vault 2.Also is there any documentation on how can we set a timer to refresh the token say after every 25 days.
Thank you for all your help.
On Thursday, October 3, 2019 at 7:42:01 PM UTC+5:30, Saurabh Singh wrote:
Hi Rohan,
First time when vault1 unseals itself with vault2 it sends your unseal keys to the transit endpoint.
Unseal key are stored encrypted at your vault1. Second time when vault1 tries to unseal itself, it detects the encrypted unseal keys locally and tries to decrypt them via the transit endpoint from your vault2. (described by ...@mic...@hashicorp.com in the above mail)
Saurabh
To unsubscribe from this group and stop receiving emails from it, send an email to vault-tool+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vault-tool/979ef9c3-11dd-486e-9dda-f06ffa81b092%40googlegroups.com.