Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPARQL ENDPOINT #1733

Open
RezMosa opened this issue Jul 13, 2023 · 2 comments
Open

SPARQL ENDPOINT #1733

RezMosa opened this issue Jul 13, 2023 · 2 comments

Comments

@RezMosa
Copy link

RezMosa commented Jul 13, 2023

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
Copy link
Contributor

zg009 commented Apr 7, 2024

@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
Copy link
Member

bourgeoa commented Apr 7, 2024

In NSS the allow.js handler middleware is in charge of checking if you are logged and in and have allowed permissions

// Determine the actual path of the request
// (This is used as an ugly hack to check the ACL status of other resources.)
let resourcePath = res && res.locals && res.locals.path
? res.locals.path
: req.path

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants