fix(publisher): Fix endpoint security API key re-saving issue#1386
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis change updates ChangesEndpoint Security Config Sanitization
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@ShavinAnjithaAlpha shall we update the pr with rebase |
Fixes an issue in the Publisher portal where the when the endpoint security API Key is saved without any changes, it was being re-saved and causing unnecessary updates. This commit ensures that the API Key in only gets updated when there are actual changes made to it, preventing redundant inconsistent updates. Resolves: #4983
aa9aadc to
d01f1c4
Compare
|
I have updated the PR with rebase |



Purpose
In the APIM publisher portal, when an API key is configured for endpoint security and then re-saved without making any changes, the system inadvertently updates the API key secret to match the UI text field's placeholder value (asterisks ******). This causes the literal asterisk string to be transmitted during API invocation.
This PR resolves the issue by ensuring the API key value remains unchanged and consistent upon re-saving.
Fixes #4983
Issue Link
Approach
File Modified:
EndpointOverview.jsxChange: Updated the conditional logic within the
saveEndpointSecurityConfigfunction to appropriately check against thesecretPlaceholderbefore assigning the API key value, preventing the masked string from overwriting the actual secret.