Skip to content

Commit

Permalink
Fix role key lookup in clientCertAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
liuh-80 authored Feb 26, 2025
1 parent dad4fc4 commit 699c361
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gnmi_server/clientCertAuth.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ func PopulateAuthStructByCommonName(certCommonName string, auth *common_utils.Au

var fieldValuePairs = configDbConnector.Get_entry(serviceConfigTableName, certCommonName)
if fieldValuePairs.Size() > 0 {
if fieldValuePairs.Has_key("role") {
var role = fieldValuePairs.Get("role")
if fieldValuePairs.Has_key("role@") {
var role = fieldValuePairs.Get("role@")
auth.Roles = strings.Split(role, ",")
}
} else {
Expand Down

0 comments on commit 699c361

Please sign in to comment.