-
Notifications
You must be signed in to change notification settings - Fork 28
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, SimpleAuthentication allows configuration for ApiKey and Basic authentication schemes, including specifying fixed API keys and credentials. However, there is no way to specify the list of roles for a user when using these methods.
Requested enhancement:
- Add a
Rolesparameter (array of strings) to both ApiKey and Basic authentication configuration sections. - When validating credentials (ApiKey or Basic), if
Rolesis specified, automatically populate the role claim for the corresponding user. - The
Roleslist should be optional; if omitted, no roles are assigned. - Update the README.md file to document this feature, including examples for both configuration and expected claim population.
Example configuration:
"Authentication": {
"ApiKey": {
"ApiKeys": [
{
"Value": "key-1",
"UserName": "UserName1",
"Roles": ["Admin", "User"]
}
]
},
"Basic": {
"Credentials": [
{
"UserName": "UserName1",
"Password": "Password1",
"Roles": ["Manager"]
}
]
}
}This enhancement will provide more fine-grained control over user claims and simplify role assignment for fixed credentials.
- Update configuration schema and validation logic
- Populate role claim from the
Rolesarray - Update documentation (README.md)
Copilot
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request