Skip to content

feat(tng-wasm/www): add ITA provider support to the Pages demo#168

Merged
imlk0 merged 2 commits into
masterfrom
wasm-gitpage-ita
Jul 13, 2026
Merged

feat(tng-wasm/www): add ITA provider support to the Pages demo#168
imlk0 merged 2 commits into
masterfrom
wasm-gitpage-ita

Conversation

@imlk0

@imlk0 imlk0 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add Intel Trust Authority (ITA) as a selectable Attestation Service provider in the tng-wasm/www/ GitHub Pages demo, alongside the existing CoCo/Trustee path. No Rust changes — the wasm build already enables verifier-ita (the wasm32-unknown-unknown target in tng/Cargo.toml pulls rats-cert with verifier-ita).

Changes

  • tng-wasm/www/js/config.js (new, pure / DOM-free): buildTngConfig(inputs) + visibleFields(provider, model) emit the { ohttp, verify } config per the provider×model field matrix, omitting non-default fields (as_provider only for ITA; ITA passport suppresses stale as_addr/api_key). Emitted field names match tng/src/config/ra.rs and tng-wasm/src/fetch/attestation.rs.
  • index.html + i18n.js: AS Provider <select> (CoCo/Trustee vs ITA) with conditional ITA API-key and JWKS-URL fields; bilingual en/zh strings.
  • app.js: thin DOM-reading wrapper over config.js; toggles field visibility, prefills the ITA API URL, gates Send on ITA api-key validity, and re-applies the ITA placeholder on language switch. The API key is not persisted to localStorage.
  • css/styles.css: [hidden] { display: none !important } so author label { display: flex } no longer overrides the UA [hidden] rule (conditional <label hidden> rows were staying visible).
  • Tests: tng-wasm/tests/config.test.mjs (node --test, make www-test, 9 cases) covers the field matrix + edge cases.
  • CI: .github/workflows/build-wasm-sdk.yml runs make www-test in build-and-release, after checkout/toolchain and before the AA/AS service startup (fast fail-fast logic gate needing only node).

Field matrix

as_provider model as_addr api_key ita_jwks_addr policy_ids skip_as_token_cert_verify
coco background_check ✓ user AS optional
coco passport ✓ user AS optional
ita background_check ✓ (prefilled ITA API URL) ✓ required optional hidden
ita passport hidden hidden optional hidden

Testing

  • make www-test → 9/9 pass (config matrix + edge cases).
  • CoCo path behavior unchanged.

Live demo

Once merged to master, the deploy-pages job rebuilds and publishes https://inclavare-containers.github.io/TNG/ (the .wasm bundle is rebuilt by CI).

imlk0 added 2 commits July 13, 2026 17:53
Add Intel Trust Authority (ITA) as a selectable AS provider in the
tng-wasm/www/ GitHub Pages demo, alongside the existing CoCo/Trustee path.
No Rust changes — the wasm build already enables verifier-ita.

- js/config.js: pure, DOM-free config builder (buildTngConfig + visibleFields)
  that emits the {ohttp, verify} config per the provider x model field matrix,
  omitting non-default fields. as_provider is emitted only for "ita"; ita
  passport suppresses stale as_addr/api_key.
- index.html + i18n.js: AS Provider select (CoCo/Trustee vs ITA) with
  conditional ITA API-key and JWKS-URL fields; bilingual en/zh strings.
- app.js: thin DOM-reading wrapper over config.js; toggles field visibility,
  prefills the ITA API URL, gates Send on ITA api-key validity, and re-applies
  the ITA placeholder on language switch. The API key is never persisted to
  localStorage.
- css/styles.css: [hidden] { display: none !important } so author
  label { display: flex } no longer overrides the UA [hidden] rule (conditional
  <label hidden> rows were staying visible).
- tests: tng-wasm/tests/config.test.mjs (node --test, make www-test) covers the
  field matrix and edge cases.
- CLAUDE.md: add a TODO.md Discipline rule (never auto-edit TODO.md).
Run the www demo config.js unit test (node --test, make www-test) in the
build-wasm-sdk CI job, after checkout/toolchain and before the slow
Attestation-Agent/Service startup. It is a pure-logic gate needing only node,
so it fails fast on a config-matrix regression without the wasm build or
AA/AS services.
@shankailun-aliyun

Copy link
Copy Markdown
Collaborator

@imlk0 ,您好,您的请求已接收,请耐心等待结果。

@shankailun-aliyun

Copy link
Copy Markdown
Collaborator

@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start

@imlk0
imlk0 merged commit 2d7eef4 into master Jul 13, 2026
31 of 32 checks passed
@imlk0
imlk0 temporarily deployed to github-pages July 13, 2026 11:46 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants