kargo icon indicating copy to clipboard operation
kargo copied to clipboard

Set callback/redirect URL on SSO login flow from CLI

Open csz-akuity opened this issue 2 months ago • 1 comments

Checklist

  • [x] I've searched the issue queue to verify this is not a duplicate feature request.
  • [ ] I've pasted the output of kargo version, if applicable.
  • [ ] I've pasted logs, if applicable.

Proposed Feature

We would like to have the ability to overwrite the callback/redirect URL via Kargo CLI. It's currently hardcoded to use localhost here - https://github.com/akuity/kargo/blob/main/pkg/cli/cmd/login/login.go#L328

kargo login https://kargo.example.com --sso --callback <redirect-url>

Motivation

Some users using IDE environments that can't resolve localhost or 127.0.0.1 or users with custom OIDC solutions aren't able to login with Kargo CLI. There was a similar feature added to Argo CD CLI recently - https://github.com/argoproj/argo-cd/issues/22738

csz-akuity avatar Oct 31 '25 21:10 csz-akuity

Initially was writing this off as too niche, regardless of whether Argo CD supports it, but I think the thing that was not initially registering was that this:

Some users using IDE environments that can't resolve localhost or 127.0.0.1

Was (maybe?) referring to a web based IDE running in a browser?

That's less "out there" than I'd initially been thinking. Still want other maintainers to weigh in.

krancour avatar Nov 01 '25 00:11 krancour

Had some offline discussion with @csz-akuity. Enabling a --callback flag for customizing the callback URL is easy to do, but what we have no (universal) way of doing is making the CLI serve requests to that callback URL in order to complete the authorization code flow. Making that work would require either that every user modifies their /etc/hosts file or alternatively requires some DNS trickery. (e.g. Something like an A record pointing oauth-callbacks.example.com to 127.0.0.1.

In the end, we agreed that the value proposition of this feature is in question at this time.

We will reopen this if that changes.

krancour avatar Nov 17 '25 16:11 krancour