-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support private & public rulesets
BREAKING CHANGE: The accept.json file format has now changes from being rooted as an array to being an object with `private` and `public` accept rules.
- Loading branch information
Showing
16 changed files
with
176 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,12 +99,13 @@ The second, `${PARAM}` is populated with the matching value in your configuratio | |
|
||
The final result is that the broker will accept and forward `GET` requests to my local server that will respond to `https://[email protected]/snyk/broker/master/package.json`. | ||
|
||
# TODO / Aims | ||
### private | ||
|
||
- [x] Proxy e2e socket (server -> client -> internal -> client -> server) | ||
- [x] Can serve as both client and server | ||
- [x] Client can forward requests from internal to server | ||
- [ ] Filter relays (i.e. whether the local webserver should accept the inbound request) | ||
Private filters are for requests that come from the broker server into your client and ask for resources inside your private infrastructure (such as a github enterprise instance). | ||
|
||
### public | ||
|
||
Public filters are for requests that a recieved on your broker client and are intended to be forwarded to the broker server (such as a github webhook). | ||
|
||
# Notes | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
[ | ||
{ | ||
"path": "/magic-path/${secret}/package.json", | ||
"method": "POST", | ||
"origin": "http://localhost:${port}" | ||
} | ||
] | ||
{ | ||
"private": [ | ||
{ | ||
"path": "/magic-path/${secret}/package.json", | ||
"method": "POST", | ||
"origin": "http://localhost:${port}" | ||
} | ||
], | ||
"public": [ | ||
{ | ||
"path": "/magic-path/${secret}/package.json", | ||
"method": "POST", | ||
"origin": "http://localhost:${port}" | ||
}, | ||
{ | ||
"path": "/service/:package", | ||
"method": "GET", | ||
"origin": "http://localhost:${port}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,24 @@ | ||
[ | ||
{ | ||
"path": "/service/:package", | ||
"method": "GET", | ||
"origin": "http://localhost:${port}" | ||
} | ||
] | ||
{ | ||
"private": [ | ||
{ | ||
"path": "/service/:package", | ||
"method": "GET", | ||
"origin": "http://localhost:${port}" | ||
} | ||
], | ||
"public": [ | ||
{ | ||
"path": "/service/:package", | ||
"method": "GET", | ||
"origin": "http://localhost:${port}" | ||
}, | ||
|
||
{ | ||
"path": "/magic-path/${secret}/package.json", | ||
"method": "POST", | ||
"origin": "http://localhost:${port}" | ||
} | ||
|
||
] | ||
|
||
} |
Oops, something went wrong.