Repository navigation
test(dev): live ceremonies for GitHub, X and Google from the dev app - #72
Open
SupremaLex wants to merge 8 commits into
Open
SupremaLex wants to merge 8 commits into
SupremaLex wants to merge 8 commits into
Conversation
This was referenced Oct 6, 2026
SupremaLex
added a commit
that referenced
this pull request
Oct 22, 2026
…ull requests Lets PR #72 test the route before merge; reverted before merge, with the proxy role's pull-request trust. Assisted-by: Claude Opus 5.5 Signed-off-by: SupremaLex <georglutsenko@gmail.com>
SupremaLex
marked this pull request as ready for review
October 23, 2026 15:49
local.ts holds the app, Bridge and notary origins and the app's port; the app, vite config and mock suite read them. services.ts refuses to start when a stack port is already taken. Assisted-by: Claude Opus 5.5 Signed-off-by: SupremaLex <georglutsenko@gmail.com>
settings.ts reads the variables libid-server-rs' ceremony-tests uses, from the environment or LIBID_TEST_ENV_FILE. session.ts loads a saved X or Google session (base64 JSON or a file), restores it into a browser context, and saves Google's refreshed cookies. export-session.ts exports a Chrome profile signed in by hand. Assisted-by: Claude Opus 5.5 Signed-off-by: SupremaLex <georglutsenko@gmail.com>
github.ts signs in with username, password and TOTP, one code per 30-second step, each submitted once. x.ts and google.ts consent on a restored session and fail with the reason when the platform asks for a person. popup.ts drives a popup until it returns to the Bridge or the app fails. person.ts presents a desktop browser with the vendored stealth.js, kept byte-identical and out of lint. Assisted-by: Claude Opus 5.5 Signed-off-by: SupremaLex <georglutsenko@gmail.com>
playwright.live.config.ts starts the dev app's stack with an allowlisted environment, so it never sees the test secrets. ceremony.live.spec.ts proves each listed platform through the app's UI and checks the run is accepted for the expected account. Assisted-by: Claude Opus 5.5 Signed-off-by: SupremaLex <georglutsenko@gmail.com>
…ached proxy GitHub and X run on a hosted runner. Google runs on main only: the job assumes an OIDC role, port-forwards over SSM to a Squid proxy whose address the session was signed in from, reads the session from Secrets Manager and stores it back refreshed after a pass. Assisted-by: Claude Opus 5.5 Signed-off-by: SupremaLex <georglutsenko@gmail.com>
How to run the live tests, the settings table, CI behaviour, and the hand sign-in that makes Google's session. Assisted-by: Claude Opus 5.5 Signed-off-by: SupremaLex <georglutsenko@gmail.com>
SupremaLex
force-pushed
the
feat/e2e-bind
branch
from
October 26, 2026 12:31
d0e4754 to
565b083
Compare
…m the Rust suite X's saved session is now signed in by hand in plain Chrome and exported with the same script as Google's, so the live tests no longer need the Rust suite's `ceremony export x`. Comments and the README no longer point at that suite's code; the TOTP test cites RFC 6238, its vector recomputed with Python's hmac. stealth.js is unchanged. Assisted-by: Claude Opus 5.5 Signed-off-by: SupremaLex <georglutsenko@gmail.com>
Assisted-by: Claude Opus 5.5 Signed-off-by: SupremaLex <georglutsenko@gmail.com>
This branch has not been deployed
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.
Live end-to-end tests that prove real GitHub, X and Google identities from the dev app's UI, against the real platforms, notary and Bridge. No chain is involved.
What it adds
ts/apps/dev/e2e/, run withpnpm --filter @libid/dev test:live(playwright.live.config.ts). The config starts the dev app's own stack (pnpm dev), clicks the platform in the UI, drives the popup through the platform's sign-in and consent, and checks the run is accepted for the expected platform and account. Proof contents are left to@libid/ceremony, which validates them before the app seesaccepted.github.tssigns in with username, password and TOTP, one code per 30-second step and each submitted once;x.tsandgoogle.tsrestore a saved session and only consent;popup.tsdrives the popup and notices its return to the Bridge, or the app's own failure.settings.ts): the same variable names as libid-server-rs' ceremony-tests, so one.env.testserves both suites.LIBID_LIVE_PLATFORMSlists the platforms to prove, and each one listed must have its variables. The README has the table.local.tsholds the app, Bridge and notary origins;services.tsrefuses to start when the stack's ports are already in use.Google's session: a manual first step
Google challenges a saved session used from an address other than the one it was signed in from. It also refuses sign-in in an automated browser. So CI never signs in to Google; it reuses a session a person made:
aws ssm start-session … AWS-StartPortForwardingSession).--proxy-serverpointing at that tunnel.node e2e/export-session.ts <profile> google.json.google.jsonin the Secrets Manager secretlibid-live-e2e/google-test-alice-sessionin the proxy's account, and delete the file and the profile.Steps are in
ts/apps/dev/README.md("Google's session"). After that the job keeps the session fresh: each passing run writes the cookies Google refreshed back to the secret (GOOGLE_TEST_ALICE_COOKIES_OUT), and a failed run writes nothing. Redo the steps only when the job reports an expired session, or when the proxy's address changes. X's session is made the same way, signed in by hand in plain Chrome and exported with the same script, but without the proxy: X does not tie a session to an address. GitHub signs in on every run with username, password and TOTP.CI (
.github/workflows/live-e2e.yml)Not a required check.
LIBID_GOOGLE_RUNNER=ssm. It assumesLIBID_GOOGLE_PROXY_ROLEover OIDC, opens an SSM port-forward to a Squid proxy on an EC2 instance (LIBID_GOOGLE_PROXY_INSTANCE) with no inbound ports, and sends the browser through it, so Google sees the address the session was signed in from. The same role reads and writes the session secret; cookie values are masked in the job log.The proxy, the role and the session secret are defined in grndd-systems/deployment#167 (grndd-testnet). The workflow needs only the two variables, the role's OIDC trust and the secret's fixed name.
Verified
Status and open work
This branch is a working base, not final. Before merge:
LIBID_GOOGLE_PROXY_ROLEandLIBID_GOOGLE_PROXY_INSTANCEpointed at its outputs. Until then the variables point at a sandbox account that has no session secret, so the Google job would fail on main.GOOGLE_TEST_ALICE_COOKIESis no longer used by CI and can be deleted once the secret is seeded.For whoever edits this next
ceremony.live.spec.ts(the three tests) →github.ts/x.ts/google.ts(one popup driver each) →popup.ts(shared driving loop) andsession.ts(load, restore, save cookies).settings.tsowns variable names; the README table must match it.playwright.live.config.tsstarts the stack with an allowlisted environment.stealth.jsis vendored and stays byte-identical. The stack never receives test secrets. One concurrency group per test account.stealth.jscame from it and is kept byte-identical;session.tsstill reads that suite's snake_case cookie exports, so an existingX_TEST_ALICE_COOKIESkeeps working.Known limits
person.tsgives the X and Google browser a desktop user agent and installsstealth.jsfor the whole context, so the app and prover pages run with it too.