-
Notifications
You must be signed in to change notification settings - Fork 105
feat: support mTLS certificate upload #835
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
Conversation
|
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
| .update(signature, "utf8") | ||
| .digest("base64"); | ||
|
|
||
| return [ |
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.
This file generates the custom HMAC auth header used by certain clients.
| ): Promise<WebhookResponse> => { | ||
| try { | ||
| const headers = await createWebhookRequestHeaders(webhook, body); | ||
| const config = await getConfig(); |
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.
This file has one exported function, sendWebhookRequest() which does these steps:
- if mTLS is configured, attach the mTLS certificates
- generate request headers
- if custom HMAC is enabled via env vars, sign with the custom HMAC header
- else use the previous signature pattern
- call the webhook URL
PR-Codex overview
This PR focuses on adding support for mTLS (Mutual TLS) configuration in the application, enhancing security for webhook interactions, and updating various related schemas and functions.
Detailed summary
mtlsCertificateEncryptedandmtlsPrivateKeyEncryptedfields to theconfigurationtable.updateConfigurationto usePrisma.ConfigurationUpdateInput.generateSecretHmac256for generating HMAC headers.generateSignatureandgenerateRequestHeadersfor improved header generation.generateSecretHmac256andgenerateRequestHeaders.