-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
In (bytecodealliance/wasmtime#6808 / https://github.com/nethunterslabs/wasmtime/tree/wasi-http-acl) I integrated a HTTP ACL to be used for outgoing HTTP requests. We are still using this custom fork (which I'm hopefully going to update soon) until we can possibly create a component generator or another solution.
The HTTP ACL has the following flow:
- Is the HTTP method allowed
- Is the URL Scheme allowed (i.e. HTTP or HTTPS)
- Is the port allowed (if set)
- Check the authority:
- If it is a domain/hostname:
- Check if there is a static DNS record in the ACL
- If no static record then check if it is allowed
- Resolve the host/domain and check the IP address/es is/are allowed
- If it is an IP address check the IP address is allowed
- If it is a domain/hostname:
- Check the URL path is allowed
In the PR it was mentioned that a HTTP ACL could be solved by a component generator. I can see how this can be done for all the steps aside from the IP address resolution without resolving it twice, once here and once in wasi-http. Is there a plan or scope to create an advanced HTTP ACL like this in wasi-virt or is there another approach that would be better?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels