Skip to content

feat(auth): upgrade cli-engine to 0.10.1; log in with an ephemeral callback port and OIDC scopes - #314

Merged
jpage-godaddy merged 2 commits into
mainfrom
identity-display
Oct 12, 2026
Merged

jpage-godaddy merged 2 commits into
mainfrom
identity-display

Conversation

@jpage-godaddy

@jpage-godaddy jpage-godaddy commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • gddy auth login now listens for the OAuth callback on an OS-assigned loopback port instead of the fixed localhost:7443, so login no longer fails when that port is taken.
  • Login also requests the standard openid and profile scopes, so the identity token carries profile claims.
  • gddy auth login --scope openid / --scope profile pass local scope validation; standalone scopes are tracked in a shared scopes::DIRECTIVES list.
  • Upgrades cli-engine from 0.9.5 to 0.10.1, which provides both of the above, and adapts to its breaking changes:
    • PaginationConfig is now #[non_exhaustive], so list commands build it with PaginationConfig::new.
    • render_human_with_view is no longer exported, so tests render views with preview_human_view.

Test plan

  • cargo check --workspace
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace
  • cargo fmt --check
  • ./rust/scripts/check-module-size.sh
  • Manual gddy auth login against an environment whose OAuth client has the new scopes and redirect registered

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

One test still uses a removed API, and explicit requests for the new OIDC scopes are rejected by local validation.

2 open findings
What changed in this PR

Upgrades cli-engine to support ephemeral OAuth callback ports and OIDC profile scopes while adapting affected APIs.

Changes:

  • Enables ephemeral loopback callback ports and adds default openid/profile scopes.
  • Migrates pagination construction to PaginationConfig::new.
  • Migrates most rendering tests to preview_human_view.
File Description
rust/​src/​scopes.rs Registers OIDC scopes.
rust/​src/​platform/​app/​commands/​list.rs Updates pagination construction.
rust/​src/​platform/​app/​commands/​init.rs Updates rendering test.
rust/​src/​platform/​actions/​mod.rs Updates pagination construction.
rust/​src/​environments/​mod.rs Adds default OIDC scopes.
rust/​src/​email/​list.rs Updates pagination construction.
rust/​src/​domain/​suggest.rs Updates rendering test.
rust/​src/​domain/​quote.rs Updates rendering tests.
rust/​src/​domain/​list.rs Updates pagination construction.
rust/​src/​domain/​available.rs Updates rendering tests.
rust/​src/​dns/​set/​outcome.rs Updates rendering test.
rust/​src/​dns/​list.rs Updates pagination construction.
rust/​src/​dns/​delete.rs Updates rendering test.
rust/​src/​dns/​add.rs Updates rendering test.
rust/​src/​auth.rs Enables ephemeral callback ports.
rust/​src/​api/​search.rs Updates pagination construction.
rust/​src/​api/​response.rs Updates pagination construction.
rust/​src/​api/​parameter.rs Updates pagination construction.
rust/​src/​api/​operation.rs Removes obsolete API reference.
rust/​Cargo.toml Upgrades cli-engine.
rust/​Cargo.lock Locks upgraded dependencies.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread rust/Cargo.toml
Comment thread rust/src/scopes.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The authentication change depends on coordinated OAuth configuration and its end-to-end login flow remains manually unverified.

0 open findings

2 resolved since last review

🧠 Review effort: Balanced

@kperkins-godaddy

Copy link
Copy Markdown

At a glance this looks great, I'd love to see the default values hidden if they aren't overridden (env, provider) and have the identity come before the expiration date.

@jpage-godaddy

Copy link
Copy Markdown
Collaborator Author

@kperkins-godaddy I've created a separate Jira ticket to allow auth status to have a customized view which will be an engine change, so it'll have to be done in a separate PR. I assume you're ok with this incremental improvement going out first with the rest as a follow up.

jpage-godaddy and others added 2 commits October 12, 2026 12:40
…llback port and OIDC scopes

Login now listens for the OAuth callback on an OS-assigned loopback port
instead of the fixed port 7443, so it no longer fails when that port is
already in use. It also requests the standard `openid` and `profile` scopes
so the identity token carries profile claims.

Upgrading to cli-engine 0.10.1 requires two source changes: pagination
settings are built with `PaginationConfig::new`, and tests render views
through `preview_human_view`.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`gddy auth login --scope openid` (or `profile`) was rejected locally as an
unsupported scope even though both are now requested by default. Scope
validation and the registry coverage test now use a shared `DIRECTIVES` list
of standalone scopes. Also moves the import-result rendering test to
`preview_human_view`, completing the cli-engine 0.10.1 migration.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jpage-godaddy
jpage-godaddy merged commit b30e3a1 into main Oct 12, 2026
5 checks passed
@jpage-godaddy
jpage-godaddy deleted the identity-display branch October 12, 2026 19:51
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.

3 participants