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

The WebID could not be parsed #169

Open
DylanVanAssche opened this issue Jun 10, 2022 · 8 comments
Open

The WebID could not be parsed #169

DylanVanAssche opened this issue Jun 10, 2022 · 8 comments

Comments

@DylanVanAssche
Copy link

My webID https://dylanvanassche.be/#me is written in JSON-LD as snippets in my HTML website, no content-negotiation.
It seems that the CSS has issues to parse this. Would be useful if it would read the JSON-LD instead of forcing Turtle: https://github.com/CommunitySolidServer/access-token-verifier/blob/main/src/algorithm/retrieveWebidTrustedOidcIssuers.ts#L13=

CSS logs:

1|CSS inst | 2022-06-10T09:10:58.518Z [BaseHttpServerFactory] info: Received GET request for /idp/consent/
1|CSS inst | 2022-06-10T09:10:58.907Z [BaseHttpServerFactory] info: Received GET request for /idp/consent/
1|CSS inst | 2022-06-10T09:10:59.683Z [BaseHttpServerFactory] info: Received POST request for /idp/consent/
1|CSS inst | 2022-06-10T09:10:59.780Z [BaseHttpServerFactory] info: Received GET request for /.oidc/auth/omMLMhg0SUujFBMinpZyh
1|CSS inst | 2022-06-10T09:11:00.393Z [BaseHttpServerFactory] info: Received GET request for /.well-known/openid-configuration
1|CSS inst | 2022-06-10T09:11:00.467Z [BaseHttpServerFactory] info: Received OPTIONS request for /.oidc/token
1|CSS inst | 2022-06-10T09:11:00.537Z [BaseHttpServerFactory] info: Received POST request for /.oidc/token
1|CSS inst | 2022-06-10T09:11:00.651Z [BaseHttpServerFactory] info: Received GET request for /.oidc/jwks
1|CSS inst | 2022-06-10T09:11:13.383Z [BaseHttpServerFactory] info: Received OPTIONS request for /availability
1|CSS inst | 2022-06-10T09:11:13.645Z [BaseHttpServerFactory] info: Received GET request for /availability
1|CSS inst | 2022-06-10T09:11:14.034Z [DPoPWebIdExtractor] warn: Error verifying WebID via DPoP-bound access token: The WebID could not be parsed.
1|CSS inst | Actual: Invalid RDF
1|CSS inst | Expected: A valid turtle document
1|CSS inst | 2022-06-10T09:11:14.041Z [WebAclReader] info: Reading ACL statements from https://dyvassch.pod.knows.idlab.ugent.be/availability.acl
1|CSS inst | 2022-06-10T09:11:14.044Z [PermissionBasedAuthorizer] warn: Unauthenticated agent has no read permissions
@matthieubosquet
Copy link
Collaborator

A WebID document MUST be available as turtle as per the spec: https://www.w3.org/2005/Incubator/webid/spec/identity/#introduction.

I could argue that it makes sense if anything because having one base format is good for interoperability. Json-ld also happens to be problematic because all contexts must be dereferenced in order for it to be parsed as rdf.

@DylanVanAssche
Copy link
Author

DylanVanAssche commented Jun 10, 2022

That's sad, that means that websites deployed to something like Github/Gitlab pages are all broken then as they do not support content negotiation.

@joachimvh
Copy link
Member

A WebID document MUST be available as turtle as per the spec: https://www.w3.org/2005/Incubator/webid/spec/identity/#introduction.

The Solid spec only mentions that it should be an RDF document though so should perhaps be updated there for clarity? https://solidproject.org/TR/protocol#webid

Similarly for the OIDC spec https://solid.github.io/solid-oidc/#concepts-webids

(I tried looking for this requirement but couldn't find it is why 😄 ).

@matthieubosquet
Copy link
Collaborator

Yes, it’s a bit unfortunate that GitHub pages don’t support content negotiation.

I guess we could look into adding json-ld and rdfa parsing to the library.

@DylanVanAssche
Copy link
Author

I plan to move my website at some point to my own hosting which I fully control, but I haven't been able to do it yet.
However, that would solve my specific case, but I can imagine a lot of people use these services for serving their website...

@joachimvh
Copy link
Member

I guess we could look into adding json-ld and rdfa parsing to the library.

I'm not saying that you should since you're right that the spec requires it, but if you do you could just plug in rdf-dereference. Although that brings back the Comunica dependencies.

@elf-pavlik
Copy link

This lib might be used by clients as well #211 , including PWA. I don't think we should throw a bunch of RDF parsers in.

My webID https://dylanvanassche.be/#me is written in JSON-LD as snippets in my HTML website

Turtle can be embedded in HTML in a similar way https://www.w3.org/TR/turtle/#in-html

I think it shouldn't be that hard to pick out the <script type="text/turtle"> tag and parse the turtle in it. It shouldn't require any additional parsers at least when run in a web browser.

@rubensworks
Copy link

Just want to chime in here to signal that the strict Turtle requirements on WebIDs is under discussion here: w3c/WebID#3

My personal view on this is that WebIDs should be readable in any RDF serialization.

As @joachimvh has said, parsing from all RDF serializations can easily be supported in clients using libs such as rdf-parse and rdf-dereference.

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

5 participants