feat(web): warn when API key alias is saved for a key not in CPA api-keys#298
Open
fengshao1227 wants to merge 1 commit into
Open
feat(web): warn when API key alias is saved for a key not in CPA api-keys#298fengshao1227 wants to merge 1 commit into
fengshao1227 wants to merge 1 commit into
Conversation
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.
Summary
When saving an API key alias, cross-check the key against the currently saved CPA config's
api-keyslist using SHA-256 hash comparison. Show a warning if the key is not in the active config yet.Scope
Changes
useConfigStoreinApiKeysCardEditorto access the saved CPA config'sapiKeysalias_saved_key_not_in_cpai18n key for all 4 localesUser Impact
Users who save an alias for a newly added key (before saving the CPA config) now get a clear warning instead of a misleading success message, preventing confusion about why the key doesn't work for requests.
Compatibility / Runtime Notes
config.apiKeysfrom the config store; in CPA panel mode the config is fetched from the CPA instanceData / Security Notes
N/A — no new data stored; uses existing config store state
Risk / Rollback
Risk level: Low
Rollback notes:
Verification
Commands / evidence:
Screenshots / Recordings
N/A
Docs
Related
Closes #286