restrictions on permissions a non-admin is able to grant a new user#382
Open
JacobBarthelmeh wants to merge 3 commits into
Open
restrictions on permissions a non-admin is able to grant a new user#382JacobBarthelmeh wants to merge 3 commits into
JacobBarthelmeh wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens server-side authorization rules for user creation so that non-admin users can only create new users with a subset of their own permissions (including keyIds), and adds/extends auth tests to validate these restrictions and the backend’s max-user limit behavior.
Changes:
- Enforce non-admin “subset-only” permission granting in
wh_Auth_UserAdd, including keyId subset checks and a non-admin empty-credentials restriction. - Extend
whTest_AuthAddUserto cover non-admin restrictions for actions, groups, keyIds, and credential presence. - Add a new
whTest_AuthMaxUserstest and run it fromwhTest_AuthTest.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/wh_auth.c |
Adds non-admin subset enforcement and credential restriction in wh_Auth_UserAdd. |
test/wh_test_auth.c |
Adds new negative/positive authorization tests and a max-user-capacity regression test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8242bac to
98d2bb3
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #382
Scan targets checked: wolfhsm-core-bugs, wolfhsm-src
No new issues found in the changed files. ✅
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up to item 6 from #270