Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3767188
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
744 B
Referenced Files
None
Subscribers
None
View Options
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
Details
Attached
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)
Attached To
Mode
rVIPER ViperServ scripts
Attached
Detach File
Event Timeline
Log In to Comment