Skip to content

Comments

feat: add outbound auth wizard step with OAuth and API Key credential creation#417

Open
aidandaly24 wants to merge 2 commits intoaws:feat/gateway-integrationfrom
aidandaly24:feat/batch-4-outbound-auth-wizard
Open

feat: add outbound auth wizard step with OAuth and API Key credential creation#417
aidandaly24 wants to merge 2 commits intoaws:feat/gateway-integrationfrom
aidandaly24:feat/batch-4-outbound-auth-wizard

Conversation

@aidandaly24
Copy link
Contributor

Description

When creating a gateway target through the TUI wizard, users previously had no way to configure outbound authentication. They'd have to manually edit mcp.json to add auth config after the fact.

This PR adds an outbound auth step to the wizard flow. After selecting a gateway and compute host, users now see:

  1. Auth type selection — No authorization, OAuth 2LO, or API Key
  2. Credential selection — Create a new credential inline or pick an existing one from agentcore.json
  3. Inline credential creation — For OAuth: name, client ID, masked client secret, discovery URL. For API Key: name, masked API key value. Both use SecretInput for sensitive fields.

If "No authorization" is selected, the wizard skips straight to confirm. If credential creation fails (e.g. duplicate name), the sub-flow resets so the user can try again.

The confirm screen now shows the auth type and credential name in the review.

New wizard flows:

  • create-new: name → source → language → gateway → host → outbound-auth → confirm
  • existing-endpoint: name → source → endpoint → gateway → outbound-auth → confirm

This is the TUI layer on top of the operations added in the previous PR (Task 12a), which added createCredential OAuth support and CLI flags.

Related Issue

Part of the MCP Gateway Phase 1 integration (gateway-integration branch). Task 12b.

Type of Change

  • New feature

Testing

How have you tested the change?

  • I ran npm run test:unit and npm run test:integ
  • I ran npm run typecheck
  • I ran npm run lint
  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots

No new tests — this is TUI wiring over the operations layer tested in Task 12a. The credential creation, validation, and config writing are all covered by existing tests.

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

@github-actions github-actions bot added the size/xl PR size: XL label Feb 24, 2026
…CLI flags

Extend createCredential to support OAuth credentials alongside API keys:
- CreateCredentialConfig is now a discriminated union (ApiKey vs OAuth)
- OAuth writes CLIENT_ID and CLIENT_SECRET to .env.local
- OAuth writes OAuthCredentialProvider config to agentcore.json

Add CLI flags for non-interactive workflows:
- add identity: --type oauth, --discovery-url, --client-id, --client-secret, --scopes
- add gateway-target: --outbound-auth, --credential-name, --oauth-client-id,
  --oauth-client-secret, --oauth-discovery-url, --oauth-scopes
- Inline OAuth credential creation when --oauth-* fields provided without --credential-name

Adds 15 new tests covering OAuth credential creation, validation, and edge cases.
… creation

Add outbound-auth step to gateway-target TUI wizard after gateway/host selection:
- Auth type selection: No authorization, OAuth 2LO, API Key
- Credential selection: create new or use existing
- OAuth inline creation: name, client ID, masked client secret, discovery URL
- API Key inline creation: name, masked API key
- Confirm screen shows auth type and credential name
- Error handling resets sub-flow on credential creation failure
@aidandaly24 aidandaly24 force-pushed the feat/batch-4-outbound-auth-wizard branch from 37b14c8 to 66a33cc Compare February 24, 2026 17:04
@github-actions github-actions bot added size/l PR size: L and removed size/xl PR size: XL labels Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant