Repository navigation
Implement browser PKCE authentication prototype - #60
Open
sultandevin wants to merge 3 commits into
Open
sultandevin wants to merge 3 commits into
sultandevin wants to merge 3 commits into
Conversation
3 tasks
sultandevin
force-pushed
the
feat/browser-auth
branch
from
November 24, 2026 00:30
fecc4e7 to
ca681d6
Compare
Add the web feature: direct service login, CAS fallback with the lt token, and keyring-stored web sessions reused by auth status and removed by auth logout. The CLI adapter moves into the binary and keeps feature modules in the library. CAPTCHA challenges follow the prior-art client loop: up to five challenges, each fetched with an _= cache buster, answered, and retried with a fresh simasterUGM token from the re-presented page. Image challenges are classified with the ddddocr model, downloaded once into the cache directory and verified against a pinned SHA-256; audio challenges, model misses, and rejected answers escalate to the human at the terminal, and session-lost redirects fail the login. Programmatic solving for the user's own login retires the documented non-goal; standalone solving for others stays out of scope. Raises the MSRV to 1.92, which the ddddocr and tract dependency tree needs.
sultandevin
force-pushed
the
feat/browser-auth
branch
from
November 24, 2026 00:32
ca681d6 to
9d83647
Compare
Live testing against SIMASTER found that sso.ugm.ac.id completes a handshake only with TLS 1.2 and CBC cipher suites: TLS 1.3 and AES-GCM are both dropped mid-handshake. rustls implements no CBC suites, so the CAS fallback could never connect and surfaced as a network error. Switch only the web client to native TLS. Also report CAS re-rendering its sign-in form as a rejected-credentials error instead of asking for a browser.
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.
Summary
The Rust feature interface is reusable by future SDK and MCP callers.
This also retires the documented non-goal on programmatic CAPTCHA solving for
the user's own login; a standalone CAPTCHA-solving service remains a non-goal
(
AGENTS.md,docs/AUTH.md, and the OpenAPI evidence forcaptchasound_verificationupdated accordingly).Closes #59. Refs #35 and #36.
Evidence
auth login,status, andlogoutreturned "not implemented."simasterUGMtoken from the re-presented page and escalates to the human answer; a session-lost redirect fails the login.common.onnx(MIT, from upstreamsml2h3/ddddocr, sha25633b5cd351ee94e73a6bf8fa18c415ed8b819b3ffd342e267c30d8ad8334e34e8) is downloaded once on the first image challenge into the platform cache directory, verified against that checksum, and reused offline. A cold run fetched, cached, and classified a rendered four-digit fixture as1234in 5.9 s. No model bytes are committed. The classiccommon_old.onnxquantizes aDynamicQuantizeLSTMthat the pure-Rust tract backend cannot run, so upstream's current f32 graph is used.msrvjob, README badge, CONTRIBUTING, PR template, dependabot note);cargo +1.92.0 check --all-featuresverified locally because the ddddocr/tract dependency tree declares 1.88–1.91.auth statusreported the account, and session reuse reached the dashboard after clearing the cookie jar. No CAPTCHA was presented on this account, so the challenge loop stays covered by mocks.sso.ugm.ac.idcompletes a handshake only with TLS 1.2 + CBC suites (TLS 1.3 and AES-GCM are both dropped mid-handshake), and rustls implements no CBC suites, so the CAS fallback could never connect and surfaced as a network error. The web login client now uses the platform TLS stack (OpenSSL gets 200 from CAS; verified); UGM ID PKCE keeps rustls. CAS re-rendering its sign-in form now reports rejected credentials (exit 3) instead of asking for a browser.cargo test --locked --all-features, format, Clippy, andcargo deny check(NCSA added forlibfuzzer-sys, pulled byimage's avif feature under ddddocr defaults).Merge Danger
Door: Two-way.
Blast radius: Authentication, local credential storage, a new platform-TLS (OpenSSL) build dependency for the web client, and a new first-use download (~54 MiB) from upstream GitHub into the user cache directory. Not a one-way door: the feature reverts cleanly and commits no large binary. The download is SHA-256 pinned, is skipped entirely unless a CAPTCHA appears, and a failure falls back to the human prompt. The prototype requires an OS keyring. Authenticated UGM verification still requires a DTI-registered public client.