diff --git a/builtin/logical/ssh/backend.go b/builtin/logical/ssh/backend.go index 813ecc50fe..f15650c77e 100644 --- a/builtin/logical/ssh/backend.go +++ b/builtin/logical/ssh/backend.go @@ -7,8 +7,8 @@ import ( "github.com/hashicorp/vault/logical/framework" ) -func Factory(map[string]string) (logical.Backend, error) { - return Backend(), nil +func Factory(conf *logical.BackendConfig) (logical.Backend, error) { + return Backend().Setup(conf) } func Backend() *framework.Backend { diff --git a/builtin/logical/ssh/path_lookup.go b/builtin/logical/ssh/path_lookup.go index 02166e4304..20084a8091 100644 --- a/builtin/logical/ssh/path_lookup.go +++ b/builtin/logical/ssh/path_lookup.go @@ -41,7 +41,11 @@ func (b *backend) pathLookupWrite(req *logical.Request, d *framework.FieldData) return nil, err } if len(keys) == 0 { - return nil, fmt.Errorf("No roles registered for IP '%s'", ip.String()) + return &logical.Response{ + Data: map[string]interface{}{ + "roles": "", + }, + }, nil } var matchingRoles []string