Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VAULT-31525 Remove lowercasing of RADIUS auth. #28884

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion builtin/credential/radius/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"}),
},
})
}
Expand Down
3 changes: 1 addition & 2 deletions builtin/credential/radius/path_users.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package radius
import (
"context"
"fmt"
"strings"

"github.com/hashicorp/vault/sdk/framework"
"github.com/hashicorp/vault/sdk/helper/policyutil"
Expand Down Expand Up @@ -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
}
Expand Down
3 changes: 3 additions & 0 deletions changelog/28884.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
auth/radius: Fixed and issue where upper case items were returning as lower case.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
auth/radius: Fixed and issue where upper case items were returning as lower case.
auth/radius: Fixed an issue where usernames with upper case characters where not honored

We may also want to add a release-note:change since this is a behavior change that will also result in changes to how policies are assigned

```
Loading