diff --git a/logical/response.go b/logical/response.go index 96d4cce5e..6d6ce2251 100644 --- a/logical/response.go +++ b/logical/response.go @@ -3,6 +3,7 @@ package logical import ( "encoding/json" "errors" + "sort" "github.com/hashicorp/vault/helper/wrapping" ) @@ -113,6 +114,7 @@ func ListResponse(keys []string) *Response { Data: map[string]interface{}{}, } if len(keys) != 0 { + sort.Strings(keys) resp.Data["keys"] = keys } return resp