Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 697992a

Browse files
committed
chore: sync II spec to release-2026-06-15 with robust link rewriting
Syncs the Internet Identity spec from dfinity/internet-identity release-2026-06-15 (pinned 18130689 → 1f4104b5): regenerates the two reference specs and the internet-identity.did interface (adds SSO credential migration types, DoH email-recovery additions, and message_id correlation). Also hardens the sync script's link rewriting. Upstream serves the same internal-page destinations under multiple URL forms (internetcomputer.org/docs/current/... and docs.internetcomputer.org/...), and the two source specs are not migrated in lockstep. The old hardcoded full-URL map silently stopped matching when vc-spec.md switched to the docs subdomain, and the validation regex only knew the path form, so the unrewritten absolute links would have shipped: - Normalize the volatile domain/prefix to a canonical path#fragment, then look up a shared PATH_MAP (encodes only the irregular split-doc anchors) - Validation now catches both URL forms, failing the build on any unmapped link instead of passing silently - Generate the adaptation-log comment from the rewrites actually applied Supersedes #294 (same release, blocked by the bot-PR policy after a human fix commit) and #290 (release-2026-06-05-hotfix; its content is a subset of 06-15).
1 parent 6f11614 commit 697992a

6 files changed

Lines changed: 231 additions & 114 deletions

File tree

.sources/VERSIONS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ motoko-core v2.4.0
6262
cdk-rs ic-cdk v0.20.1 / ic-cdk-timers v1.0.0 / ic-cdk-executor v2.0.0 317f55c
6363
candid 2025-12-18 # candid v0.10.20, didc v0.5.4 2e4a2cf
6464
response-verification v3.1.0 18c5a37
65-
internetidentity release-2026-06-01 18130689
65+
internetidentity release-2026-06-15 1f4104b5

.sources/internetidentity

Submodule internetidentity updated 183 files

docs/references/internet-identity-spec.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -718,16 +718,15 @@ On the flip side, implementing `canister_inspect_message` adds code, and thus a
718718
Therefore, the Internet Identity Canister intentionally does not implement `canister_inspect_message`.
719719

720720
<!--
721-
Link replacements from source (source used absolute/relative paths pointing outside this site):
722-
- internetcomputer.org [/docs]/current/references/ic-interface-spec#id-classes → ./ic-interface-spec/index.md#id-classes
723-
- internetcomputer.org [/docs]/current/references/ic-interface-spec/#canister-signatures → ./ic-interface-spec/index.md#canister-signatures2)
724-
- internetcomputer.org [/docs]/current/references/ic-interface-spec/#signatures → ./ic-interface-spec/index.md#signatures
725-
- internetcomputer.org [/docs]/current/references/ic-interface-spec#authentication → ./ic-interface-spec/https-interface.md#authentication
726-
- internetcomputer.org [/docs]/current/references/ic-interface-spec/#system-api-inspect-message → ./ic-interface-spec/canister-interface.md#system-api-inspect-message
727-
- internetcomputer.org [/docs]/current/references/http-gateway-protocol-spec → ./http-gateway-protocol-spec.md
728-
- internetcomputer.org [/docs]/current/developer-docs/web-apps/custom-domains/using-custom-domains → ../guides/frontends/custom-domains.md
729-
- vc-spec.md (relative, same dir in source repo) → ./verifiable-credentials-spec.md
721+
Link replacements from source (absolute public-docs links rewritten to internal paths):
722+
- developer-docs/web-apps/custom-domains/using-custom-domains → ../guides/frontends/custom-domains.md
723+
- references/http-gateway-protocol-spec → ./http-gateway-protocol-spec.md
724+
- references/ic-interface-spec#authentication → ./ic-interface-spec/https-interface.md#authentication
725+
- references/ic-interface-spec#canister-signatures → ./ic-interface-spec/index.md#canister-signatures
726+
- references/ic-interface-spec#id-classes → ./ic-interface-spec/index.md#id-classes
727+
- references/ic-interface-spec#system-api-inspect-message → ./ic-interface-spec/canister-interface.md#system-api-inspect-message
730728
Other changes from source:
729+
- `](vc-spec.md)` (relative, same dir in source repo) → `](./verifiable-credentials-spec.md)`
731730
- `# The Internet Identity Specification` H1 removed (Starlight renders frontmatter title as H1)
732731
- `<CodeBlock language="candid">{IICandidInterface}</CodeBlock>` replaced with download link to /references/internet-identity.did
733732
- Mermaid sequenceDiagram blocks converted to PlantUML (site uses remarkPlantUML, not Mermaid)

docs/references/verifiable-credentials-spec.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,9 @@ Given the interactive nature of the flow, the relying party should not expect to
407407
The relying party may also close the II window after some timeout. The user should then be notified by the relying party that the flow failed.
408408

409409
<!--
410-
Link replacements from source (source used absolute paths pointing to the retired portal):
411-
- internetcomputer.org/docs/current/references/ii-spec#alternative-frontend-origins → ./internet-identity-spec.md#alternative-frontend-origins (×4)
412-
- internetcomputer.org/docs/current/references/ic-interface-spec#canister-signatures → ./ic-interface-spec/index.md#canister-signatures
410+
Link replacements from source (absolute public-docs links rewritten to internal paths):
411+
- references/ic-interface-spec#canister-signatures → ./ic-interface-spec/index.md#canister-signatures
412+
- references/internet-identity-spec#alternative-frontend-origins → ./internet-identity-spec.md#alternative-frontend-origins
413413
Other changes from source:
414414
- `# II Verifiable Credential Spec (MVP)` H1 removed (Starlight renders frontmatter title as H1)
415415
-->

public/references/internet-identity.did

Lines changed: 90 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,21 @@ type CaptchaConfig = record {
246246
};
247247
};
248248

249+
// One entry of the `sso_credential_migration` backfill. Maps the
250+
// (iss, aud) pair of stored SSO credentials to the discovery domain (and
251+
// optional human-readable name) they were registered through. Field names
252+
// match the `discovered_oidc_configs` query output so the deployer can
253+
// transcribe its result field-for-field.
254+
type SsoCredentialMigrationEntry = record {
255+
discovery_domain : text;
256+
// Matches the stored credential's `iss`.
257+
issuer : text;
258+
// Matches the stored credential's `aud`.
259+
client_id : text;
260+
// Human-readable SSO label; stamped onto the credential's `sso_name`.
261+
name : opt text;
262+
};
263+
249264
// Init arguments of II which can be supplied on install and upgrade.
250265
//
251266
// Each field is wrapped is `opt` to indicate whether the field should
@@ -286,6 +301,15 @@ type InternetIdentityInit = record {
286301
// (production) or `beta.dfinity.org` (everything else), keyed off
287302
// `is_production`.
288303
sso_discoverable_domains : opt vec text;
304+
// One-shot backfill of the `sso_domain` / `sso_name` fields on stored
305+
// OpenID credentials. When set, a batched timer-driven migration stamps
306+
// every stored credential whose (iss, aud) matches an entry and whose
307+
// `sso_domain` is not set yet. Idempotent — already-stamped credentials
308+
// are skipped, so re-submitting (e.g. with a corrected list) is safe.
309+
// When unset, no backfill runs. The deployer builds the list from the
310+
// running canister's `discovered_oidc_configs` query before
311+
// submitting the upgrade proposal.
312+
sso_credential_migration : opt vec SsoCredentialMigrationEntry;
289313
// Configuration for Web Analytics
290314
analytics_config : opt opt AnalyticsConfig;
291315
// Configuration to show dapps explorer or not
@@ -299,6 +323,9 @@ type InternetIdentityInit = record {
299323
backend_canister_id : opt principal;
300324
// Backend origin, needed to sync configuration with frontend.
301325
backend_origin : opt text;
326+
// Deploy flag for the legacy DNSSEC email-recovery path. Defaults to
327+
// off (DoH-only); `opt true` re-enables it.
328+
enable_dnssec_email_recovery : opt bool;
302329
// DNSSEC verification configuration. Trust anchors used by any feature
303330
// that verifies DNS records against the IANA-rooted DNSSEC chain
304331
// (currently the email-recovery DKIM/DMARC flow). See
@@ -544,13 +571,28 @@ type EmailRecoverySubmitDkimLeafArg = record {
544571
// least one hop required; bounded by `MAX_CNAME_HOPS = 4` at the
545572
// canister side. For the Gmail-style direct-TXT case this is a
546573
// single-element vec.
574+
//
575+
// When the FE cannot walk a fully-signed DNSSEC resolution for the
576+
// leaf — the DKIM record CNAMEs into an unsigned zone (e.g.
577+
// `selector1._domainkey.outlook.com` is a signed CNAME into the
578+
// unsigned `outbound.protection.outlook.com`) — it must NOT submit
579+
// an empty vec here; it drives `email_recovery_resolve_via_doh`
580+
// instead, which resolves the key over the canister's DoH path.
547581
hops : vec SignedRRset;
548582
// Delegation chains for signed zones touched by `hops` that
549583
// weren't already covered by the skeleton chain anchored at
550584
// prepare time. Empty for same-zone resolution.
551585
extra_chains : vec DelegationChain;
552586
};
553587

588+
// Argument to email_recovery_resolve_via_doh. Wrapped in a record (like
589+
// EmailRecoverySubmitDkimLeafArg) so the method can grow fields without a
590+
// breaking interface change; nonce is the lookup key and is always
591+
// required.
592+
type EmailRecoveryResolveViaDohArg = record {
593+
nonce : text;
594+
};
595+
554596
// DNSSEC proof bundle and supporting types — see
555597
// `internet_identity_interface::types::dnssec`.
556598
type Rrsig = record {
@@ -595,15 +637,28 @@ type DnsProofBundle = record {
595637
hops : vec SignedRRset;
596638
};
597639

640+
// Why a DoH resolution failed, as a typed discriminant rather than a
641+
// free-form string. The FE reads this directly to segment the
642+
// `doh_reason` analytics property — no string parsing.
643+
type DohFailureReason = variant {
644+
AllProvidersFailed;
645+
QuorumFailed : record { agreeing : nat32; total : nat32 };
646+
ResponseMalformed : text;
647+
};
648+
598649
type EmailRecoveryError = variant {
599650
Unauthorized : principal;
600651
NonceUnknown;
601652
NonceExpired;
602653
DomainNotAllowlisted : text;
603-
DohFetchFailed : text;
654+
DohFetchFailed : DohFailureReason;
604655
DomainNotSupported : text;
605656
EmailVerificationFailed : text;
606657
DkimLeafMismatch;
658+
// email_recovery_submit_dkim_leaf was called with an empty `hops`
659+
// vector; an FE that can't walk DNSSEC must drive
660+
// email_recovery_resolve_via_doh instead.
661+
EmptyDkimLeafHops;
607662
NoDkimLeafExpected;
608663
AddressMismatch;
609664
SubjectNotSigned;
@@ -614,6 +669,7 @@ type EmailRecoveryError = variant {
614669

615670
type EmailRecoveryStatus = variant {
616671
Pending;
672+
ResolvingDoh;
617673
NeedDkimLeaf : record { selector : text };
618674
RegistrationSucceeded;
619675
RecoveryReady : record {
@@ -625,6 +681,24 @@ type EmailRecoveryStatus = variant {
625681
Expired;
626682
};
627683

684+
// Which trust path the canister used (or will use) to verify the
685+
// challenge email. Public — already chosen by the FE and derivable
686+
// from the public deploy config.
687+
type VerificationPath = variant { Doh; Dnssec };
688+
689+
// Strictly-public, user-copyable diagnostics for one pending challenge
690+
// (see email_recovery_diagnostics). Intended for a support ticket so a
691+
// case can be lined up across the SMTP gateway logs and the canister's
692+
// production logs via message_id. NO email address, anchor, principal,
693+
// delegation/seed, or inner error string — reason_code is the failing
694+
// variant's name only.
695+
type EmailRecoveryDiagnostics = record {
696+
message_id : opt text;
697+
reason_code : text;
698+
verification_path : VerificationPath;
699+
created_at : Timestamp;
700+
};
701+
628702
type EmailRecoveryGetDelegationArgs = record {
629703
nonce : text;
630704
session_key : SessionKey;
@@ -671,6 +745,13 @@ type SmtpRequest = record {
671745
message : opt SmtpMessage;
672746
envelope : opt SmtpEnvelope;
673747
gateway_flags : opt vec text;
748+
// Optional gateway-supplied correlation id for one inbound message
749+
// (e.g. the RFC 5322 Message-ID or a gateway-assigned tracking id).
750+
// The canister does not interpret it; it lets a reported case be
751+
// lined up across the SMTP gateway logs and the canister's production
752+
// logs during support investigations. Capped at 256 bytes; oversize
753+
// values are rejected with code 555.
754+
message_id : opt text;
674755
};
675756

676757
// Error returned by `smtp_request` / `smtp_request_validate`.
@@ -1489,7 +1570,14 @@ service : (opt InternetIdentityInit) -> {
14891570
email_recovery_credential_prepare_add : (IdentityNumber, EmailRecoveryDnsInput) -> (variant { Ok : EmailRecoveryChallenge; Err : EmailRecoveryError });
14901571
email_recovery_prepare_delegation : (EmailRecoveryDnsInput, SessionKey) -> (variant { Ok : EmailRecoveryChallenge; Err : EmailRecoveryError });
14911572
email_recovery_status : (text) -> (EmailRecoveryStatus) query;
1492-
email_recovery_submit_dkim_leaf : (EmailRecoverySubmitDkimLeafArg) -> (variant { Ok : EmailRecoveryStatus; Err : EmailRecoveryError });
1573+
email_recovery_diagnostics : (text) -> (opt EmailRecoveryDiagnostics) query;
1574+
email_recovery_submit_dkim_leaf : (EmailRecoverySubmitDkimLeafArg) -> (variant { Ok; Err : EmailRecoveryError });
1575+
// Resolves the DKIM key over the canister's own allowlist-gated DoH
1576+
// path, called with just the nonce. Used for the pure-DoH (Gmail)
1577+
// case and as the fallback when the FE can't walk a fully-signed
1578+
// DNSSEC resolution (the DKIM record CNAMEs into an unsigned zone).
1579+
// Polled: the FE calls it repeatedly while the status is ResolvingDoh.
1580+
email_recovery_resolve_via_doh : (EmailRecoveryResolveViaDohArg) -> (variant { Ok; Err : EmailRecoveryError });
14931581
email_recovery_get_delegation : (EmailRecoveryGetDelegationArgs) -> (variant { Ok : SignedDelegation; Err : EmailRecoveryError }) query;
14941582
email_recovery_credential_remove : (IdentityNumber, text) -> (variant { Ok; Err : EmailRecoveryError });
14951583

0 commit comments

Comments
 (0)