Page MenuHomeDevCentral

No OneTemporary

diff --git a/Vault.tcl b/Vault.tcl
index a4f2de0..9d56f48 100644
--- a/Vault.tcl
+++ b/Vault.tcl
@@ -1,22 +1,25 @@
package require vault
proc vault_login {} {
global vault
::vault::init $vault(host)
::vault::appRoleLogin $vault(roleID) $vault(secretID)
}
proc vault_get {property {key {}}} {
if {[catch {set credential [::vault::readKV apps/viperserv/$property $key]} err]} {
if {[string match "*403 Forbidden*" $err]} {
# Token expired?
vault_login
return [::vault::readKV apps/viperserv/$property $key]
}
+
+ # Errors like 503 if unsealed we can't recover easily, so propagate
+ error $err
}
return $credential
}
vault_login

File Metadata

Mime Type
text/x-diff
Expires
Sun, Nov 24, 22:55 (15 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259096
Default Alt Text
(744 B)

Event Timeline