Skip to content

feat: verify and enforce authorization and roles - #155

Open
hpmaxi wants to merge 3 commits into
mainfrom
feat/78-authorization-model
Open

hpmaxi wants to merge 3 commits into
mainfrom
feat/78-authorization-model

Conversation

@hpmaxi

@hpmaxi hpmaxi commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

  • Enforce strict caller authentication: eliminate decorative _caller parameters across AsyncVault, ShareToken, NavOracle, and IdentityVerifier by explicitly calling caller.require_auth().
  • Add comprehensive unauthorized caller refusal tests for every privileged entrypoint across all four contracts:
    • ShareToken: pause, unpause, mint, burn, forced_transfer, set_address_frozen, freeze_partial_tokens, unfreeze_partial_tokens, recover_balance, set_compliance, set_identity_verifier.
    • IdentityVerifier: allow and allowlist verification enforcement.
    • NavOracle: set_config and clear_latest refusal for unauthorized callers.
    • AsyncVault: cancel_wind_down_proposal refusal for non-admin.
  • Document the dual manager role distinction (AsyncVault epoch closure vs. ShareToken mint/burn/forced transfer) and script deployment safety.
  • Document why compliance and attester are validated in AsyncVault::__constructor (separation of duties).
  • Document all open entrypoints (fund, fulfill_epoch, activate_wind_down, finalize_wind_down_round, claim_wind_down) and their sound design rationale.
  • Add docs/AUTHORIZATION_MATRIX.md and link in docs/strata-product-and-architecture.md.

Closes #78

@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
strata-vault-kit-app Ready Ready Preview Sep 25, 2026 6:21pm UTC

Request Review

@luchobonatti luchobonatti left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tests and clippy are green and the matrix is the right deliverable for #78. Two inconsistencies I would fix before merging, inline.

Comment thread docs/AUTHORIZATION_MATRIX.md
Comment thread contracts/share-token/src/contract.rs
Base automatically changed from feat/79-pre-audit-arithmetic to main September 25, 2026 17:50
Fix the set_config and claim_wind_down rows, cite the refusal tests that exist, record that the share token keeps the default renounce_admin, and state what the deploy script actually checks.

@luchobonatti luchobonatti left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Matrix now matches the code row by row, and every cited test exists. Recording the share token renounce_admin gap here and fixing it in #169 is the right split. Workspace suite, clippy and fmt clean.

This branch was successfully deployed

1 active deployment
Preview — 0e46a0d1 Deployed Sep 25, 2026 by vercel[bot]
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.

Check the authorization and role model end to end

2 participants