2
3
Fork
You've already forked databook
1

Create allow list for urls #4

Closed
opened 2022年10月04日 21:13:38 +02:00 by era · 2 comments
Owner
Copy link

Only allowed urls can be accessed on the plugins. Allow list is per plugin.

Basically on the configuration file for each plugin, users should specify any domain they wish to send requests to. If they try to send a request to a domain which is not specified there, the request should be denied.

For this to work, the Runtime should have the configuration for all the plugins.

Also, today we don't have a way to return error to users, we can just add for now a error field on HttpResponse as a quick workaround or we can modify the response to an object that has the HtthResponse and an error, something like:

record error {
	code: int,
 message: string,
}
record response {
	http: http-response,
 error: error,
}

Otherwise, if result is working for wit-bindgen we can use it: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md

Only allowed urls can be accessed on the plugins. Allow list is per plugin. Basically on the configuration file for each plugin, users should specify any domain they wish to send requests to. If they try to send a request to a domain which is not specified there, the request should be denied. For this to work, the Runtime should have the configuration for all the plugins. Also, today we don't have a way to return error to users, we can just add for now a error field on HttpResponse as a quick workaround or we can modify the response to an object that has the HtthResponse and an error, something like: ``` record error { code: int, message: string, } record response { http: http-response, error: error, } ``` Otherwise, if result is working for wit-bindgen we can use it: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md
Author
Owner
Copy link

Since 5cb4d15ac6 all methods return Result so we now just have to check if the domain is allowed for the plugin and return an error if otherwise

Since https://codeberg.org/era/databook/commit/5cb4d15ac620f422722a7f650a26cd07408ffbce all methods return Result so we now just have to check if the domain is allowed for the plugin and return an error if otherwise
era removed their assignment 2022年10月06日 14:44:47 +02:00
Author
Owner
Copy link
https://codeberg.org/era/databook/commit/09b598ffc4000c0ed09df6c4c5ee17354fc74530
Sign in to join this conversation.
No Branch/Tag specified
main
era/upgradewit
feature/front-back-communication
feature/initial-layout-structure-web
elias/wit_bindgen3
feature/adding-sveltekit-web
No results found.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
era/databook#4
Reference in a new issue
era/databook
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?