2015-03-20 16:59:48 +00:00
|
|
|
package aws
|
|
|
|
|
|
|
|
import (
|
2015-03-20 18:32:18 +00:00
|
|
|
"github.com/hashicorp/vault/logical"
|
2015-03-20 16:59:48 +00:00
|
|
|
"github.com/hashicorp/vault/logical/framework"
|
|
|
|
)
|
|
|
|
|
2015-03-20 18:32:18 +00:00
|
|
|
func Factory(map[string]string) (logical.Backend, error) {
|
|
|
|
return Backend(), nil
|
|
|
|
}
|
|
|
|
|
2015-03-20 16:59:48 +00:00
|
|
|
func Backend() *framework.Backend {
|
|
|
|
var b backend
|
|
|
|
b.Backend = &framework.Backend{
|
|
|
|
PathsRoot: []string{
|
|
|
|
"root",
|
|
|
|
"policy/*",
|
|
|
|
},
|
|
|
|
|
|
|
|
Paths: []*framework.Path{
|
|
|
|
pathRoot(),
|
|
|
|
pathPolicy(),
|
|
|
|
pathUser(&b),
|
|
|
|
},
|
|
|
|
|
|
|
|
Secrets: []*framework.Secret{
|
|
|
|
secretAccessKeys(),
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
return b.Backend
|
|
|
|
}
|
|
|
|
|
|
|
|
type backend struct {
|
|
|
|
*framework.Backend
|
|
|
|
}
|