Add ACL Support
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Start with the WIT binding at stubs/wit_world/imports/acl.py and review the ACL interface and API requirements in this issue. Use test.toml with data/acl.json and @on_viceroy tests to verify opening an ACL, matching IPv4 and IPv6 addresses, parsing entry metadata, and returning None for misses.
Written by the indexing model from the issue text.
Description
Overview
Add support for Fastly's Access Control Lists (ACLs), providing IP-based blocklists and access control.
WIT Interface
interface acl {
use types.{error, open-error, ip-address};
resource acl {
open: static func(name: string) -> result<acl, open-error>;
lookup: func(ip-addr: ip-address) -> result<option<body>, acl-error>;
}
enum acl-error {
too-many-requests,
generic-error
}
}
WIT bindings: stubs/wit_world/imports/acl.py
API Design
- Implement
ACLresource wrapper lookup(ip)acceptsstr,IPv4Address, orIPv6Addressand returnsOptional[dict]- Parse JSON body response from WIT layer when IP matches ACL entry
- Return
Nonewhen IP not found in ACL (no match)
Cross-SDK Comparison: All SDKs expose open(name) and lookup(ip) returning entry with prefix, action, id fields. Simple consistent API across languages.
Viceroy Testing
Viceroy supports ACL with JSON file-based test data via test.toml:
[local_server]
# Path to JSON file with ACL entries
acls.my_blocklist = "../data/acl.json"
# Or using object syntax
acls.my_allowlist = { file = "../data/allowlist.json" }
ACL JSON file format maps IP addresses to metadata objects. Lookup operations work with test data. Tests can use @on_viceroy with file references in TOML configuration.
Reference
- Dominant language
- Python
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fastly/compute-sdk-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fastly/compute-sdk-python#116 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
fastly/compute-sdk-python#98 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
fastly/compute-sdk-python#74 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
fastly/compute-sdk-python#61 ·
-
fastly/compute-sdk-python#60 · 1 assignee ·
All issues in fastly/compute-sdk-python
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
learningequality/ricecooker#747 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
run-llama/llama_index#23199 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
KhronosGroup/glTF-Blender-IO#2769 ·