Microsoft Agent Framework: Role-bound Bitcoin Tool Authorization
Microsoft Agent Framework: Role-bound Bitcoin Tool Authorization
Research question
Bind the authenticated employee role outside the model. A tool invocation is a proposal, not an identity assertion.
Enterprise architecture
Keep the platform orchestration layer separate from the wallet execution process. Authenticate the calling workload, enforce least privilege and bind each request to an operator-approved purpose. Treat model output as untrusted data. The following independent Python fragment illustrates one boundary; it is not a native platform plugin.
Source implementation
1def authorize(role, tool):
2 return role == "treasury_reader" and tool == "bitcoin_balance"
3
4assert authorize("treasury_reader", "bitcoin_balance")
5assert not authorize("treasury_reader", "bitcoin_send")
6assert not authorize("guest", "bitcoin_balance")Integration with WAB ENGINE
A trusted local executor may read a Testnet SegWit balance using POST /api/v5/btc/wallet/balance, header X-BTC-KEY and JSON body {"net":"test","type":"segwit"}. Keep the credential in the executor, not the model, CRM, ERP or workflow logs. Restrict network access and avoid exposing the engine directly to a hosted agent. A read-only tool boundary does not make the underlying BTC KEY read-only.
Failure handling and production requirements
The role must come from verified enterprise identity, not a tool argument. Apply the check before dispatch and do not expose a generic HTTP tool. Fail closed on missing authorization, invalid inputs, engine errors and ambiguous results. Do not retry financial writes blindly. Future SEND integrations require separate authorization bound to the exact intent and persistent idempotency; the immutable signed fee law remains unchanged.
Scope and references
The sample uses synthetic data and Python standard language features. Its embedded assertions were executed locally. No platform SDK, live engine, cloud service or current platform version was tested. The documentation link is a starting point, not a claim of verified current compatibility.
- Platform documentation: https://learn.microsoft.com/en-us/agent-framework/
- Engine API: https://thamer.org/api
- Engine: https://thamer.org/engine
- Source repository: https://thamer.org/repo/
