Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
175aaec
feat(auth): authenticate workload controller
peterpeterparker Jan 25, 2026
071fd43
refactor: split modules user and workload for jwt verification
peterpeterparker Jan 25, 2026
2baab4a
feat: bubble error
peterpeterparker Jan 25, 2026
ae21dee
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Jan 28, 2026
8e7b6ef
feat: actions
peterpeterparker Jan 28, 2026
e43ac03
feat: set controller
peterpeterparker Jan 28, 2026
3164d87
feat: return result
peterpeterparker Jan 28, 2026
bde258c
feat: try_from
peterpeterparker Jan 28, 2026
da25168
feat: did
peterpeterparker Jan 28, 2026
0d069ca
feat: auth id provider
peterpeterparker Jan 28, 2026
7eb171c
feat: more and rename type
peterpeterparker Jan 28, 2026
9caae39
fea: rename better meaning
peterpeterparker Jan 28, 2026
660c09d
feat: expose
peterpeterparker Jan 28, 2026
8b8a74b
chore: redo include
peterpeterparker Jan 28, 2026
4706433
feat: generate did
peterpeterparker Jan 28, 2026
f87b61a
feat: actions in observatory
peterpeterparker Jan 28, 2026
ed29f56
feat: one time upgrade
peterpeterparker Jan 28, 2026
20c1f5f
feat: one time upgrade
peterpeterparker Jan 28, 2026
0ad8e61
feat: export auth
peterpeterparker Jan 28, 2026
235abb5
chore: fmt
peterpeterparker Jan 28, 2026
9bf3889
chore: merge main
peterpeterparker Jan 29, 2026
46fb0aa
chore: remove unused impl
peterpeterparker Jan 29, 2026
5f193fc
feat: rename
peterpeterparker Jan 29, 2026
1a2f7b7
refactor: move
peterpeterparker Jan 29, 2026
5af54b4
chore: merge main
peterpeterparker Jan 29, 2026
648538b
refactor: move automation
peterpeterparker Jan 29, 2026
f57efd5
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Jan 29, 2026
755e0b8
feat: automation config
peterpeterparker Jan 29, 2026
1c7a033
chore: merge main
peterpeterparker Jan 29, 2026
4319cb0
chore: fmt
peterpeterparker Jan 29, 2026
3201b64
feat: init automation to none
peterpeterparker Jan 29, 2026
8487ecf
feat: make unsafe_find_jwt_provider generic again
peterpeterparker Jan 29, 2026
f1f220b
chore: merge main
peterpeterparker Jan 29, 2026
5f5dd94
chore: merge main
peterpeterparker Jan 29, 2026
17524bd
feat: verify with providers
peterpeterparker Jan 29, 2026
46036ed
chore: merge main
peterpeterparker Jan 29, 2026
cc8713e
feat: rework for consistency and similar pattern plus integration in …
peterpeterparker Jan 29, 2026
a0319b5
feat: move in mod
peterpeterparker Jan 29, 2026
254af33
fix: deleted types
peterpeterparker Jan 29, 2026
dc8daee
chore: merge main
peterpeterparker Jan 29, 2026
8b6b5b2
fix: issues (expect remaining credential todo)
peterpeterparker Jan 30, 2026
05139a2
feat: claims with trait
peterpeterparker Jan 30, 2026
82452dd
test: adapt
peterpeterparker Jan 30, 2026
45087b0
feat: copy claim
peterpeterparker Jan 30, 2026
70197c7
refactor: move nonce
peterpeterparker Jan 30, 2026
81cf01f
chore: merge main
peterpeterparker Jan 30, 2026
7bf62f2
feat: print GitHub
peterpeterparker Jan 30, 2026
a8d4cfc
feat: assert repo
peterpeterparker Jan 30, 2026
418da72
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Jan 31, 2026
5014efa
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Jan 31, 2026
48d82f3
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Feb 1, 2026
c814fbd
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Feb 3, 2026
4d821c5
feat(satellite): save automation jti and basic data (#2565)
peterpeterparker Feb 4, 2026
a563c1d
feat: make custom
peterpeterparker Feb 4, 2026
83e4514
feat: save workflow metadata
peterpeterparker Feb 4, 2026
17259a0
feat: assert write automation
peterpeterparker Feb 4, 2026
8a72073
chore: fmt
peterpeterparker Feb 4, 2026
d77d27e
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Feb 5, 2026
a4c0ac8
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Feb 5, 2026
addad94
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Feb 6, 2026
ef9bd7b
feat: register controller
peterpeterparker Feb 6, 2026
0a37c62
test: remove nonce (there is none here)
peterpeterparker Feb 6, 2026
2282def
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Feb 6, 2026
6ff644f
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Feb 6, 2026
8d45251
feat: generate did
peterpeterparker Feb 6, 2026
b32d169
feat: no rate config jti is unique we can always add one
peterpeterparker Feb 6, 2026
bf14686
feat: controllers assertion
peterpeterparker Feb 6, 2026
f34d384
chore: merge main
peterpeterparker Feb 6, 2026
02f0b7a
chore: clippy
peterpeterparker Feb 6, 2026
161cfed
chore: merge main
peterpeterparker Feb 6, 2026
e523663
chore: remove moved mod
peterpeterparker Feb 6, 2026
5c15bef
feat: set automation
peterpeterparker Feb 6, 2026
7e887bc
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Feb 6, 2026
3ffd51f
feat: expose set automation config
peterpeterparker Feb 6, 2026
51fb242
feat: generate did with automation config
peterpeterparker Feb 6, 2026
7ceed2d
feat: move repo to custom
peterpeterparker Feb 7, 2026
ecd5954
feat: assert audience
peterpeterparker Feb 7, 2026
63c8543
feat: caller is the controller id
peterpeterparker Feb 7, 2026
fc22566
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Feb 7, 2026
c496236
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Feb 8, 2026
5be3f9b
feat: use salt
peterpeterparker Feb 9, 2026
23e66bc
feat: use salt
peterpeterparker Feb 9, 2026
0d51d2c
chore: merge main
peterpeterparker Feb 9, 2026
ef817c8
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Feb 10, 2026
2f4212b
docs: update comment
peterpeterparker Feb 10, 2026
2b3fb29
feat: return automation with get_config
peterpeterparker Feb 10, 2026
0ebeeaf
feat: include set and get automation config
peterpeterparker Feb 10, 2026
742abf4
feat: return prepared automation
peterpeterparker Feb 10, 2026
a4de006
feat: return prepared automation
peterpeterparker Feb 10, 2026
9637248
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Feb 10, 2026
a60a506
chore: merge main
peterpeterparker Feb 11, 2026
5bcbf5a
feat: use trait method instead of passing function
peterpeterparker Feb 12, 2026
3405612
test: target observatory
peterpeterparker Feb 12, 2026
189c38b
feat: target observatory
peterpeterparker Feb 12, 2026
bf2dd67
test: fix
peterpeterparker Feb 12, 2026
520d51c
test: automation
peterpeterparker Feb 12, 2026
c4478af
test: authenticate
peterpeterparker Feb 12, 2026
0a88663
test: prevent jti reused
peterpeterparker Feb 12, 2026
03076d6
test: reuse jti
peterpeterparker Feb 12, 2026
1aff101
chore: fmt
peterpeterparker Feb 12, 2026
5237e46
Merge branch 'main' into feat/authenticate-workload-controller
peterpeterparker Feb 12, 2026
64fb985
test: automation workflow
peterpeterparker Feb 12, 2026
45c6080
Merge remote-tracking branch 'origin/feat/authenticate-workload-contr…
peterpeterparker Feb 12, 2026
945b5b6
test: expiration and kind
peterpeterparker Feb 12, 2026
5d2d23e
test: cap expiration
peterpeterparker Feb 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"@junobuild/cli-tools": "^0.10.1",
"@junobuild/config": "^2.10.1",
"@junobuild/config-loader": "^0.4.8",
"@junobuild/errors": "^0.2.2",
"@junobuild/errors": "^0.2.2-next-2026-02-12",
"@junobuild/functions": "^0.5.6",
"@ltd/j-toml": "^1.38.0",
"@playwright/test": "^1.57.0",
Expand Down
2 changes: 2 additions & 0 deletions src/console/console.did
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ type GetDelegationError = variant {
JwtVerify : JwtVerifyError;
GetOrFetchJwks : GetOrRefreshJwksError;
DeriveSeedFailed : text;
InvalidObservatoryId : text;
};
type GetOrRefreshJwksError = variant {
InvalidConfig : text;
Expand Down Expand Up @@ -262,6 +263,7 @@ type PrepareDelegationError = variant {
JwtVerify : JwtVerifyError;
GetOrFetchJwks : GetOrRefreshJwksError;
DeriveSeedFailed : text;
InvalidObservatoryId : text;
};
type PreparedDelegation = record { user_key : blob; expiration : nat64 };
type Proposal = record {
Expand Down
6 changes: 4 additions & 2 deletions src/declarations/console/console.did.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ export type GetDelegationError =
| { NoSuchDelegation: null }
| { JwtVerify: JwtVerifyError }
| { GetOrFetchJwks: GetOrRefreshJwksError }
| { DeriveSeedFailed: string };
| { DeriveSeedFailed: string }
| { InvalidObservatoryId: string };
export type GetOrRefreshJwksError =
| { InvalidConfig: string }
| { MissingKid: null }
Expand Down Expand Up @@ -319,7 +320,8 @@ export type PrepareDelegationError =
| { GetCachedJwks: null }
| { JwtVerify: JwtVerifyError }
| { GetOrFetchJwks: GetOrRefreshJwksError }
| { DeriveSeedFailed: string };
| { DeriveSeedFailed: string }
| { InvalidObservatoryId: string };
export interface PreparedDelegation {
user_key: Uint8Array;
expiration: bigint;
Expand Down
6 changes: 4 additions & 2 deletions src/declarations/console/console.factory.certified.did.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ export const idlFactory = ({ IDL }) => {
GetCachedJwks: IDL.Null,
JwtVerify: JwtVerifyError,
GetOrFetchJwks: GetOrRefreshJwksError,
DeriveSeedFailed: IDL.Text
DeriveSeedFailed: IDL.Text,
InvalidObservatoryId: IDL.Text
});
const AuthenticationError = IDL.Variant({
PrepareDelegation: PrepareDelegationError,
Expand Down Expand Up @@ -215,7 +216,8 @@ export const idlFactory = ({ IDL }) => {
NoSuchDelegation: IDL.Null,
JwtVerify: JwtVerifyError,
GetOrFetchJwks: GetOrRefreshJwksError,
DeriveSeedFailed: IDL.Text
DeriveSeedFailed: IDL.Text,
InvalidObservatoryId: IDL.Text
});
const Result_1 = IDL.Variant({
Ok: SignedDelegation,
Expand Down
6 changes: 4 additions & 2 deletions src/declarations/console/console.factory.did.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ export const idlFactory = ({ IDL }) => {
GetCachedJwks: IDL.Null,
JwtVerify: JwtVerifyError,
GetOrFetchJwks: GetOrRefreshJwksError,
DeriveSeedFailed: IDL.Text
DeriveSeedFailed: IDL.Text,
InvalidObservatoryId: IDL.Text
});
const AuthenticationError = IDL.Variant({
PrepareDelegation: PrepareDelegationError,
Expand Down Expand Up @@ -215,7 +216,8 @@ export const idlFactory = ({ IDL }) => {
NoSuchDelegation: IDL.Null,
JwtVerify: JwtVerifyError,
GetOrFetchJwks: GetOrRefreshJwksError,
DeriveSeedFailed: IDL.Text
DeriveSeedFailed: IDL.Text,
InvalidObservatoryId: IDL.Text
});
const Result_1 = IDL.Variant({
Ok: SignedDelegation,
Expand Down
6 changes: 4 additions & 2 deletions src/declarations/console/console.factory.did.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ export const idlFactory = ({ IDL }) => {
GetCachedJwks: IDL.Null,
JwtVerify: JwtVerifyError,
GetOrFetchJwks: GetOrRefreshJwksError,
DeriveSeedFailed: IDL.Text
DeriveSeedFailed: IDL.Text,
InvalidObservatoryId: IDL.Text
});
const AuthenticationError = IDL.Variant({
PrepareDelegation: PrepareDelegationError,
Expand Down Expand Up @@ -215,7 +216,8 @@ export const idlFactory = ({ IDL }) => {
NoSuchDelegation: IDL.Null,
JwtVerify: JwtVerifyError,
GetOrFetchJwks: GetOrRefreshJwksError,
DeriveSeedFailed: IDL.Text
DeriveSeedFailed: IDL.Text,
InvalidObservatoryId: IDL.Text
});
const Result_1 = IDL.Variant({
Ok: SignedDelegation,
Expand Down
44 changes: 42 additions & 2 deletions src/declarations/satellite/satellite.did.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,27 @@ export interface AssetNoContent {
export interface AssetsUpgradeOptions {
clear_existing_assets: [] | [boolean];
}
export type AuthenticateAutomationArgs = {
OpenId: OpenIdPrepareAutomationArgs;
};
export type AuthenticateAutomationResultResponse =
| {
Ok: [Principal, AutomationController];
}
| { Err: AuthenticationAutomationError };
export type AuthenticateResultResponse = { Ok: Authentication } | { Err: AuthenticationError };
export interface Authentication {
doc: Doc;
delegation: PreparedDelegation;
}
export type AuthenticationArgs = { OpenId: OpenIdPrepareDelegationArgs };
export type AuthenticationAutomationError =
| {
PrepareAutomation: PrepareAutomationError;
}
| { RegisterController: string }
| { SaveWorkflowMetadata: string }
| { SaveUniqueJtiToken: string };
export interface AuthenticationConfig {
updated_at: [] | [bigint];
openid: [] | [AuthenticationConfigOpenId];
Expand Down Expand Up @@ -74,6 +89,10 @@ export interface AutomationConfigOpenId {
observatory_id: [] | [Principal];
providers: Array<[OpenIdAutomationProvider, OpenIdAutomationProviderConfig]>;
}
export interface AutomationController {
scope: AutomationScope;
expires_at: bigint;
}
export type AutomationScope = { Write: null } | { Submit: null };
export type CollectionType = { Db: null } | { Storage: null };
export interface CommitBatch {
Expand Down Expand Up @@ -153,7 +172,8 @@ export type GetDelegationError =
| { NoSuchDelegation: null }
| { JwtVerify: JwtVerifyError }
| { GetOrFetchJwks: GetOrRefreshJwksError }
| { DeriveSeedFailed: string };
| { DeriveSeedFailed: string }
| { InvalidObservatoryId: string };
export type GetDelegationResultResponse = { Ok: SignedDelegation } | { Err: GetDelegationError };
export type GetOrRefreshJwksError =
| { InvalidConfig: string }
Expand Down Expand Up @@ -300,6 +320,10 @@ export interface OpenIdGetDelegationArgs {
salt: Uint8Array;
expiration: bigint;
}
export interface OpenIdPrepareAutomationArgs {
jwt: string;
salt: Uint8Array;
}
export interface OpenIdPrepareDelegationArgs {
jwt: string;
session_key: Uint8Array;
Expand All @@ -310,14 +334,26 @@ export type Permission =
| { Private: null }
| { Public: null }
| { Managed: null };
export type PrepareAutomationError =
| {
JwtFindProvider: JwtFindProviderError;
}
| { InvalidController: string }
| { GetCachedJwks: null }
| { JwtVerify: JwtVerifyError }
| { GetOrFetchJwks: GetOrRefreshJwksError }
| { ControllerAlreadyExists: null }
| { InvalidObservatoryId: string }
| { TooManyControllers: string };
export type PrepareDelegationError =
| {
JwtFindProvider: JwtFindProviderError;
}
| { GetCachedJwks: null }
| { JwtVerify: JwtVerifyError }
| { GetOrFetchJwks: GetOrRefreshJwksError }
| { DeriveSeedFailed: string };
| { DeriveSeedFailed: string }
| { InvalidObservatoryId: string };
export interface PreparedDelegation {
user_key: Uint8Array;
expiration: bigint;
Expand Down Expand Up @@ -475,6 +511,10 @@ export interface UploadChunkResult {
}
export interface _SERVICE {
authenticate: ActorMethod<[AuthenticationArgs], AuthenticateResultResponse>;
authenticate_automation: ActorMethod<
[AuthenticateAutomationArgs],
AuthenticateAutomationResultResponse
>;
commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
commit_proposal: ActorMethod<[CommitProposal], null>;
commit_proposal_asset_upload: ActorMethod<[CommitBatch], undefined>;
Expand Down
50 changes: 44 additions & 6 deletions src/declarations/satellite/satellite.factory.certified.did.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export const idlFactory = ({ IDL }) => {
GetCachedJwks: IDL.Null,
JwtVerify: JwtVerifyError,
GetOrFetchJwks: GetOrRefreshJwksError,
DeriveSeedFailed: IDL.Text
DeriveSeedFailed: IDL.Text,
InvalidObservatoryId: IDL.Text
});
const AuthenticationError = IDL.Variant({
PrepareDelegation: PrepareDelegationError,
Expand All @@ -75,6 +76,41 @@ export const idlFactory = ({ IDL }) => {
Ok: Authentication,
Err: AuthenticationError
});
const OpenIdPrepareAutomationArgs = IDL.Record({
jwt: IDL.Text,
salt: IDL.Vec(IDL.Nat8)
});
const AuthenticateAutomationArgs = IDL.Variant({
OpenId: OpenIdPrepareAutomationArgs
});
const AutomationScope = IDL.Variant({
Write: IDL.Null,
Submit: IDL.Null
});
const AutomationController = IDL.Record({
scope: AutomationScope,
expires_at: IDL.Nat64
});
const PrepareAutomationError = IDL.Variant({
JwtFindProvider: JwtFindProviderError,
InvalidController: IDL.Text,
GetCachedJwks: IDL.Null,
JwtVerify: JwtVerifyError,
GetOrFetchJwks: GetOrRefreshJwksError,
ControllerAlreadyExists: IDL.Null,
InvalidObservatoryId: IDL.Text,
TooManyControllers: IDL.Text
});
const AuthenticationAutomationError = IDL.Variant({
PrepareAutomation: PrepareAutomationError,
RegisterController: IDL.Text,
SaveWorkflowMetadata: IDL.Text,
SaveUniqueJtiToken: IDL.Text
});
const AuthenticateAutomationResultResponse = IDL.Variant({
Ok: IDL.Tuple(IDL.Principal, AutomationController),
Err: AuthenticationAutomationError
});
const CommitBatch = IDL.Record({
batch_id: IDL.Nat,
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
Expand Down Expand Up @@ -195,10 +231,6 @@ export const idlFactory = ({ IDL }) => {
rules: IDL.Opt(AuthenticationRules)
});
const OpenIdAutomationProvider = IDL.Variant({ GitHub: IDL.Null });
const AutomationScope = IDL.Variant({
Write: IDL.Null,
Submit: IDL.Null
});
const OpenIdAutomationProviderControllerConfig = IDL.Record({
scope: IDL.Opt(AutomationScope),
max_time_to_live: IDL.Opt(IDL.Nat64)
Expand Down Expand Up @@ -283,7 +315,8 @@ export const idlFactory = ({ IDL }) => {
NoSuchDelegation: IDL.Null,
JwtVerify: JwtVerifyError,
GetOrFetchJwks: GetOrRefreshJwksError,
DeriveSeedFailed: IDL.Text
DeriveSeedFailed: IDL.Text,
InvalidObservatoryId: IDL.Text
});
const GetDelegationResultResponse = IDL.Variant({
Ok: SignedDelegation,
Expand Down Expand Up @@ -484,6 +517,11 @@ export const idlFactory = ({ IDL }) => {

return IDL.Service({
authenticate: IDL.Func([AuthenticationArgs], [AuthenticateResultResponse], []),
authenticate_automation: IDL.Func(
[AuthenticateAutomationArgs],
[AuthenticateAutomationResultResponse],
[]
),
commit_asset_upload: IDL.Func([CommitBatch], [], []),
commit_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
commit_proposal_asset_upload: IDL.Func([CommitBatch], [], []),
Expand Down
Loading