Skip to content

feat: add unauthorized caller tests for admin APIs#632

Merged
Baskarayelu merged 6 commits intoQuickLendX:mainfrom
Christopherdominic:feature/admin-api-unauthorized-tests
Apr 1, 2026
Merged

feat: add unauthorized caller tests for admin APIs#632
Baskarayelu merged 6 commits intoQuickLendX:mainfrom
Christopherdominic:feature/admin-api-unauthorized-tests

Conversation

@Christopherdominic
Copy link
Copy Markdown
Contributor

Summary

  • add negative tests for admin-only APIs to verify unauthorized callers are rejected
  • tighten stored-admin authorization checks for admin wrappers that previously accepted caller-supplied admin addresses
  • document the updated admin authorization model and security assumptions

Testing

  • cargo fmt --all
  • cargo test test_admin -- --nocapture (blocked in sandbox: could not resolve static.crates.io to download time v0.3.41)

Security Notes

  • admin-only wrappers now require an authenticated signature from the canonical stored admin before mutating state
  • unauthorized calls are explicitly tested to ensure there is no silent fallback when a non-admin supplies the stored admin address
  • rejection tests also confirm protected state remains unchanged after failed calls

Closes #581

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 23, 2026

@Christopherdominic Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Christopherdominic
Copy link
Copy Markdown
Contributor Author

The failing Build checks are from other unimplemented issues in your project

@Baskarayelu
Copy link
Copy Markdown
Contributor

Please resolve the conflicts

@Baskarayelu Baskarayelu merged commit 8532a27 into QuickLendX:main Apr 1, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add comprehensive unauthorized caller tests for admin-only APIs

2 participants