Skip to content

Harden the authentication flow (prefer Qovery API over token creation) - #9

Closed
jpetitcolas wants to merge 2 commits into
Qovery:mainfrom
jpetitcolas:fix/auth-prefer-qovery-api
Closed

Harden the authentication flow (prefer Qovery API over token creation)#9
jpetitcolas wants to merge 2 commits into
Qovery:mainfrom
jpetitcolas:fix/auth-prefer-qovery-api

Conversation

@jpetitcolas

@jpetitcolas jpetitcolas commented May 6, 2026

Copy link
Copy Markdown

Outcomes

Eliminates token exposure risk and aligns the auth flow with how the Qovery CLI actually works: qovery api /organization already carries the user's session, so there is no need to create a named token during skill execution. Skills now work cleanly for users with restricted roles who cannot create tokens.

Preview

Before:

The skill tries to read the tokens right from the environment, exposing the token into the LLM context.

image

After:

We rely exclusively on the qovery CLI, not exposing anything to the LLM.

image

Technical Changes

  • Tier ordering reworked in _shared/auth.md and all synced copies: CLI (qovery api) → env token → JWT fallback → interactive login
  • Auth check changed from qovery context to qovery api /organization — a real API round-trip that confirms the CLI is authenticated and reachable
  • Token creation step removed — avoids printing a secret into the agent context and breaks the flow for restricted-role users
  • JWT restored as Tier 3 (not removed) for users who cannot create tokens but have a CLI context
  • Phase 1 files across all skills now reference reference/auth.md instead of repeating inline auth steps

@evoxmusic

evoxmusic commented May 7, 2026

Copy link
Copy Markdown
Contributor

@jpetitcolas you need to have GPG signature and sign your commits (it's a requirement enforced by our security team)

@jpetitcolas
jpetitcolas force-pushed the fix/auth-prefer-qovery-api branch 2 times, most recently from dbc9198 to 03f6d95 Compare May 7, 2026 15:30
Restructures _shared/auth.md into 4 tiers checked in order:
1. qovery api  (CLI-mediated, no token exposure)
2. env token   (QOVERY_API_TOKEN / QOVERY_CLI_ACCESS_TOKEN)
3. JWT fallback (~/.qovery/context.json — for restricted-role users)
4. Interactive login

Replaces the previous token-printing flow (qovery auth token --print piped into
curl) with qovery api as the default. The CLI authenticates internally so no
secret needs to enter the agent's command stream. Tiers 2/3 remain for edge
cases (env-only contexts, read-only roles).
…reminder

Each phase1 'Authenticate' subsection now points at qovery api as the
preferred path and references the auth doc (already loaded via the
skill nav) for fallback tiers. Avoids per-skill drift while keeping
the section self-contained — no chained reference indirection.
@jpetitcolas

Copy link
Copy Markdown
Author

Superseded by #10

@jpetitcolas jpetitcolas closed this May 7, 2026
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.

2 participants