From 81e659789791f4ce85a200966b334920bc76f732 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Fri, 20 Mar 2026 07:00:08 +0100 Subject: [PATCH 1/5] docs: access keys and guards references in rust Signed-off-by: David Dal Busco --- docs/reference/functions/rust/sdk.mdx | 62 ++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 10 deletions(-) diff --git a/docs/reference/functions/rust/sdk.mdx b/docs/reference/functions/rust/sdk.mdx index 69d92587..7ee0430b 100644 --- a/docs/reference/functions/rust/sdk.mdx +++ b/docs/reference/functions/rust/sdk.mdx @@ -316,33 +316,75 @@ pub fn get_content_chunks_store( --- -## Controllers +## Access Keys -The following functions allow you to inspect and assert the controllers of your Satellite. +The following functions allow you to inspect and assert the access keys of your Satellite. --- -### get_controllers +### get_access_keys -Retrieves all controllers of the Satellite. +Retrieves all access keys of the Satellite. ```rust -pub fn get_controllers() -> Controllers +pub fn get_access_keys() -> AccessKeys ``` -📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.get_controllers.html) +📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.get_access_keys.html) --- -### get_admin_controllers +### get_admin_access_keys -Retrieves only the admin controllers of the Satellite. +Retrieves only the admin access_keys of the Satellite. ```rust -pub fn get_admin_controllers() -> Controllers +pub fn get_admin_access_keys() -> AccessKeys ``` -📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.get_admin_controllers.html) +📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.get_admin_access_keys.html) + +--- + +## Guards + +The following guard functions can be used to validate the caller in your custom serverless functions. + +--- + +### caller_is_admin + +Guards that the caller is an admin access key of this satellite. Admin access keys have full management privileges and never expire. + +```rust +pub fn caller_is_admin() -> Result<(), String> +``` + +📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.caller_is_admin.html) + +--- + +### caller_has_write_permission + +Guards that the caller has write permission. Admin and editor access keys pass; submitter access keys do not. + +```rust +pub fn caller_has_write_permission() -> Result<(), String> +``` + +📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.caller_has_write_permission.html) + +--- + +### caller_is_access_key + +Guards that the caller is any recognized access key of this satellite. Accepts admin, editor, and submitter access keys alike. + +```rust +pub fn caller_is_access_key() -> Result<(), String> +``` + +📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.caller_is_access_key.html) --- From 6104b0113e57dfb46254aacd6afb71e4c2bbd90b Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 06:01:57 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=93=84=20Update=20LLMs.txt=20snapshot?= =?UTF-8?q?=20for=20PR=20review?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .llms-snapshots/llms-full.txt | 62 +++++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 10 deletions(-) diff --git a/.llms-snapshots/llms-full.txt b/.llms-snapshots/llms-full.txt index fc06c1e4..cb456009 100644 --- a/.llms-snapshots/llms-full.txt +++ b/.llms-snapshots/llms-full.txt @@ -12141,33 +12141,75 @@ pub fn get_content_chunks_store( encoding: &AssetEncoding, chunk_index: us --- -## Controllers +## Access Keys -The following functions allow you to inspect and assert the controllers of your Satellite. +The following functions allow you to inspect and assert the access keys of your Satellite. --- -### get\_controllers +### get\_access\_keys -Retrieves all controllers of the Satellite. +Retrieves all access keys of the Satellite. ``` -pub fn get_controllers() -> Controllers +pub fn get_access_keys() -> AccessKeys ``` -📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.get_controllers.html) +📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.get_access_keys.html) --- -### get\_admin\_controllers +### get\_admin\_access\_keys -Retrieves only the admin controllers of the Satellite. +Retrieves only the admin access\_keys of the Satellite. ``` -pub fn get_admin_controllers() -> Controllers +pub fn get_admin_access_keys() -> AccessKeys ``` -📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.get_admin_controllers.html) +📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.get_admin_access_keys.html) + +--- + +## Guards + +The following guard functions can be used to validate the caller in your custom serverless functions. + +--- + +### caller\_is\_admin + +Guards that the caller is an admin access key of this satellite. Admin access keys have full management privileges and never expire. + +``` +pub fn caller_is_admin() -> Result<(), String> +``` + +📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.caller_is_admin.html) + +--- + +### caller\_has\_write\_permission + +Guards that the caller has write permission. Admin and editor access keys pass; submitter access keys do not. + +``` +pub fn caller_has_write_permission() -> Result<(), String> +``` + +📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.caller_has_write_permission.html) + +--- + +### caller\_is\_access\_key + +Guards that the caller is any recognized access key of this satellite. Accepts admin, editor, and submitter access keys alike. + +``` +pub fn caller_is_access_key() -> Result<(), String> +``` + +📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.caller_is_access_key.html) --- From 86a7e88af97bda82f312ee2661c6f243da3b3a75 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Fri, 20 Mar 2026 19:16:51 +0100 Subject: [PATCH 3/5] docs: access keys fn Signed-off-by: David Dal Busco --- docs/reference/functions/rust/sdk.mdx | 45 +++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/docs/reference/functions/rust/sdk.mdx b/docs/reference/functions/rust/sdk.mdx index 7ee0430b..662e344d 100644 --- a/docs/reference/functions/rust/sdk.mdx +++ b/docs/reference/functions/rust/sdk.mdx @@ -346,6 +346,51 @@ pub fn get_admin_access_keys() -> AccessKeys --- +### is_valid_access_key + +Checks if a principal is a non-expired access key regardless of scope (admin, write, or submit). + +```rust +pub fn is_valid_access_key( + id: Principal, + access_keys: &AccessKeys, +) -> bool +``` + +📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.is_valid_access_key.html) + +--- + +### is_write_access_key + +Checks if a principal is a non-expired access key with admin or write scope. + +```rust +pub fn is_write_access_key( + id: Principal, + access_keys: &AccessKeys, +) -> bool +``` + +📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.is_write_access_key.html) + +--- + +### is_admin_controller + +Checks if a principal is an admin access key and a controller known by the Internet Computer. + +```rust +pub fn is_admin_controller( + id: Principal, + access_keys: &AccessKeys, +) -> bool +``` + +📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.is_admin_controller.html) + +--- + ## Guards The following guard functions can be used to validate the caller in your custom serverless functions. From 687fe41478ff89c86203e3b94e864b65434bc048 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 18:18:45 +0000 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=93=84=20Update=20LLMs.txt=20snapshot?= =?UTF-8?q?=20for=20PR=20review?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .llms-snapshots/llms-full.txt | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.llms-snapshots/llms-full.txt b/.llms-snapshots/llms-full.txt index cb456009..85751053 100644 --- a/.llms-snapshots/llms-full.txt +++ b/.llms-snapshots/llms-full.txt @@ -12171,6 +12171,42 @@ pub fn get_admin_access_keys() -> AccessKeys --- +### is\_valid\_access\_key + +Checks if a principal is a non-expired access key regardless of scope (admin, write, or submit). + +``` +pub fn is_valid_access_key( id: Principal, access_keys: &AccessKeys,) -> bool +``` + +📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.is_valid_access_key.html) + +--- + +### is\_write\_access\_key + +Checks if a principal is a non-expired access key with admin or write scope. + +``` +pub fn is_write_access_key( id: Principal, access_keys: &AccessKeys,) -> bool +``` + +📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.is_write_access_key.html) + +--- + +### is\_admin\_controller + +Checks if a principal is an admin access key and a controller known by the Internet Computer. + +``` +pub fn is_admin_controller( id: Principal, access_keys: &AccessKeys,) -> bool +``` + +📦 See full definition on [docs.rs](https://docs.rs/junobuild-satellite/latest/junobuild_satellite/fn.is_admin_controller.html) + +--- + ## Guards The following guard functions can be used to validate the caller in your custom serverless functions. From 032689baa705ece2b74cc630234deec295981cd9 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 15:19:35 +0000 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=93=84=20Update=20LLMs.txt=20snapshot?= =?UTF-8?q?=20for=20PR=20review?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .llms-snapshots/llms-full.txt | 60 +++++++++++++++++------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.llms-snapshots/llms-full.txt b/.llms-snapshots/llms-full.txt index 85751053..c70be895 100644 --- a/.llms-snapshots/llms-full.txt +++ b/.llms-snapshots/llms-full.txt @@ -10042,36 +10042,36 @@ For most applications, we recommend using the default subnets and staying on the | Subnet ID | Type | Canisters (Running/Stopped) | Nodes (Up/Total) | | --- | --- | --- | --- | -| 6pbhf-qzpdk-kuqbr-pklfa-5ehhf-jfjps-zsj6q-57nrl-kzhpd-mu7hc-vae | Juno's Subnet | 36185/704 | 13/13 | -| pzp6e-ekpqk-3c5x7-2h6so-njoeq-mt45d-h3h6c-q3mxf-vpeq5-fk5o7-yae | Fiduciary | 3564/12 | 34/34 | -| bkfrj-6k62g-dycql-7h53p-atvkj-zg4to-gaogh-netha-ptybj-ntsgw-rqe | European | 25096/663 | 13/13 | -| brlsh-zidhj-3yy3e-6vqbz-7xnih-xeq2l-as5oc-g32c4-i5pdn-2wwof-oae | | 35432/815 | 13/13 | -| o3ow2-2ipam-6fcjo-3j5vt-fzbge-2g7my-5fz2m-p4o2t-dwlc4-gt2q7-5ae | | 57571/170 | 13/13 | -| 4ecnw-byqwz-dtgss-ua2mh-pfvs7-c3lct-gtf4e-hnu75-j7eek-iifqm-sqe | | 8684/303 | 13/13 | -| opn46-zyspe-hhmyp-4zu6u-7sbrh-dok77-m7dch-im62f-vyimr-a3n2c-4ae | | 40491/835 | 13/13 | -| nl6hn-ja4yw-wvmpy-3z2jx-ymc34-pisx3-3cp5z-3oj4a-qzzny-jbsv3-4qe | | 32293/818 | 13/13 | -| io67a-2jmkw-zup3h-snbwi-g6a5n-rm5dn-b6png-lvdpl-nqnto-yih6l-gqe | | 2997/2528 | 13/13 | -| ejbmu-grnam-gk6ol-6irwa-htwoj-7ihfl-goimw-hlnvh-abms4-47v2e-zqe | | 12068/111 | 13/13 | -| gmq5v-hbozq-uui6y-o55wc-ihop3-562wb-3qspg-nnijg-npqp5-he3cj-3ae | | 34558/256 | 13/13 | -| pjljw-kztyl-46ud4-ofrj6-nzkhm-3n4nt-wi3jt-ypmav-ijqkt-gjf66-uae | | 32743/243 | 12/13 | -| 4zbus-z2bmt-ilreg-xakz4-6tyre-hsqj4-slb4g-zjwqo-snjcc-iqphi-3qe | | 59568/87 | 13/13 | -| 5kdm2-62fc6-fwnja-hutkz-ycsnm-4z33i-woh43-4cenu-ev7mi-gii6t-4ae | | 13234/154 | 13/13 | -| e66qm-3cydn-nkf4i-ml4rb-4ro6o-srm5s-x5hwq-hnprz-3meqp-s7vks-5qe | | 35861/769 | 13/13 | -| qdvhd-os4o2-zzrdw-xrcv4-gljou-eztdp-bj326-e6jgr-tkhuc-ql6v2-yqe | | 53577/125 | 13/13 | -| snjp4-xlbw4-mnbog-ddwy6-6ckfd-2w5a2-eipqo-7l436-pxqkh-l6fuv-vae | | 4277/1511 | 13/13 | -| shefu-t3kr5-t5q3w-mqmdq-jabyv-vyvtf-cyyey-3kmo4-toyln-emubw-4qe | | 3004/2624 | 13/13 | -| csyj4-zmann-ys6ge-3kzi6-onexi-obayx-2fvak-zersm-euci4-6pslt-lae | | 3682/1812 | 13/13 | -| yinp6-35cfo-wgcd2-oc4ty-2kqpf-t4dul-rfk33-fsq3r-mfmua-m2ngh-jqe | | 8457/582 | 13/13 | -| w4asl-4nmyj-qnr7c-6cqq4-tkwmt-o26di-iupkq-vx4kt-asbrx-jzuxh-4ae | | 3151/2468 | 12/13 | -| c4isl-65rwf-emhk5-5ta5m-ngl73-rgrl3-tcc56-2hkja-4erqd-iivmy-7ae | | 1700/4011 | 13/13 | -| mpubz-g52jc-grhjo-5oze5-qcj74-sex34-omprz-ivnsm-qvvhr-rfzpv-vae | | 55938/327 | 12/13 | -| fuqsr-in2lc-zbcjj-ydmcw-pzq7h-4xm2z-pto4i-dcyee-5z4rz-x63ji-nae | | 22380/117 | 13/13 | -| cv73p-6v7zi-u67oy-7jc3h-qspsz-g5lrj-4fn7k-xrax3-thek2-sl46v-jae | | 51889/339 | 13/13 | -| pae4o-o6dxf-xki7q-ezclx-znyd6-fnk6w-vkv5z-5lfwh-xym2i-otrrw-fqe | | 5134/630 | 13/13 | -| qxesv-zoxpm-vc64m-zxguk-5sj74-35vrb-tbgwg-pcird-5gr26-62oxl-cae | | 2531/3146 | 13/13 | -| 4utr6-xo2fz-v7fsb-t3wsg-k7sfl-cj2ba-ghdnd-kcrfo-xavdb-ebean-mqe | | 2756/3071 | 13/13 | -| lspz2-jx4pu-k3e7p-znm7j-q4yum-ork6e-6w4q6-pijwq-znehu-4jabe-kqe | | 40004/944 | 13/13 | -| jtdsg-3h6gi-hs7o5-z2soi-43w3z-soyl3-ajnp3-ekni5-sw553-5kw67-nqe | | 27813/206 | 13/13 | +| 6pbhf-qzpdk-kuqbr-pklfa-5ehhf-jfjps-zsj6q-57nrl-kzhpd-mu7hc-vae | Juno's Subnet | 36239/705 | 13/13 | +| pzp6e-ekpqk-3c5x7-2h6so-njoeq-mt45d-h3h6c-q3mxf-vpeq5-fk5o7-yae | Fiduciary | 3784/51 | 34/34 | +| bkfrj-6k62g-dycql-7h53p-atvkj-zg4to-gaogh-netha-ptybj-ntsgw-rqe | European | 25195/718 | 13/13 | +| brlsh-zidhj-3yy3e-6vqbz-7xnih-xeq2l-as5oc-g32c4-i5pdn-2wwof-oae | | 40631/3105 | 13/13 | +| o3ow2-2ipam-6fcjo-3j5vt-fzbge-2g7my-5fz2m-p4o2t-dwlc4-gt2q7-5ae | | 62897/2621 | 13/13 | +| 4ecnw-byqwz-dtgss-ua2mh-pfvs7-c3lct-gtf4e-hnu75-j7eek-iifqm-sqe | | 14032/2669 | 13/13 | +| opn46-zyspe-hhmyp-4zu6u-7sbrh-dok77-m7dch-im62f-vyimr-a3n2c-4ae | | 45968/3193 | 13/13 | +| nl6hn-ja4yw-wvmpy-3z2jx-ymc34-pisx3-3cp5z-3oj4a-qzzny-jbsv3-4qe | | 37244/3167 | 13/13 | +| io67a-2jmkw-zup3h-snbwi-g6a5n-rm5dn-b6png-lvdpl-nqnto-yih6l-gqe | | 8400/4104 | 13/13 | +| ejbmu-grnam-gk6ol-6irwa-htwoj-7ihfl-goimw-hlnvh-abms4-47v2e-zqe | | 16891/2458 | 13/13 | +| gmq5v-hbozq-uui6y-o55wc-ihop3-562wb-3qspg-nnijg-npqp5-he3cj-3ae | | 39707/2520 | 13/13 | +| pjljw-kztyl-46ud4-ofrj6-nzkhm-3n4nt-wi3jt-ypmav-ijqkt-gjf66-uae | | 38043/2604 | 13/13 | +| 4zbus-z2bmt-ilreg-xakz4-6tyre-hsqj4-slb4g-zjwqo-snjcc-iqphi-3qe | | 71502/2364 | 13/13 | +| 5kdm2-62fc6-fwnja-hutkz-ycsnm-4z33i-woh43-4cenu-ev7mi-gii6t-4ae | | 18638/2404 | 13/13 | +| e66qm-3cydn-nkf4i-ml4rb-4ro6o-srm5s-x5hwq-hnprz-3meqp-s7vks-5qe | | 41166/3138 | 13/13 | +| qdvhd-os4o2-zzrdw-xrcv4-gljou-eztdp-bj326-e6jgr-tkhuc-ql6v2-yqe | | 58789/2366 | 13/13 | +| snjp4-xlbw4-mnbog-ddwy6-6ckfd-2w5a2-eipqo-7l436-pxqkh-l6fuv-vae | | 9861/3288 | 13/13 | +| shefu-t3kr5-t5q3w-mqmdq-jabyv-vyvtf-cyyey-3kmo4-toyln-emubw-4qe | | 8360/4158 | 12/13 | +| csyj4-zmann-ys6ge-3kzi6-onexi-obayx-2fvak-zersm-euci4-6pslt-lae | | 9121/3452 | 13/13 | +| yinp6-35cfo-wgcd2-oc4ty-2kqpf-t4dul-rfk33-fsq3r-mfmua-m2ngh-jqe | | 13861/2699 | 13/13 | +| w4asl-4nmyj-qnr7c-6cqq4-tkwmt-o26di-iupkq-vx4kt-asbrx-jzuxh-4ae | | 8465/4153 | 13/13 | +| c4isl-65rwf-emhk5-5ta5m-ngl73-rgrl3-tcc56-2hkja-4erqd-iivmy-7ae | | 6975/5761 | 13/13 | +| mpubz-g52jc-grhjo-5oze5-qcj74-sex34-omprz-ivnsm-qvvhr-rfzpv-vae | | 61396/2580 | 13/13 | +| fuqsr-in2lc-zbcjj-ydmcw-pzq7h-4xm2z-pto4i-dcyee-5z4rz-x63ji-nae | | 28775/2439 | 13/13 | +| cv73p-6v7zi-u67oy-7jc3h-qspsz-g5lrj-4fn7k-xrax3-thek2-sl46v-jae | | 57106/2558 | 13/13 | +| pae4o-o6dxf-xki7q-ezclx-znyd6-fnk6w-vkv5z-5lfwh-xym2i-otrrw-fqe | | 10337/2862 | 13/13 | +| qxesv-zoxpm-vc64m-zxguk-5sj74-35vrb-tbgwg-pcird-5gr26-62oxl-cae | | 8043/4678 | 13/13 | +| 4utr6-xo2fz-v7fsb-t3wsg-k7sfl-cj2ba-ghdnd-kcrfo-xavdb-ebean-mqe | | 7823/4812 | 13/13 | +| lspz2-jx4pu-k3e7p-znm7j-q4yum-ork6e-6w4q6-pijwq-znehu-4jabe-kqe | | 45637/3300 | 13/13 | +| jtdsg-3h6gi-hs7o5-z2soi-43w3z-soyl3-ajnp3-ekni5-sw553-5kw67-nqe | | 33152/2504 | 13/13 | # Wallet