node-solid-server icon indicating copy to clipboard operation
node-solid-server copied to clipboard

SPARQL ENDPOINT

Open RezMosa opened this issue 1 year ago • 2 comments

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

RezMosa avatar Jul 13 '23 14:07 RezMosa

@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.

zg009 avatar Apr 07 '24 02:04 zg009

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

bourgeoa avatar Apr 07 '24 14:04 bourgeoa