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:
parent
42b90fa9b9
commit
762108d9eb
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue