-
Notifications
You must be signed in to change notification settings - Fork 0
[feature] SC-166737/improve app proxy security by restricting where token replacements can go #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…oken replacements can go
Reviewer's guide (collapsed on small PRs)Reviewer's GuideImplements controlled credential injection via a new settingsInjection schema in manifest.json and enforces stronger type safety on placeholders. Entity relationship diagram for updated manifest.json API configurationerDiagram
"Sage OAuth API" {
string url
string[] methods
int timeout
object settingsInjection
}
"Sage Accounting API" {
string url
string[] methods
int timeout
object settingsInjection
}
"settingsInjection" {
string client_id
string client_secret
}
"Sage OAuth API" ||--o| "settingsInjection" : injects
"Sage Accounting API" ||--o| "settingsInjection" : injects
"settingsInjection" {
string body
}
Class diagram for updated placeholders type safetyclassDiagram
class placeholders {
+string REFRESH_TOKEN
+string CLIENT_ID
+string CLIENT_SECRET
}
placeholders : <<const>>
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves app proxy security by restricting where sensitive credentials can be injected in API requests. The main focus is on the OAuth token endpoint for Sage integration.
- Added
settingsInjectionconfiguration to the OAuth endpoint inmanifest.jsonto explicitly control whereclient_idandclient_secretare injected - Enhanced type safety for the
placeholdersobject in TypeScript usingas constassertion
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/constants.ts | Added as const assertion to placeholders object for improved type safety |
| manifest.json | Added settingsInjection configuration to OAuth endpoint for controlled credential injection; added empty object to API endpoint for consistency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
|
Build for commit 00dede7 deployed to: https://sage-pr-74.ci.next.deskprodemo.com URLs: |
This pull request introduces improvements to configuration and type safety for API integration settings. The main changes are the addition of a new
settingsInjectionproperty inmanifest.jsonfor injecting sensitive credentials into the request body, and a minor update to enforce type safety in theplaceholdersobject.Configuration enhancements for credential injection:
settingsInjectionproperty to the Sage OAuth API entry inmanifest.json, specifying howclient_idandclient_secretshould be injected into the request body.settingsInjectionobject to the Sage Accounting API entry inmanifest.jsonto maintain consistency and future extensibility.Type safety improvement:
placeholdersobject insrc/constants.tsasconstusing TypeScript'sas constassertion, ensuring stronger type safety for its values.Summary by Sourcery
Introduce settingsInjection configuration in the app proxy manifest to control credential injection and strengthen placeholder type safety using TypeScript's as const assertion.
New Features:
Enhancements: