Skip to content

docs: TrUAPI host permission requirements matrix#209

Open
filvecchiato wants to merge 1 commit into
mainfrom
docs/permission-requirements
Open

docs: TrUAPI host permission requirements matrix#209
filvecchiato wants to merge 1 commit into
mainfrom
docs/permission-requirements

Conversation

@filvecchiato

@filvecchiato filvecchiato commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds docs/host-permission-requirements.md — a comprehensive reference listing every TrUAPI method with its authentication and permission requirements
  • Covers all 55+ methods across device permissions, remote permissions, signing confirmations, identity disclosure, payment confirmations, chat, resource allocation, and CoinPayment
  • Includes a quick-reference matrix at the bottom for at-a-glance lookup

Addresses paritytech/sdk-team#27.

Test plan

  • Review matrix against host implementations (dotli, mobile) for completeness
  • Share with host implementers for feedback

@filvecchiato filvecchiato requested a review from a team June 10, 2026 14:17

@pgherveou pgherveou left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

not sure the audit files belong here.
they should probably be issues in the related repo instead.

We should think of a way to automate this.
e2e tests should validate that permission gated methods show the permission modal on top of checking the results


| Method | Prompt trigger | Error on denial |
|--------|---------------|-----------------|
| `host_get_user_id` | Always — user approves revealing their primary DotNS name to the product | `PermissionDenied` |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is that a "Always" ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I recall a conversation where this was marked as a fairly important permission and should be always asked, not once and perpetuated in time.

Comment thread dotli-permission-audit.md Outdated
Comment on lines +6 to +15

| Method | Spec requires | Dotli does | Severity |
|--------|--------------|------------|----------|
| `host_sign_raw` | ChainSubmit permission + signing modal | Shows signing modal but **skips ChainSubmit permission check** (inconsistent with `host_sign_payload` which checks it) | High |
| `host_sign_raw_with_legacy_account` | ChainSubmit permission + signing modal | Shows signing modal but **skips ChainSubmit permission check** (inconsistent with `host_sign_payload_with_legacy_account`) | High |
| `host_get_legacy_accounts` | Return empty array | Returns session's `remoteAccount.accountId` + `liteUsername` when authenticated — **leaks identity** | High |
| `remote_chain_transaction_stop` | `RemotePermission::ChainSubmit` check | Relayed by broker **without ChainSubmit permission check** | Medium |
| `host_navigate_to` | `DevicePermission::OpenUrl` prompt | Auto-granted, no prompt | Medium |
| `host_push_notification` | `DevicePermission::Notifications` check | **No permission check** in handler | Medium |
| `host_push_notification_cancel` | `DevicePermission::Notifications` check (same grant) | **No permission check** in handler | Low |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should move that to issue tickets.
Ideally this can be fully tested with playwright cc @valentinfernandez1 who worked on this

Comment thread dotli-permission-audit.md Outdated
@filvecchiato

Copy link
Copy Markdown
Collaborator Author

Host-specific permission compliance issues filed:

  • paritytech/dotli#545
  • paritytech/polkadot-desktop#616
  • paritytech/polkadot-app-android-v2#849
  • paritytech/polkadot-app-ios-v2#1108

@filvecchiato filvecchiato force-pushed the docs/permission-requirements branch 3 times, most recently from 35f5836 to 8b33234 Compare June 11, 2026 19:21
Add docs/host-permission-requirements.md covering every TrUAPI method
with its authentication, prompt, and permission requirements across
four tiers.

Add per-host compliance audits (dotli, polkadot-desktop, android, iOS)
and a cross-host recap matrix comparing permission enforcement.
@filvecchiato filvecchiato force-pushed the docs/permission-requirements branch from 8b33234 to d520726 Compare June 11, 2026 19:25
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.

2 participants