diff --git a/builtin/credential/radius/backend_test.go b/builtin/credential/radius/backend_test.go index 3c885008422a..3d83f23674ce 100644 --- a/builtin/credential/radius/backend_test.go +++ b/builtin/credential/radius/backend_test.go @@ -185,7 +185,8 @@ func TestBackend_users(t *testing.T) { testStepUpdateUser(t, "web", "foo"), testStepUpdateUser(t, "web2", "foo"), testStepUpdateUser(t, "web3", "foo"), - testStepUserList(t, []string{"web", "web2", "web3"}), + testStepUpdateUser(t, "Web4", "foo"), + testStepUserList(t, []string{"Web4", "web", "web2", "web3"}), }, }) } diff --git a/builtin/credential/radius/path_users.go b/builtin/credential/radius/path_users.go index 21ebd262f0d7..3ba81b792790 100644 --- a/builtin/credential/radius/path_users.go +++ b/builtin/credential/radius/path_users.go @@ -6,7 +6,6 @@ package radius import ( "context" "fmt" - "strings" "github.com/hashicorp/vault/sdk/framework" "github.com/hashicorp/vault/sdk/helper/policyutil" @@ -87,7 +86,7 @@ func (b *backend) user(ctx context.Context, s logical.Storage, username string) return nil, fmt.Errorf("missing username") } - entry, err := s.Get(ctx, "user/"+strings.ToLower(username)) + entry, err := s.Get(ctx, "user/"+username) if err != nil { return nil, err } diff --git a/changelog/28884.txt b/changelog/28884.txt new file mode 100644 index 000000000000..c9b064d217f5 --- /dev/null +++ b/changelog/28884.txt @@ -0,0 +1,3 @@ +```release-note:bug +auth/radius: Fixed and issue where upper case items were returning as lower case. +``` \ No newline at end of file