[feature] SC-166737/improve app proxy security by restricting where token replacements can go#47
Conversation
…oken replacements can go
Reviewer's guide (collapsed on small PRs)Reviewer's GuideEnhanced app proxy security by enabling selective API credential injection into the Authorization header for SimpleMDM requests and reinforced constant placeholder type safety with 'as const'. Class diagram for updated placeholders constant with 'as const'classDiagram
class placeholders {
+API_KEY : "__api_key.base64__"
}
%% 'as const' enforces readonly and literal type for API_KEY
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Build for commit 53713cf deployed to: https://simple-mdm-pr-47.ci.next.deskprodemo.com URLs: |
There was a problem hiding this comment.
Pull Request Overview
This pull request aims to improve API credential handling security by implementing token replacement restrictions through the Deskpro app proxy mechanism. The changes introduce a settingsInjection configuration in the manifest and add type safety to the constants definition.
- Added
settingsInjectionconfiguration to inject API credentials via the Authorization header in the proxy whitelist - Enhanced type safety by adding
as constto the placeholders object
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| manifest.json | Adds settingsInjection configuration to inject api_key into the Authorization header for SimpleMDM API requests |
| src/constants.ts | Adds as const assertion to the placeholders object for stricter type safety |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request introduces improvements to the way API credentials are handled and strengthens type safety in the constants definition. The main changes are as follows:
API Credential Injection:
manifest.jsonto support injecting theapi_keyinto theAuthorizationheader for requests to SimpleMDM. This makes credential handling more secure and flexible.Type Safety Enhancement:
as constto theplaceholdersobject insrc/constants.ts, which enforces stricter type safety for the constant values.Summary by Sourcery
Improve app proxy security by restricting where token replacements can occur, adding settingsInjection for the API key in the proxy manifest and tightening constant type safety.
New Features:
Enhancements:
as const