Vault SSH: keys/ designated special path
This commit is contained in:
parent
e998face87
commit
e8daf2d0a5
|
@ -28,8 +28,13 @@ func Backend(conf *logical.BackendConfig) (*framework.Backend, error) {
|
|||
Help: strings.TrimSpace(backendHelp),
|
||||
|
||||
PathsSpecial: &logical.Paths{
|
||||
Root: []string{"config/*"},
|
||||
Unauthenticated: []string{"verify"},
|
||||
Root: []string{
|
||||
"config/*",
|
||||
"keys/*",
|
||||
},
|
||||
Unauthenticated: []string{
|
||||
"verify",
|
||||
},
|
||||
},
|
||||
|
||||
Paths: []*framework.Path{
|
||||
|
@ -42,7 +47,7 @@ func Backend(conf *logical.BackendConfig) (*framework.Backend, error) {
|
|||
},
|
||||
|
||||
Secrets: []*framework.Secret{
|
||||
secretSSHKey(&b),
|
||||
secretDynamicKey(&b),
|
||||
secretOTP(&b),
|
||||
},
|
||||
}
|
||||
|
|
|
@ -41,7 +41,6 @@ func (b *backend) pathVerifyWrite(req *logical.Request, d *framework.FieldData)
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
log.Printf("Vishal: key found. Deleting now. Returning valid=yes\n")
|
||||
err = req.Storage.Delete("otp/" + otpSalted)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
const SecretDynamicKeyType = "secret_dynamic_key_type"
|
||||
|
||||
func secretSSHKey(b *backend) *framework.Secret {
|
||||
func secretDynamicKey(b *backend) *framework.Secret {
|
||||
return &framework.Secret{
|
||||
Type: SecretDynamicKeyType,
|
||||
Fields: map[string]*framework.FieldSchema{
|
Loading…
Reference in New Issue