feat(tng-wasm/www): add ITA provider support to the Pages demo#168
Merged
Conversation
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.
Collaborator
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
Collaborator
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 enablesverifier-ita(thewasm32-unknown-unknowntarget intng/Cargo.tomlpullsrats-certwithverifier-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_provideronly for ITA; ITA passport suppresses staleas_addr/api_key). Emitted field names matchtng/src/config/ra.rsandtng-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 overconfig.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 tolocalStorage.css/styles.css:[hidden] { display: none !important }so authorlabel { display: flex }no longer overrides the UA[hidden]rule (conditional<label hidden>rows were staying visible).tng-wasm/tests/config.test.mjs(node--test,make www-test, 9 cases) covers the field matrix + edge cases..github/workflows/build-wasm-sdk.ymlrunsmake www-testinbuild-and-release, after checkout/toolchain and before the AA/AS service startup (fast fail-fast logic gate needing only node).Field matrix
as_providermodelas_addrapi_keyita_jwks_addrpolicy_idsskip_as_token_cert_verifyTesting
make www-test→ 9/9 pass (config matrix + edge cases).Live demo
Once merged to
master, thedeploy-pagesjob rebuilds and publishes https://inclavare-containers.github.io/TNG/ (the.wasmbundle is rebuilt by CI).