From 2ee5a3ae7f6d8d80951d35a5cf28e9c94365e42d Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Thu, 19 Feb 2026 13:48:32 +0100 Subject: [PATCH 1/3] feat: update Satellite template did and crates as released in Juno v69 Signed-off-by: David Dal Busco --- templates/eject/rust/src/satellite/Cargo.toml | 2 +- templates/eject/rust/src/satellite/satellite.did | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/eject/rust/src/satellite/Cargo.toml b/templates/eject/rust/src/satellite/Cargo.toml index 08133725..c888bb78 100644 --- a/templates/eject/rust/src/satellite/Cargo.toml +++ b/templates/eject/rust/src/satellite/Cargo.toml @@ -12,7 +12,7 @@ ic-cdk = "0.19.0" ic-cdk-macros = "0.19.0" serde = "1.0.225" serde_cbor = "0.11.2" -junobuild-satellite = "0.4.0" +junobuild-satellite = "0.5.0" junobuild-macros = "0.2.0" junobuild-utils = "0.2.0" diff --git a/templates/eject/rust/src/satellite/satellite.did b/templates/eject/rust/src/satellite/satellite.did index 91cbee0f..81d03aee 100644 --- a/templates/eject/rust/src/satellite/satellite.did +++ b/templates/eject/rust/src/satellite/satellite.did @@ -1,3 +1,8 @@ +// This file was automatically generated by the Juno CLI. +// Any modifications may be overwritten. + +import service "satellite_extension.did"; + type AssetEncodingNoContent = record { modified : nat64; sha256 : blob; From 3b9b61a8cb4e7389a9d93480569de6a02a47a291 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Thu, 19 Feb 2026 13:49:10 +0100 Subject: [PATCH 2/3] chore: revert Signed-off-by: David Dal Busco --- templates/eject/rust/src/satellite/satellite.did | 5 ----- 1 file changed, 5 deletions(-) diff --git a/templates/eject/rust/src/satellite/satellite.did b/templates/eject/rust/src/satellite/satellite.did index 81d03aee..91cbee0f 100644 --- a/templates/eject/rust/src/satellite/satellite.did +++ b/templates/eject/rust/src/satellite/satellite.did @@ -1,8 +1,3 @@ -// This file was automatically generated by the Juno CLI. -// Any modifications may be overwritten. - -import service "satellite_extension.did"; - type AssetEncodingNoContent = record { modified : nat64; sha256 : blob; From 551712c0238b6a1fc2709f825a6f2412b98febea Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Thu, 19 Feb 2026 13:50:44 +0100 Subject: [PATCH 3/3] feat: update did Signed-off-by: David Dal Busco --- .../eject/rust/src/satellite/satellite.did | 89 ++++++++++++++++--- 1 file changed, 79 insertions(+), 10 deletions(-) diff --git a/templates/eject/rust/src/satellite/satellite.did b/templates/eject/rust/src/satellite/satellite.did index 91cbee0f..33b60cf5 100644 --- a/templates/eject/rust/src/satellite/satellite.did +++ b/templates/eject/rust/src/satellite/satellite.did @@ -20,12 +20,25 @@ type AssetNoContent = record { version : opt nat64; }; type AssetsUpgradeOptions = record { clear_existing_assets : opt bool }; +type AuthenticateAutomationArgs = variant { + OpenId : OpenIdPrepareAutomationArgs; +}; +type AuthenticateAutomationResultResponse = variant { + Ok : record { principal; AutomationController }; + Err : AuthenticationAutomationError; +}; type AuthenticateResultResponse = variant { Ok : Authentication; Err : AuthenticationError; }; type Authentication = record { doc : Doc; delegation : PreparedDelegation }; type AuthenticationArgs = variant { OpenId : OpenIdPrepareDelegationArgs }; +type AuthenticationAutomationError = variant { + PrepareAutomation : PrepareAutomationError; + RegisterController : text; + SaveWorkflowMetadata : text; + SaveUniqueJtiToken : text; +}; type AuthenticationConfig = record { updated_at : opt nat64; openid : opt AuthenticationConfigOpenId; @@ -40,13 +53,31 @@ type AuthenticationConfigInternetIdentity = record { }; type AuthenticationConfigOpenId = record { observatory_id : opt principal; - providers : vec record { OpenIdProvider; OpenIdProviderConfig }; + providers : vec record { OpenIdDelegationProvider; OpenIdAuthProviderConfig }; }; type AuthenticationError = variant { PrepareDelegation : PrepareDelegationError; RegisterUser : text; }; type AuthenticationRules = record { allowed_callers : vec principal }; +type AutomationConfig = record { + updated_at : opt nat64; + openid : opt AutomationConfigOpenId; + created_at : opt nat64; + version : opt nat64; +}; +type AutomationConfigOpenId = record { + observatory_id : opt principal; + providers : vec record { + OpenIdAutomationProvider; + OpenIdAutomationProviderConfig; + }; +}; +type AutomationController = record { + scope : AutomationScope; + expires_at : nat64; +}; +type AutomationScope = variant { Write; Submit }; type CollectionType = variant { Db; Storage }; type CommitBatch = record { batch_id : nat; @@ -58,15 +89,18 @@ type Config = record { db : opt DbConfig; authentication : opt AuthenticationConfig; storage : StorageConfig; + automation : opt AutomationConfig; }; type ConfigMaxMemorySize = record { stable : opt nat64; heap : opt nat64 }; type Controller = record { updated_at : nat64; metadata : vec record { text; text }; + kind : opt ControllerKind; created_at : nat64; scope : ControllerScope; expires_at : opt nat64; }; +type ControllerKind = variant { Emulator; Automation }; type ControllerScope = variant { Write; Admin; Submit }; type CustomDomain = record { updated_at : nat64; @@ -106,6 +140,7 @@ type GetDelegationError = variant { JwtVerify : JwtVerifyError; GetOrFetchJwks : GetOrRefreshJwksError; DeriveSeedFailed : text; + InvalidObservatoryId : text; }; type GetDelegationResultResponse = variant { Ok : SignedDelegation; @@ -210,33 +245,55 @@ type ListRulesResults = record { }; type Memory = variant { Heap; Stable }; type MemorySize = record { stable : nat64; heap : nat64 }; +type OpenIdAuthProviderConfig = record { + delegation : opt OpenIdAuthProviderDelegationConfig; + client_id : text; +}; +type OpenIdAuthProviderDelegationConfig = record { + targets : opt vec principal; + max_time_to_live : opt nat64; +}; +type OpenIdAutomationProvider = variant { GitHub }; +type OpenIdAutomationProviderConfig = record { + controller : opt OpenIdAutomationProviderControllerConfig; + repositories : vec record { RepositoryKey; OpenIdAutomationRepositoryConfig }; +}; +type OpenIdAutomationProviderControllerConfig = record { + scope : opt AutomationScope; + max_time_to_live : opt nat64; +}; +type OpenIdAutomationRepositoryConfig = record { refs : opt vec text }; +type OpenIdDelegationProvider = variant { GitHub; Google }; type OpenIdGetDelegationArgs = record { jwt : text; session_key : blob; salt : blob; expiration : nat64; }; +type OpenIdPrepareAutomationArgs = record { jwt : text; salt : blob }; type OpenIdPrepareDelegationArgs = record { jwt : text; session_key : blob; salt : blob; }; -type OpenIdProvider = variant { Google }; -type OpenIdProviderConfig = record { - delegation : opt OpenIdProviderDelegationConfig; - client_id : text; -}; -type OpenIdProviderDelegationConfig = record { - targets : opt vec principal; - max_time_to_live : opt nat64; -}; type Permission = variant { Controllers; Private; Public; Managed }; +type PrepareAutomationError = variant { + JwtFindProvider : JwtFindProviderError; + InvalidController : text; + GetCachedJwks; + JwtVerify : JwtVerifyError; + GetOrFetchJwks : GetOrRefreshJwksError; + ControllerAlreadyExists; + InvalidObservatoryId : text; + TooManyControllers : text; +}; type PrepareDelegationError = variant { JwtFindProvider : JwtFindProviderError; GetCachedJwks; JwtVerify : JwtVerifyError; GetOrFetchJwks : GetOrRefreshJwksError; DeriveSeedFailed : text; + InvalidObservatoryId : text; }; type PreparedDelegation = record { user_key : blob; expiration : nat64 }; type Proposal = record { @@ -263,6 +320,7 @@ type ProposalType = variant { SegmentsDeployment : SegmentsDeploymentOptions; }; type RateConfig = record { max_tokens : nat64; time_per_token_ns : nat64 }; +type RepositoryKey = record { owner : text; name : text }; type Rule = record { max_capacity : opt nat32; memory : opt Memory; @@ -287,8 +345,13 @@ type SetAuthenticationConfig = record { internet_identity : opt AuthenticationConfigInternetIdentity; rules : opt AuthenticationRules; }; +type SetAutomationConfig = record { + openid : opt AutomationConfigOpenId; + version : opt nat64; +}; type SetController = record { metadata : vec record { text; text }; + kind : opt ControllerKind; scope : ControllerScope; expires_at : opt nat64; }; @@ -373,6 +436,9 @@ type UploadChunk = record { type UploadChunkResult = record { chunk_id : nat }; service : (InitSatelliteArgs) -> { authenticate : (AuthenticationArgs) -> (AuthenticateResultResponse); + authenticate_automation : (AuthenticateAutomationArgs) -> ( + AuthenticateAutomationResultResponse, + ); commit_asset_upload : (CommitBatch) -> (); commit_proposal : (CommitProposal) -> (null); commit_proposal_asset_upload : (CommitBatch) -> (); @@ -384,6 +450,7 @@ service : (InitSatelliteArgs) -> { count_proposals : () -> (nat64) query; del_asset : (text, text) -> (); del_assets : (text) -> (); + del_controller_self : () -> (); del_controllers : (DeleteControllersArgs) -> ( vec record { principal; Controller }, ); @@ -399,6 +466,7 @@ service : (InitSatelliteArgs) -> { deposit_cycles : (DepositCyclesArgs) -> (); get_asset : (text, text) -> (opt AssetNoContent) query; get_auth_config : () -> (opt AuthenticationConfig) query; + get_automation_config : () -> (opt AutomationConfig) query; get_config : () -> (Config); get_db_config : () -> (opt DbConfig) query; get_delegation : (GetDelegationArgs) -> (GetDelegationResultResponse) query; @@ -432,6 +500,7 @@ service : (InitSatelliteArgs) -> { reject_proposal : (CommitProposal) -> (null); set_asset_token : (text, text, opt text) -> (); set_auth_config : (SetAuthenticationConfig) -> (AuthenticationConfig); + set_automation_config : (SetAutomationConfig) -> (AutomationConfig); set_controllers : (SetControllersArgs) -> ( vec record { principal; Controller }, );