Enable user attributes on ingress messages#6202
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for user attributes on ingress messages to the IC interface specification. It introduces a new optional sender_info field on call and query requests that allows ingress messages to carry auxiliary information about the caller when authenticated via canister signatures (e.g., Internet Identity). This information is then exposed to canisters through four new System API functions.
Changes:
- Added
sender_infooptional map field (withinfoandsigsub-fields) to the asynchronous call and query request definitions. - Added four new System API imports:
ic0.msg_caller_info_data_size,ic0.msg_caller_info_data_copy,ic0.msg_caller_info_sender_size,ic0.msg_caller_info_sender_copy. - Added documentation for the new System API functions describing their semantics.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… into bjoern/sender_info
Co-authored-by: Andrea Cerulli <19587477+andreacerulli@users.noreply.github.com>
This PR makes `SenderInfo` available to the relevant variants of `ApiType` (according to the system API availability specified in this [PR](dfinity/portal#6202)). To this end, the PR introduces a new field `sender_info` in `CallContext` to persist the sender info and make it available in callbacks, too. --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This PR makes `SenderInfo` available to the relevant variants of `ApiType` (according to the system API availability specified in this [PR](dfinity/portal#6202)). To this end, the PR introduces a new field `sender_info` in `CallContext` to persist the sender info and make it available in callbacks, too. --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This PR makes `SenderInfo` available to the relevant variants of `ApiType` (according to the system API availability specified in this [PR](dfinity/portal#6202)). To this end, the PR introduces a new field `sender_info` in `CallContext` to persist the sender info and make it available in callbacks, too. --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* Draft changes for attribute passing. * Added function returning the canister id. * Clarify explanation. * Make signature verification statement more precise. * Add sender_info to sync call * Add domain separator to signature. * Add fields to CDDL. * Update docs/references/ic-interface-spec.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Attempt to fix CDDL. * Update docs/references/ic-interface-spec.md Co-authored-by: Andrea Cerulli <19587477+andreacerulli@users.noreply.github.com> * fix * fix * formal model * typo * fix canister_signature_pk call sites * fix * fix composite_query_helper * Add signer to the sender_info struct * signer * typo * note on signer field * typo * formulation * changelog * fixes * signer --------- Co-authored-by: Bjoern Tackmann <bjoern@dfinity.org> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: mraszyk <31483726+mraszyk@users.noreply.github.com> Co-authored-by: Andrea Cerulli <19587477+andreacerulli@users.noreply.github.com> Co-authored-by: Martin Raszyk <martin.raszyk@dfinity.org>
* feat: allow HTTP requests with effective subnet ID * Point out that subnet ID cannot be used for every update call Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Point out that subnet ID cannot be used for every update call Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Point out that subnet ID cannot be used for every update call Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Point out that subnet ID cannot be used for every update call Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * manual fixes * no api/v2/subnet/.../call * fix * fixes * query call to ic00.list_canisters * provisional_create_canister_with_cycles * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: no @dfinity/research in CODEOWNERS (#6233) * feat: query call for subnet admins to list all canisters on a subnet (#6223) * Enable user attributes on ingress messages (#6202) * Draft changes for attribute passing. * Added function returning the canister id. * Clarify explanation. * Make signature verification statement more precise. * Add sender_info to sync call * Add domain separator to signature. * Add fields to CDDL. * Update docs/references/ic-interface-spec.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Attempt to fix CDDL. * Update docs/references/ic-interface-spec.md Co-authored-by: Andrea Cerulli <19587477+andreacerulli@users.noreply.github.com> * fix * fix * formal model * typo * fix canister_signature_pk call sites * fix * fix composite_query_helper * Add signer to the sender_info struct * signer * typo * note on signer field * typo * formulation * changelog * fixes * signer --------- Co-authored-by: Bjoern Tackmann <bjoern@dfinity.org> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: mraszyk <31483726+mraszyk@users.noreply.github.com> Co-authored-by: Andrea Cerulli <19587477+andreacerulli@users.noreply.github.com> Co-authored-by: Martin Raszyk <martin.raszyk@dfinity.org> * typos * typos * verify_envelope * typos * assert SubnetId matches effective_subnet_id * fixes * verify_subnet_response * fixes * final fixes * wording * typo * changelog --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Björn Tackmann <54846571+Dfinity-Bjoern@users.noreply.github.com> Co-authored-by: Bjoern Tackmann <bjoern@dfinity.org> Co-authored-by: Andrea Cerulli <19587477+andreacerulli@users.noreply.github.com>
Enable ingress messages to carry auxiliary information about the
callerin case thecalleris authenticated through canister signatures, which in particular includes II. This feature is needed to pass data such as identity attributes to the canister, but can also be used more broadly to include information about the user as required.This design is based on a discussion with Dom on March 3.