Fixed some typos in an error message in the OIDC backend that can arise when signing a token against a role (#7059)

* fixes a typo in an error message

* error msg shouldn't start with a capital letter
This commit is contained in:
Lexman 2019-07-03 09:31:31 -07:00 committed by GitHub
parent d38468aacb
commit 19b67fc617
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -698,7 +698,7 @@ func (i *IdentityStore) pathOIDCGenerateToken(ctx context.Context, req *logical.
}
// Validate that the role is allowed to sign with its key (the key could have been updated)
if !strutil.StrListContains(key.AllowedClientIDs, "*") && !strutil.StrListContains(key.AllowedClientIDs, role.ClientID) {
return logical.ErrorResponse("The key %q does not list the client id of the role %q as an allowed_clientID", role.Key, roleName), nil
return logical.ErrorResponse("the key %q does not list the client ID of the role %q as an allowed client ID", role.Key, roleName), nil
}
// generate an OIDC token from entity data

View File

@ -497,7 +497,7 @@ func TestOIDC_SignIDToken(t *testing.T) {
expectError(t, resp, err)
// validate error message
expectedStrings := map[string]interface{}{
"The key \"test-key\" does not list the client id of the role \"test-role\" as an allowed_clientID": true,
"the key \"test-key\" does not list the client ID of the role \"test-role\" as an allowed client ID": true,
}
expectStrings(t, []string{resp.Data["error"].(string)}, expectedStrings)