logical: Adding a DisplayName for operators

This commit is contained in:
Armon Dadgar 2015-04-15 13:56:42 -07:00
parent a2c22f6b3c
commit 9d2bd2bf29
2 changed files with 16 additions and 2 deletions

View File

@ -7,6 +7,14 @@ import "fmt"
type Auth struct {
LeaseOptions
// DisplayName is a non-security sensitive identifier that is
// applicable to this Auth. It is used for logging and prefixing
// of dynamic secrets. For example, DisplayName may be "armon" for
// the github credential backend. If the client token is used to
// generate a SQL credential, the user may be "github-armon-uuid".
// This is to help identify the source without using audit tables.
DisplayName string
// Policies is the list of policies that the authenticated user
// is associated with.
Policies []string

View File

@ -38,9 +38,15 @@ type Request struct {
Connection *Connection
// ClientToken is provided to the core so that the identity
// can be verified and ACLs applied. This value is not passed
// through to the logical backends.
// can be verified and ACLs applied. This value is passed
// through to the logical backends but after being salted and
// hashed.
ClientToken string
// DisplayName is provided to the logical backend to help associate
// dynamic secrets with the source entity. This is not a sensitive
// name, but is useful for operators.
DisplayName string
}
// Get returns a data field and guards for nil Data