d3a705f17b
1) Use the new LeaseExtend 2) Use default values controlled by mount tuning/system defaults instead of a random hard coded value 3) Remove grace periods
38 lines
596 B
Go
38 lines
596 B
Go
package consul
|
|
|
|
import (
|
|
"github.com/hashicorp/vault/logical"
|
|
"github.com/hashicorp/vault/logical/framework"
|
|
)
|
|
|
|
func Factory(conf *logical.BackendConfig) (logical.Backend, error) {
|
|
return Backend().Setup(conf)
|
|
}
|
|
|
|
func Backend() *framework.Backend {
|
|
var b backend
|
|
b.Backend = &framework.Backend{
|
|
PathsSpecial: &logical.Paths{
|
|
Root: []string{
|
|
"config/*",
|
|
},
|
|
},
|
|
|
|
Paths: []*framework.Path{
|
|
pathConfigAccess(),
|
|
pathRoles(),
|
|
pathToken(&b),
|
|
},
|
|
|
|
Secrets: []*framework.Secret{
|
|
secretToken(&b),
|
|
},
|
|
}
|
|
|
|
return b.Backend
|
|
}
|
|
|
|
type backend struct {
|
|
*framework.Backend
|
|
}
|