Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12239371
Vault.tcl
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
604 B
Referenced Files
None
Subscribers
None
Vault.tcl
View Options
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/plain
Expires
Sat, Oct 11, 21:24 (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3064085
Default Alt Text
Vault.tcl (604 B)
Attached To
Mode
rVIPER ViperServ scripts
Attached
Detach File
Event Timeline
Log In to Comment