Skip to content

rpcserver: Ensure limited user is always limited.#3644

Merged
davecgh merged 2 commits intodecred:masterfrom
jholdstock:auth
Mar 10, 2026
Merged

rpcserver: Ensure limited user is always limited.#3644
davecgh merged 2 commits intodecred:masterfrom
jholdstock:auth

Conversation

@jholdstock
Copy link
Copy Markdown
Member

This fixes an issue where the server treated an unset admin auth hash as unconditional success under the assumption that this state corresponds to the server running certificate auth. However, the server can also reach this state under basic auth by configuring limited credentials without admin credentials. In this case the limited user would have unrestricted access to all admin functions.

- Comments and more descriptive names for tests.
- Using t.Run() provides better test metrics and removes the need to
  include the name of the test in log lines.
- Pull a block out TestCheckAuth and make it a separate test.
@davecgh davecgh added this to the 2.2.0 milestone Mar 10, 2026
@davecgh davecgh added the bug label Mar 10, 2026
Copy link
Copy Markdown
Member

@davecgh davecgh left a comment

Choose a reason for hiding this comment

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

Nice find! Thanks for the PR.

This fixes an issue where the server treated an unset admin auth hash as
unconditional success under the assumption that this state corresponds
to the server running certificate auth. However, the server can also
reach this state under basic auth by configuring limited credentials
without admin credentials. In this case the limited user would have
unrestricted access to all admin functions.
@jholdstock
Copy link
Copy Markdown
Member Author

Included both of the suggested changes

@davecgh davecgh merged commit 2d6b770 into decred:master Mar 10, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants