feat(cli): add datahub init --sso for browser-based SSO login#16715
Merged
shirshanka merged 9 commits intomasterfrom Mar 25, 2026
Merged
feat(cli): add datahub init --sso for browser-based SSO login#16715shirshanka merged 9 commits intomasterfrom
datahub init --sso for browser-based SSO login#16715shirshanka merged 9 commits intomasterfrom
Conversation
Contributor
|
Linear: ING-2022 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Connector Tests ResultsAll connector tests passed for commit To skip connector tests, add the Autogenerated by the connector-tests CI pipeline. |
Users authenticating via SSO (OIDC/SAML) can now configure the CLI without manual token copy-paste. The `--sso` flag opens a Chromium browser via Playwright, lets the user complete SSO, then automatically extracts the session and generates a personal access token. Flow: browser opens → user completes SSO → CLI captures actor cookie → generates token via GraphQL → writes ~/.datahubenv. No server-side changes required. Playwright is an optional dependency behind the `sso` extra (`pip install 'acryl-datahub[sso]'`). Clear install instructions are shown if it's missing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CI fixes: - Add upper bound to playwright dependency (<2.0.0) to satisfy check-python-deps pinning rules - Run mdPrettierWrite to fix markdown formatting in INIT_AGENT_CONTEXT.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds `--support` flag (used with `--sso`) that navigates to `/support/authenticate` instead of `/authenticate`, enabling the support team to log into customer instances for debugging. Usage: datahub init --sso --support --host https://customer.acryl.io/gms Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
After SSO login, query existing access tokens for the user and print a count of CLI tokens with a link to manage them in the UI. This gives users visibility into token accumulation without auto-revoking tokens that may be in use elsewhere. Also removes the broken _revoke_old_cli_tokens call that would crash at runtime and the unused List import. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1a64d2c to
e3481fb
Compare
treff7es
approved these changes
Mar 24, 2026
Co-authored-by: Tamas Nemeth <treff7es@gmail.com>
Co-authored-by: Tamas Nemeth <treff7es@gmail.com>
Co-authored-by: Tamas Nemeth <treff7es@gmail.com>
|
🔴 Meticulous spotted visual differences in 18 of 1853 screens tested: view and approve differences detected. Meticulous evaluated ~8 hours of user flows against your PR. Last updated for commit 5d87b3a. This comment will update as new commits are pushed. |
- Move createAccessToken error handling from _warn_about_existing_cli_tokens to browser_sso_login where it belongs - Fix tab/space mixing in browser try/finally block - Remove redundant browser.close() in inner except (finally handles it) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bundle ReportChanges will decrease total bundle size by 284.35kB (-1.24%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: datahub-react-web-esmAssets Changed:
|
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
--ssoflag todatahub initthat opens a Chromium browser via Playwright, lets the user complete SSO (OIDC/SAML), then automatically captures the session and generates a personal access token — no manual copy-paste needed.ssoextra (pip install 'acryl-datahub[sso]'). If not installed, the command prints clear step-by-step instructions (supports pip, uv, etc.).Usage
Files changed
sso_cli.py(new)entrypoints.py--ssoclick option, SSO branch ininit(), mutual exclusivity validationsetup.pyssoextra:playwright>=1.40.0INIT_AGENT_CONTEXT.md--ssoflag and prerequisitestest_init_cli.pytest_sso_cli.py(new)Test plan
./gradlew :metadata-ingestion:lintFixpassespytest tests/unit/cli/test_init_cli.py tests/unit/cli/test_sso_cli.py— 39 tests passdatahub init --sso --host https://acryl.acryl.io/gms→ browser opens, SSO completes, token saved,datahub graphqlquery succeeds🤖 Generated with Claude Code