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
Open
Conversation
…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
37b14c8 to
66a33cc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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:
name → source → language → gateway → host → outbound-auth → confirmname → source → endpoint → gateway → outbound-auth → confirmThis is the TUI layer on top of the operations added in the previous PR (Task 12a), which added
createCredentialOAuth support and CLI flags.Related Issue
Part of the MCP Gateway Phase 1 integration (gateway-integration branch). Task 12b.
Type of Change
Testing
How have you tested the change?
npm run test:unitandnpm run test:integnpm run typechecknpm run lintsrc/assets/, I rannpm run test:update-snapshotsand committed the updated snapshotsNo 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