Add private host option for private networks support in hyperdrive#4932
Add private host option for private networks support in hyperdrive#4932mrbbot merged 5 commits intocloudflare:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 4cd9083 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8470404975/npm-package-wrangler-4932You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/4932/npm-package-wrangler-4932Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8470404975/npm-package-wrangler-4932 dev path/to/script.jsAdditional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8470404975/npm-package-create-cloudflare-4932 --no-auto-updatenpm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8470404975/npm-package-cloudflare-kv-asset-handler-4932npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8470404975/npm-package-miniflare-4932npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8470404975/npm-package-cloudflare-pages-shared-4932npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8470404975/npm-package-cloudflare-vitest-pool-workers-4932Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4932 +/- ##
==========================================
+ Coverage 72.20% 72.32% +0.12%
==========================================
Files 322 323 +1
Lines 16666 16690 +24
Branches 4258 4264 +6
==========================================
+ Hits 12033 12071 +38
+ Misses 4633 4619 -14
|
5b407dd to
b332cfc
Compare
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| - | Generic Database Assignment | 5f218bf | packages/wrangler/src/tests/hyperdrive.test.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
b332cfc to
7fcdadd
Compare
7fcdadd to
fa49152
Compare
Documents the new flag in cloudflare/workers-sdk#4932
|
Docs PR: cloudflare/cloudflare-docs#13654 |
fa49152 to
59d05c7
Compare
4262bad to
5f218bf
Compare
| database: args.database, | ||
| user: args.originUser, | ||
| password: args.originPassword, | ||
| privateHost: args.privateHost, |
There was a problem hiding this comment.
| privateHost: args.privateHost, | |
| private_host: args.privateHost, |
| database: decodeURIComponent(url.pathname.replace("/", "")), | ||
| user: decodeURIComponent(url.username), | ||
| password: decodeURIComponent(url.password), | ||
| privateHost: args.privateHost ?? false, |
There was a problem hiding this comment.
| privateHost: args.privateHost ?? false, | |
| private_host: args.privateHost ?? false, |
| scheme?: string; | ||
| database?: string; | ||
| user?: string; | ||
| privateHost?: boolean; |
There was a problem hiding this comment.
| privateHost?: boolean; | |
| private_host?: boolean; |
| port: 3211, | ||
| database: "mydb", | ||
| user: "dbuser", | ||
| privateHost: false, |
There was a problem hiding this comment.
| privateHost: false, | |
| private_host: false, |
| port: reqBody.origin.port, | ||
| database: reqBody.origin.database, | ||
| user: reqBody.origin.user, | ||
| privateHost: reqBody.origin.privateHost, |
There was a problem hiding this comment.
| privateHost: reqBody.origin.privateHost, | |
| privateHost: reqBody.origin.private_host, |
| database: "neondb", | ||
| database: "database", | ||
| user: "test", | ||
| privateHost: false, |
There was a problem hiding this comment.
| privateHost: false, | |
| private_host: false, |
| \\"user\\": \\"test\\" | ||
| \\"database\\": \\"database\\", | ||
| \\"user\\": \\"test\\", | ||
| \\"privateHost\\": false |
There was a problem hiding this comment.
| \\"privateHost\\": false | |
| \\"private_host\\": false |
| database: reqBody.origin.database, | ||
| scheme: reqBody.origin.protocol, | ||
| user: reqBody.origin.user, | ||
| privateHost: reqBody.origin.privateHost, |
There was a problem hiding this comment.
| privateHost: reqBody.origin.privateHost, | |
| private_host: reqBody.origin.private_host, |
| \\"user\\": \\"test\\" | ||
| \\"database\\": \\"database\\", | ||
| \\"user\\": \\"test\\", | ||
| \\"privateHost\\": false |
There was a problem hiding this comment.
| \\"privateHost\\": false | |
| \\"private_host\\": false |
| \\"user\\": \\"test\\" | ||
| \\"database\\": \\"database\\", | ||
| \\"user\\": \\"test\\", | ||
| \\"privateHost\\": false |
There was a problem hiding this comment.
| \\"privateHost\\": false | |
| \\"private_host\\": false |
| \\"port\\": 1234, | ||
| \\"database\\": \\"mydb\\", | ||
| \\"user\\": \\"newuser\\", | ||
| \\"privateHost\\": true |
There was a problem hiding this comment.
| \\"privateHost\\": true | |
| \\"private_host\\": true |
| \\"user\\": \\"test\\" | ||
| \\"database\\": \\"database\\", | ||
| \\"user\\": \\"test\\", | ||
| \\"privateHost\\": false |
There was a problem hiding this comment.
| \\"privateHost\\": false | |
| \\"private_host\\": false |
| \\"database\\": \\"mydb\\", | ||
| \\"user\\": \\"newuser\\" | ||
| \\"user\\": \\"newuser\\", | ||
| \\"privateHost\\": false |
There was a problem hiding this comment.
| \\"privateHost\\": false | |
| \\"private_host\\": false |
| \\"database\\": \\"/\\"weird/\\" dbname\\", | ||
| \\"user\\": \\"test\\" | ||
| \\"user\\": \\"test\\", | ||
| \\"privateHost\\": false |
There was a problem hiding this comment.
| \\"privateHost\\": false | |
| \\"private_host\\": false |
| \\"database\\": \\"neondb\\", | ||
| \\"user\\": \\"test\\" | ||
| \\"user\\": \\"test\\", | ||
| \\"privateHost\\": false |
There was a problem hiding this comment.
| \\"privateHost\\": false | |
| \\"private_host\\": false |
| \\"database\\": \\"neondb\\", | ||
| \\"user\\": \\"user:name\\" | ||
| \\"user\\": \\"user:name\\", | ||
| \\"privateHost\\": false |
There was a problem hiding this comment.
| \\"privateHost\\": false | |
| \\"private_host\\": false |
| \\"port\\": 12345, | ||
| \\"database\\": \\"database\\", | ||
| \\"user\\": \\"test\\", | ||
| \\"privateHost\\": true |
There was a problem hiding this comment.
| \\"privateHost\\": true | |
| \\"private_host\\": true |
| \\"user\\": \\"test\\" | ||
| \\"database\\": \\"database\\", | ||
| \\"user\\": \\"test\\", | ||
| \\"privateHost\\": false |
There was a problem hiding this comment.
| \\"privateHost\\": false | |
| \\"private_host\\": false |
| \\"user\\": \\"test\\" | ||
| \\"database\\": \\"database\\", | ||
| \\"user\\": \\"test\\", | ||
| \\"privateHost\\": false |
There was a problem hiding this comment.
| \\"privateHost\\": false | |
| \\"private_host\\": false |
What this PR solves / how to test
Support for configuring hyperdrives for databases that are inside a customer's private network
LDW CR-851053
Author has addressed the following