Preserve encrypted credentials when editing data sources - #12437
Conversation
Signed-off-by: revijay <reshmi.vijayan@ibm.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Description
When editing an existing data source, the UI intentionally does not send stored credentials back to the server. The scoped Saved Objects client strips encrypted credentials, which prevents the data source client from being reconstructed for operations such as Test Connection and Fetch Metadata when credentials are omitted during edit.
This change introduces an internal Saved Objects repository that is used only after access has been authorized through the scoped Saved Objects client. The internal repository is then used to retrieve the encrypted credentials so the data source client can be created successfully.
Issues Resolved
Closes #12385
Screenshot
N/A (No UI changes)
Testing the changes
yarn test:jest src/plugins/data_source.Check List
yarn test:jestyarn test:jest_integration