Skip to content

configure: add OidcBrowserAuth and --dataall_url front-page discovery - #53

Merged
TejasRGitHub merged 6 commits into
data-dot-all:mainfrom
TejasRGitHub:feat/oidc-browser-auth
Sep 25, 2026
Merged

TejasRGitHub merged 6 commits into
data-dot-all:mainfrom
TejasRGitHub:feat/oidc-browser-auth

Conversation

@TejasRGitHub

@TejasRGitHub TejasRGitHub commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Feature or Bugfix

  • Feature

Detail

Companion to data-dot-all/dataall-core#52 (merged), which adds OidcBrowserAuth, the frontend_url / scopes / fallback_redirect_uri profile fields and a clean error for clients without a profile.

  • dataall_cli configure now starts by asking for the data.all front page URL. The deployed frontend bundle says whether the deployment uses Cognito or an OIDC provider, so the auth type and its values (identity provider URL, client id, redirect URI, API endpoint) are read from it and not prompted for; only the profile name is asked (plus the optional client secret and auth server for Cognito). An empty URL keeps the manual flow; --dataall_url does the same non-interactively. The page origin is stored as frontend_url and sent as Origin/Referer for deployments whose API only accepts calls carrying the UI origin.
  • OidcBrowserAuth is selectable with defaults redirect_uri=http://localhost:8765/callback, fallback_redirect_uri=http://localhost:8766/callback, scopes=openid offline_access. If --auth_type contradicts what the page reports, the CLI warns and keeps only the page URL.
  • AuthScopedOption, a small click.Option subclass, prompts an option only for the auth types it applies to and skips discovered values, so unrelated keys are not written to config.yaml. Cognito and Custom prompts keep their order, wording and defaults; the pre-existing functional test inputs pass with one leading newline for the new first prompt.
  • Discovery runs once per prompt (click processes a prompted value twice, which fetched and printed twice).
  • Running a command with an unknown --profile prints Error: Profile 'x' is not configured; run: dataall_cli configure --profile x and exits 1 instead of a traceback.
  • Tutorial updated: front-page configure, profile example, IdP prerequisites (loopback redirect URIs, refresh token grant, offline_access), device login on hosts without a browser.
  • Dependencies: dataall-core>=0.5.0,<0.6.0 (the release that ships Bump anyio from 4.11.0 to 4.14.2 #52) and poetry.lock regenerated with poetry lock; only the dataall-core entry changed. httpx, used by the discovery helper, already comes through dataall-core. Verified in a fresh venv against PyPI: all 34 tests pass.

Verified end to end against an Okta custom authorization server: configure from the front page, browser login, API call, forced-expiry refresh.

Relates

Security

  • Input: --dataall_url performs two GETs with httpx (the front page, then the static/js/main.*.js it references) and extracts values with anchored regular expressions on known variable names. The values only prefill profile fields the user could type by hand; nothing is executed or deserialized beyond response.text. No eval.
  • AuthN/AuthZ: no change to how tokens are obtained or sent; see the core PR.
  • Cryptography: none added here.
  • No new policies, roles or users.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

🤖 Generated with Claude Code

- Auth-type scoped prompts keep the Cognito and Custom flows unchanged
- --dataall_url reads issuer, client id and API endpoint from the deployed
  frontend bundle and stores the page origin as frontend_url
- Tutorial updated

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
TejasRGitHub and others added 4 commits September 24, 2026 15:44
With --auth_type OidcBrowserAuth and no flags, ask for the front page URL
right after the auth type so the issuer, client id and API endpoint are
discovered instead of typed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The front page bundle says whether the deployment uses Cognito or an OIDC
provider, so the type and its values (client id, IdP, redirect URI, API
endpoint) are filled in without prompts. An empty URL keeps the manual flow.
Commands with an unknown --profile now fail with a one-line message.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
click processes a prompted value twice (value_proc and handle_parse_result),
which fetched the bundle and printed the results twice.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@TejasRGitHub
TejasRGitHub merged commit ced0754 into data-dot-all:main Sep 25, 2026
2 checks passed
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.

1 participant