nodeSolidServer / node-solid-server

Solid server on top of the file-system in NodeJS
https://solidproject.org/for-developers/pod-server
Other
1.78k stars 299 forks source link

SPARQL ENDPOINT #1733

Open RezMosa opened 1 year ago

RezMosa commented 1 year ago

Hello If I add SPARQL endpoint into NSS, I wont be able to keep the authentication/authorization of Solid. Because NSS uses a SPARQL store as backend and bypasses all authorization. Am I right? If yes, how to fix this issue? I am looking to have server side SPARQL query with authorisation. Thanks

zg009 commented 5 months ago

@RezMosa Sorry for the late follow up, but if you need advice I have an example piece of code that allows retrieval of username/password/webId from NSS stores which you could add as Basic authorization credentials in a rudimentary way.

bourgeoa commented 5 months ago

In NSS the allow.js handler middleware is in charge of checking if you are logged and in and have allowed permissions https://github.com/nodeSolidServer/node-solid-server/blob/21096e209d7c6e23f67c8b4bf9ad546301ebf4a3/lib/handlers/allow.js#L18-L22

I believe that the interesting line in your case is L21 where you could have the path to be queried