You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add authorization callback for subscription requests #28
Currently, solid-ws accepts all sub <url> requests without any authorization check. This means anyone can subscribe to notifications for any resource, even private ones they don't have read access to.
This can leak information - a subscriber learns when a resource changes, even if they can't read it.
Proposed solution
Add an optional authorize callback that servers can use to check permissions:
constsolidWs=SolidWs(server,app,{authorize: (iri,req,callback)=>{// Check if user has read access to iri// callback(null, true) to allow// callback(null, false) to deny}})
If authorization fails, send err <url> forbidden instead of ack.
This keeps solid-ws flexible (default allows all, as today) while letting servers like NSS integrate their ACL checking.
Happy to submit a PR for this if it sounds reasonable!
Activity
feat: add authorize callback for subscription requests