Skip to content

Commit a3b667a

Browse files
committed
chore: sync II spec to dfinity/internet-identity release-2026-08-21
Bumps .sources/internetidentity from release-2026-08-07 (c78d1b99) to release-2026-08-21 (4c934d1f) and reruns npm run sync:ii-spec, so the mirrored specification carries the App metadata section this PR's guide links to. Regenerated content: - docs/references/internet-identity-spec.md gains the App metadata section and its JSON Schema, and the alternative origins limit goes from 10 to 100 in all three places it is stated (dfinity/internet-identity#4221 and #4261). Nothing else in the 18 upstream commits touches ii-spec.mdx. - public/references/internet-identity.did picks up IdentityInfo.mcp_config and the reworded mcp_get_config comment. No docs page documents that surface, so no page needed updating alongside it. - docs/references/verifiable-credentials-spec.md is unchanged between the two tags. With the section now mirrored, the guide's spec link gains the #app-metadata anchor it was missing.
1 parent fbf3ee9 commit a3b667a

5 files changed

Lines changed: 95 additions & 9 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-08-07 c78d1b99
65+
internetidentity release-2026-08-21 4c934d1f

.sources/internetidentity

Submodule internetidentity updated 106 files

docs/guides/authentication/internet-identity.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ If the document is missing, unreachable, or invalid, sign-in is unaffected: the
656656
This metadata is exactly as trustworthy as the origin serving it, and publishing it does not verify your app's identity in any way. II therefore keeps displaying the origin alongside whatever you provide, since the origin is the value users can actually check.
657657
:::
658658

659-
For the normative rules, including a JSON schema to validate your document against, see the app metadata section of the [Internet Identity specification](../../references/internet-identity-spec.md).
659+
For the normative rules, including a JSON schema to validate your document against, see [App metadata](../../references/internet-identity-spec.md#app-metadata) in the Internet Identity specification.
660660

661661
## Common mistakes
662662

docs/references/internet-identity-spec.md

Lines changed: 78 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ Internet Identity will fetch the `/.well-known/ii-alternative-origins` file from
282282

283283
Requirements:
284284

285-
- No more than 10 alternative origins can be listed in the `/.well-known/ii-alternative-origins` file.
285+
- No more than 100 alternative origins can be listed in the `/.well-known/ii-alternative-origins` file.
286286
- Derivation Origin must expose the `/.well-known/ii-alternative-origins` file.
287287
- The `/.well-known/ii-alternative-origins` file must be hosted by an ICP canister that must implement the `http_request` query call.
288288
- The alternative origins must be present in the file `/.well-known/ii-alternative-origins` of the derivation origin requested.
@@ -304,7 +304,7 @@ Requirements:
304304
"type": "string"
305305
},
306306
"minItems": 0,
307-
"maxItems": 10,
307+
"maxItems": 100,
308308
"uniqueItems": true
309309
}
310310
},
@@ -328,13 +328,88 @@ The path `/.well-known/ii-alternative-origins` will always be requested using th
328328
:::
329329

330330
:::note
331-
To prevent misuse of this feature, the number of alternative origins _must not_ be greater than 10.
331+
To prevent misuse of this feature, the number of alternative origins _must not_ be greater than 100.
332332
:::
333333

334334
:::note
335335
In order to allow Internet Identity to read the path `/.well-known/ii-alternative-origins`, the CORS response header [`Access-Control-Allow-Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin) must be set and allow the Internet Identity origin being used, for example `https://id.ai`, `https://identity.internetcomputer.org`, or `https://identity.ic0.app`.
336336
:::
337337

338+
## App metadata
339+
340+
Internet Identity displays the name and logo of the client application on its authorization screens (e.g. "Continue to _App_"). Any application can provide this metadata itselfpermissionlessly, without being included in any curated listby serving a JSON document at the path `/.well-known/ii-app-metadata` (on the origin identified below):
341+
342+
```json
343+
{
344+
"name": "Example App",
345+
"description": "A short tagline shown on the sign-in screen",
346+
"logo": "/logo.png"
347+
}
348+
```
349+
350+
Internet Identity fetches this document when the authorization flow starts, from the origin the application's identity is derived for: the `derivationOrigin` of the authorization request once it has been validated (see [Alternative frontend origins](#alternative-frontend-origins)), and the origin the request came from otherwise. An application therefore publishes the document once, on the origin its principals and its Internet Identity accounts are bound to, and all of its alternative frontend origins — which that origin has certified as its own — present the same name, description and logo, with nothing to keep in sync between them. When the document is missing or invalid, Internet Identity falls back to the curated metadata it ships for a small list of known applications (a transitional mechanism that this document supersedes), and otherwise to displaying the origin only.
351+
352+
Since the file is under the sole control of the origin serving it, the metadata is exactly as trustworthy as that origin itself: it does not certify or verify the application's identity in any way. Internet Identity therefore always displays the origin the user is signing in from alongside this metadata, as the value users can actually verify. Ordinary `https` origins on the default port are shown as their hostname (`https://example.com` as `example.com`); an origin whose scheme or port would otherwise be hidden is shown in full (for example `https://example.com:8443`), since those components distinguish origins that derive different principals.
353+
354+
When the document comes from a `derivationOrigin`, the displayed origin is one that origin has itself listed as an alternative frontend origin, in a certified document, and it is that origin's principals the user receives — so the presentation still comes from the origin the sign-in is bound to, and no origin can present itself using metadata of an origin that has not vouched for it.
355+
356+
Requirements:
357+
358+
- All fields are optional, and unknown fields are ignored, so that fields added in the future do not invalidate documents for older versions of Internet Identity. A document that carries no field Internet Identity knows is ignored; a valid document replaces any curated fallback entry wholesale.
359+
- A field that is present but does not meet the requirements below invalidates **the whole document**, which is then ignoredthe offending field is not simply dropped. An application whose file is wrong therefore sees none of its metadata applied, instead of shipping a file that is silently half-applied on a screen it does not control; Internet Identity also logs which field is at fault to the browser console.
360+
- `name` must not exceed 40 characters and `description` must not exceed 120 characters, counted in Unicode code points on the value as served. Neither may contain control characters (other than the ASCII whitespace characters `\t`, `\n`, `\v`, `\f` and `\r`), the bidirectional embeddings and overrides U+202AU+202E, or U+FEFF. Only these reordering controls are refused: an override makes text render in an order other than the one it is written in, which is what would let a name read as something it does not contain, and the embeddings are deprecated in favour of the isolates for the same reason.
361+
- The characters that mixed-direction and non-Latin names legitimately need are accepted: the bidirectional marks U+200E, U+200F and U+061C (zero-width hints that only affect where neutral characters such as punctuation and digits land at a direction boundary), the bidirectional isolates U+2066U+2069, and the zero-width characters U+200BU+200D (line-break opportunities in scripts such as Thai and Khmer, shaping in scripts such as Persian, and emoji sequences). Isolates must be **balanced**, however: a field must close every isolate it opens and close none it did not open, since an unbalanced isolate would extend past the application's own text and reorder what Internet Identity renders around it.
362+
- A field must contain at least one visible characterone that is neither whitespace nor one of the invisible characters aboveso that a field which renders as nothing is treated as absent rather than displayed as a blank name.
363+
- Before being displayed, `name` and `description` have runs of whitespace collapsed to single spaces and are trimmed. This is presentation only, applied after the requirements above are checked: it never rescues a value that violates them.
364+
- `logo` must be a URL (relative URLs are resolved against the document's origin) pointing to a raster image _on that same origin_. It must be served with one of the content types `image/png`, `image/jpeg`, `image/webp`, `image/gif` or `image/avif`, must not exceed 1 MiB, and must decode to an image of at most 4096 pixels per axis. Internet Identity downloads the logo (it is never hotlinked), so both the metadata document and the logo asset must be readable cross-origin (see the CORS note below).
365+
- The logo is not rendered as served: Internet Identity decodes it, draws it once into a canvas scaled to at most 512 pixels on its longest side, and renders that re-encoding from a `blob:` URL. What is displayed is therefore an image Internet Identity produced itselfstill (an animated image is flattened to its first frame), bounded in size, and held in the browser's blob store rather than in the page's DOM or its JavaScript heap. `image/svg+xml` is not accepted, because a vector image cannot be put through that step across the browsers Internet Identity supports; applications with a vector logo serve a rasterized copy of it here.
366+
- Unlike the fields of the document, a logo that cannot be fetched, decoded, or does not meet the asset requirements above costs the application only its logo: fetching a second resource can fail transiently, and the name and description are still used.
367+
- The metadata document must not exceed 8 KiB, must be answered with a `200` HTTP status code and must not redirect (Internet Identity _will not_ follow redirects for either the document or the logo).
368+
369+
### JSON Schema {#app-metadata-schema}
370+
371+
The schema below expresses the requirements above, with one exception it cannot state: that bidirectional isolates must be balanced. Whitespace normalization happens after validation and is not part of it either. Validating in CI is the easiest way to catch a mistake before it costs the application its metadata.
372+
373+
```json
374+
{
375+
"$schema": "https://json-schema.org/draft/2020-12/schema",
376+
"title": "II App Metadata",
377+
"description": "Display metadata (name, description, logo) shown by Internet Identity on authorization screens for the origin serving this document.",
378+
"type": "object",
379+
"properties": {
380+
"name": {
381+
"description": "Display name of the application",
382+
"type": "string",
383+
"minLength": 1,
384+
"maxLength": 40,
385+
"pattern": "[^\\s\\u061c\\u200b-\\u200f\\u2066-\\u2069]",
386+
"not": { "pattern": "[\\u0000-\\u0008\\u000e-\\u001f\\u007f-\\u009f\\u202a-\\u202e\\ufeff]" }
387+
},
388+
"description": {
389+
"description": "Short description or tagline of the application",
390+
"type": "string",
391+
"minLength": 1,
392+
"maxLength": 120,
393+
"pattern": "[^\\s\\u061c\\u200b-\\u200f\\u2066-\\u2069]",
394+
"not": { "pattern": "[\\u0000-\\u0008\\u000e-\\u001f\\u007f-\\u009f\\u202a-\\u202e\\ufeff]" }
395+
},
396+
"logo": {
397+
"description": "URL of the raster application logo, on the same origin as this document",
398+
"type": "string",
399+
"minLength": 1
400+
}
401+
}
402+
}
403+
```
404+
405+
:::note
406+
In order to allow Internet Identity to read the path `/.well-known/ii-app-metadata` as well as the logo asset it references, the CORS response header [`Access-Control-Allow-Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin) must be set on both responses and allow the Internet Identity origin being used, for example `https://id.ai`, `https://identity.internetcomputer.org`, or `https://identity.ic0.app`.
407+
:::
408+
409+
:::note
410+
Unlike `/.well-known/ii-alternative-origins`, this document has no security semantics for principal derivation, so it may be served by any web serverthe application does not need to be hosted on ICP. For applications hosted in an ICP asset canister, the file is served like any other asset (and must be certified when served via a non-raw domain).
411+
:::
412+
338413
## The Internet Identity Service Backend interface
339414

340415
This section describes the interface that the backend canister provides.

public/references/internet-identity.did

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,13 @@ type IdentityInfo = record {
10261026
// shows a "limit reached" notice in the wizard when adding
10271027
// beyond the cap.
10281028
verified_emails : opt vec VerifiedEmail;
1029+
// The anchor's synced trusted-MCP-server config (absent when the
1030+
// anchor never wrote one). Carried here rather than read from the
1031+
// mcp_get_config query so the Settings UI has a certified value to
1032+
// render and to base its writes on: identity_info is an update
1033+
// call, so its response is certified through consensus, whereas a
1034+
// query reply a single malicious node could forge is not.
1035+
mcp_config : opt McpConfig;
10291036
};
10301037

10311038
type IdentityInfoError = variant {
@@ -1876,9 +1883,13 @@ service : (opt InternetIdentityInit) -> {
18761883

18771884
// Read the identity's synced trusted-MCP-server config (master toggle + the
18781885
// trusted server URL). Persisted on-chain, so it follows the identity across
1879-
// devices. Read by the Settings UI and the /mcp connect flow (which verifies
1880-
// the connecting origin against it). Returns the disabled, no-server default
1881-
// for an unauthorized caller or an anchor that never wrote a config.
1886+
// devices. Being a query, the reply is signed by a single node: the /mcp
1887+
// connect flow uses it only to pick which screen to show, and gates delivery
1888+
// on the certified trusted_url from prepare_mcp_registration_delegation.
1889+
// Callers that render trust, or write the config back, take it from
1890+
// IdentityInfo.mcp_config on the identity_info update call instead. Returns
1891+
// the disabled, no-server default for an unauthorized caller or an anchor
1892+
// that never wrote a config.
18821893
// `null` means the identity has never written a config — distinct from a
18831894
// stored one that is switched off. The two behave differently at /mcp: the
18841895
// first may connect the deployment's official connector (completing the

0 commit comments

Comments
 (0)