1
0

checking in

This commit is contained in:
brent saner
2025-12-23 20:58:56 -05:00
parent d94a46af0b
commit 84845f9fe5
37 changed files with 3117 additions and 642 deletions

30
cmd/kill/funcs.go Normal file
View File

@@ -0,0 +1,30 @@
package main
import (
`github.com/hashicorp/vault-client-go`
)
// killKeyAsync kills key keyNm if found in the Vault mount.
func killKeyAsync(keyNm string) {
var err error
var ok bool
defer wg.Done()
if _, ok = existingOtp[keyNm]; !ok {
logger.Warning("Key '%s' does not exist on '%s'; skipping.", keyNm, args.KillArgs.VaultTotpMnt)
return
}
if _, err = vc.Secrets.TotpDeleteKey(
ctx,
keyNm,
vault.WithMountPath(args.KillArgs.VaultTotpMnt),
); err != nil {
logger.Err("killKeyAsync: Failed to delete key '%s' on '%s': %v", keyNm, args.KillArgs.VaultTotpMnt, err)
return
}
return
}