Put timestamp back into the username. Since Cassandra doesn't support expiration, this can be used by scripts to manually clean up old users if revocation fails for some reason.

Commit contents (C)2015 Akamai Technologies, Inc. <opensource@akamai.com>
This commit is contained in:
Jeff Mitchell 2015-06-30 11:15:46 -04:00
parent 42b90fa9b9
commit 762108d9eb
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package cassandra
import (
"fmt"
"time"
"github.com/hashicorp/vault/logical"
"github.com/hashicorp/vault/logical/framework"
@ -40,7 +41,7 @@ func (b *backend) pathCredsCreateRead(
}
displayName := req.DisplayName
username := fmt.Sprintf("vault-%s-%s-%s", name, displayName, generateUUID())
username := fmt.Sprintf("vault-%s-%s-%s-%d", name, displayName, generateUUID(), time.Now().Unix())
password := generateUUID()
// Get our connection