Add auth config export from keychain#1615
Conversation
Co-authored-by: Rudrank Riyam <rudrankriyam@gmail.com>
|
Warning Review limit reached
More reviews will be available in 1 hour, 25 minutes, and 50 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Co-authored-by: Rudrank Riyam <rudrankriyam@gmail.com>
Co-authored-by: Rudrank Riyam <rudrankriyam@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 10d7c85. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fb9b352025
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Name: "export-to-config", | ||
| ShortUsage: "asc auth export-to-config --confirm [flags]", |
There was a problem hiding this comment.
Regenerate docs for the new auth subcommand
AGENTS.md requires command/help text changes to run make generate-command-docs and commit docs/COMMANDS.md. This registers a new auth export-to-config subcommand and updates auth help, but rg "export-to-config|migrate-to-config" docs/COMMANDS.md internal/cli shows the generated command reference still has no entry for it, so users relying on the generated docs cannot discover the command and the command-docs check should fail until the docs are regenerated.
Useful? React with 👍 / 👎.
| upsertConfigCredential(cfg, configCred) | ||
| migratedConfigCreds = append(migratedConfigCreds, configCred) |
There was a problem hiding this comment.
Clear stale keychain metadata when migrating profiles
When migrating into a config that already has keychain_metadata for the same profile, this upsert updates cfg.Keys but leaves the old keychain metadata in place. internal/cli/shared.configCredentialMetadataSummaries reads KeychainMetadata before Keys and skips duplicate key names, so metadata-only auth resolution can keep returning the stale key ID/issuer after the profile has been migrated to config storage; clear or replace metadata entries for migrated names before saving.
Useful? React with 👍 / 👎.

Summary
asc auth export-to-configto copy keychain-backed App Store Connect API credentials into JSON config storage..p8files when the original private key path is missing.--local,--config,--private-key-dir,--remove-keychain, and JSON/table output for auditable migration workflows.Validation
asc auth export-to-config --helpasc auth export-to-configexits 2 when--confirmis missingasc auth export-to-config --confirm --output yamlexits 2 for unsupported outputasc auth export-to-config --confirm --local --config /tmp/asc-config.jsonexits 2 for mutually exclusive config targets/tmp/asc-pr-1615and ran a live local migration drill:/Users/rudrank/.asc/config.jsoncredential data/tmp/asc-pr-1615 auth export-to-config --confirm --output jsonASC_BYPASS_KEYCHAIN=1 /tmp/asc-pr-1615 auth status --output jsonreads the migrated config credentialuchgflagmake formatmake check-command-docsmake lintASC_BYPASS_KEYCHAIN=1 make testNotes
The command was renamed from
migrate-to-configtoexport-to-configduring audit because the default behavior copies credentials to config while leaving keychain entries in place. Destructive cleanup remains explicit behind--remove-keychain.