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

[WIP] Solid client authn js upgrade #104

Closed
wants to merge 3 commits into from

Conversation

jaxoncreed
Copy link
Contributor

@jaxoncreed jaxoncreed commented Oct 15, 2020

@jaxoncreed
Copy link
Contributor Author

jaxoncreed commented Nov 3, 2020

Hacks Exist

There are places in the codebase labeled by // HACK comments where a more elegant solution is needed at a later date

@jaxoncreed
Copy link
Contributor Author

jaxoncreed commented Nov 3, 2020

IDP selection UI is crude

The UI for choosing an IDP is crude as solid-client-authn-browser does not come with an IDP selection UI anymore

image

The best course of action would be to build a new UI to select the IDP

@jaxoncreed
Copy link
Contributor Author

jaxoncreed commented Nov 3, 2020

Standalone DB doesn't refresh on login

When running mashlib in standalone mode (via /browse.html), you navigate directly to a resource that doesn’t have public access, it will not automatically refresh the databrowser despite the box.rerender() being called.

To Replicate

  1. While logged in, navigate to a folder page that doesn't have public access (for example the private folder: http://localhost:9080/browse.html?uri=https%3A%2F%2Fldp.demo-ess.inrupt.com%2F114176645321964550648%2Fprivate%2F)
  2. Log into an account that would have access to that folder.
  3. Observe that the window still says no access is allowed when you come back

image

4. To show this folder, navigate to another page using the in-app nagigation bar, then navigate back to the original page

image

NOTE: It seems that going to a page with public access then back to the private page works.

@jaxoncreed
Copy link
Contributor Author

jaxoncreed commented Nov 3, 2020

Cannot create new folders on ESS

This issue only applies to situations where ESS is the LDP.

When creating a new folder, an error is given: Error: Web error: 400 (Bad Request) on PUT of <https://ldp.demo-ess.inrupt.com/114176645321964550648/private/coolFolder/.dummy>

Reason
Whenever a new folder is created, for some reason, the databrowser creates a file at /folder_name/.dummy. It makes a PUT request with no content type. ESS rejects the request because of a lack of content type:

Response Header:

Link: <https://inrupt.com/ns/ess#MissingContentTypeHeader>; rel="http://www.w3.org/ns/ldp#constrainedBy"

@jaxoncreed
Copy link
Contributor Author

jaxoncreed commented Nov 3, 2020

The Dokeli pane cannot access non-public resources:

image

Reason
It is probable that the Dokeli pane uses a different instance of solid-auth-client than the rest of the applications. Because solid-client-authn requires that all panes use the same instance, Dokeli will need to be refactored to receive the global instance.

@jaxoncreed
Copy link
Contributor Author

jaxoncreed commented Nov 3, 2020

[COMPLETE] Deployments on NSS require a user to log in twice.

Reason

  • When you first send an unauthenticated request to a resource on NSS, NSS will respond with its own unauthenticated screen.

image

* Logging into this screen used to save a token to localstorage and then redirect to the databrowser * because a token can no longer be saved to localstorage, you must log in again once you get to the databrowser

image

Possible Solution
Remove NSS's custom login page and just serve the databrowser.

@jaxoncreed
Copy link
Contributor Author

Sharing Pane does not work for ESS

This problem only happens when ESS is the LDP.

When navigating to the sharing pane on the resource, nothing happens and this error appears in the console:

Uncaught (in promise) Error: Error reading  default ACL. status 900: undefined
    _callee$ acl-control.ts:174
    Babel 8
    getACLorDefault acl.ts:472
    getACL acl.ts:589
    nowOrWhenFetched fetcher.js:1034
    promise callback*nowOrWhenFetched fetcher.js:1030
    getACL acl.ts:580
    getACLorDefault acl.ts:470
    _callee2$/< acl-control.ts:165
    _callee2$ acl-control.ts:165
    Babel 8
    ACLControlBox5 acl-control.ts:146
    render sharingPane.ts:36
    renderPane manager.js:645
    listen manager.js:678
    listen manager.js:602
    _callee7$/< manager.js:698
    _callee7$ manager.js:593
    Babel 10
    _renderPaneIconTray2 manager.js:575
    _callee8$ manager.js:752
    Babel 8
    propertyTable manager.js:816
    render manager.js:1954
    expand manager.js:2051
    fireCallbacks utils-js.js:73
    doneFetch fetcher.js:1196
    parse fetcher.js:557

Of course 900 isn't a real http status, and the databrowser doesn't make a request to the Pod at all, so this will require more research to find a reason.

@jaxoncreed
Copy link
Contributor Author

Cannot create a tracker on ESS

This issue only applies when ESS is being used as the IDP.

When trying to create a tracker an error is triggered:

Error writing tracker configuration: Error: Exception in update: Error: Update: Loaded <https://ldp.demo-ess.inrupt.com/114176645321964550648/private/testTracker3/index.ttl>but stil can't figure out what editing protcol it supports. Error: Update: Loaded <https://ldp.demo-ess.inrupt.com/114176645321964550648/private/testTracker3/index.ttl>but stil can't figure out what editing protcol it supports. http://localhost:9080/mashlib.js:14969:19 update http://localhost:9080/mashlib.js:14978:22 update/< http://localhost:9080/mashlib.js:14973:40 promise callback*update http://localhost:9080/mashlib.js:14902:23 update/< http://localhost:9080/mashlib.js:14900:16 update http://localhost:9080/mashlib.js:66315:20 updateMany/updates< http://localhost:9080/mashlib.js:66314:34 updateMany http://localhost:9080/mashlib.js:66351:13 mintNew http://localhost:9080/mashlib.js:114068:24 callbackWS/< http://localhost:9080/mashlib.js:114056:50 promise callback*callbackWS http://localhost:9080/mashlib.js:114131:23 gotName http://localhost:9080/mashlib.js:114135:96 promise callback*makeNewAppInstance/< http://localhost:9080/mashlib.js:114052:12 makeNewAppInstance http://localhost:9080/mashlib.js:114165:27 newThingUI/</< http://localhost:9080/mashlib.js:114163:12 EventListener.handleEvent*newThingUI/< http://localhost:9080/mashlib.js:114154:16 newThingUI http://localhost:9080/mashlib.js:65399:19 render/< http://localhost:9080/mashlib.js:65398:8 promise callback*render http://localhost:9080/mashlib.js:50249:37 propertyTable/< http://localhost:9080/mashlib.js:50241:48 promise callback*propertyTable http://localhost:9080/mashlib.js:51372:20 render http://localhost:9080/mashlib.js:51455:9 expand http://localhost:9080/mashlib.js:15951:32 fireCallbacks http://localhost:9080/mashlib.js:2591:12 doneFetch http://localhost:9080/mashlib.js:1951:22 parse http://localhost:9080/mashlib.js:3283:24 handleResponse/< http://localhost:9080/mashlib.js:3281:8 promise callback*handleResponse http://localhost:9080/mashlib.js:2350:23 fetchUri/< http://localhost:9080/mashlib.js:2349:51 promise callback*fetchUri http://localhost:9080/mashlib.js:2200:83 pendingFetchPromise http://localhost:9080/mashlib.js:2188:19 load http://localhost:9080/mashlib.js:2425:12 nowOrWhenFetched http://localhost:9080/mashlib.js:51498:10 outlineExpand http://localhost:9080/mashlib.js:51647:20 ../solid-panes/lib/outline/manager.js/</module.exports/this.GotoSubject http://localhost:9080/browse.html?uri=https%3A%2F%2Fldp.demo-ess.inrupt.com%2F114176645321964550648%2Fprivate%2F&code=_Sdzt5VkRR4DrNd6BoIYtG&state=c206238a0ae742c58959f49b22fc8085:31:16 go http://localhost:9080/browse.html?uri=https%3A%2F%2Fldp.demo-ess.inrupt.com%2F114176645321964550648%2Fprivate%2F&code=_Sdzt5VkRR4DrNd6BoIYtG&state=c206238a0ae742c58959f49b22fc8085:42:14 EventListener.handleEvent* http://localhost:9080/browse.html?uri=https%3A%2F%2Fldp.demo-ess.inrupt.com%2F114176645321964550648%2Fprivate%2F&code=_Sdzt5VkRR4DrNd6BoIYtG&state=c206238a0ae742c58959f49b22fc8085:9:10 EventListener.handleEvent* undefined 

image

Looking at the request logs, on ESS, it will skip creating index.ttl and state.ttl for some reason

ESS as LDP:
image

NSS as LDP:
image

NOTE: Because of this problem as well as the problem when trying to create a folder, it is unknown how well the issue tracker works on ESS.

@jaxoncreed
Copy link
Contributor Author

Cannot create address book on ESS

This issue only applies when ESS is the LDP.

When trying to create an address book, this error is given: Error setting access permissions for index.ttl : Error fetching rel=ACL header for https://ldp.demo-ess.inrupt.com/114176645321964550648/private/contactBook/index.ttl: Error: fetchACLRel: No Link rel=ACL header for https://ldp.demo-ess.inrupt.com/114176645321964550648/private/contactBook/index.ttl / Error: Error setting access permissions for index.ttl : Error fetching rel=ACL header for https://ldp.demo-ess.inrupt.com/114176645321964550648/private/contactBook/index.ttl: Error: fetchACLRel: No Link rel=ACL header for https://ldp.demo-ess.inrupt.com/114176645321964550648/private/contactBook/index.ttl

NOTE: despite these errors, if you refresh and login again, you will see the address book has been successfully created.

@jaxoncreed
Copy link
Contributor Author

jaxoncreed commented Nov 3, 2020

Cannot add contacts or groups on ESS

Trying to add a contact to an address book will trigger this: Uncaught (in promise) Error: Fetcher: <https://ldp.demo-ess.inrupt.com/114176645321964550648/private/Book/people.ttl> Not Found

It probably has something to do with not being able to get these documents:
image

@jaxoncreed
Copy link
Contributor Author

"Chat with me" feature doesn't work initially on ESS

On ESS, clicking the "chat with me" button will yield an error ACL not found, but reloading and going to it will show that it worked.

@jaxoncreed
Copy link
Contributor Author

jaxoncreed commented Nov 3, 2020

[COMPLETE] Not all tests are up to date:

There are a number of unit tests in the libraries that are not up to date

@jaxoncreed
Copy link
Contributor Author

Cannot Create Scheduled Event on ESS

When trying to create a scheduled event when ESS is an LDP, the following error surfaces: Error: Failed to set Read-Write ACL on results file: No Link rel=ACL header for https://ldp.demo-ess.inrupt.com/114176645321964550648/private/SomeEvent2/results.ttl

NOTE: Refreshing the page will show that the event has actually been created

@jaxoncreed
Copy link
Contributor Author

jaxoncreed commented Nov 5, 2020

New version of solid-client-authn-js requires a webId claim in the id token, and NSS doesn't currently do that

The auth spec was recently upgraded to include the webId in the webId claim rather than the sub claim.

Update: the root cause is here: inrupt/solid-client-authn-js#551

Base automatically changed from master to main February 24, 2021 18:36
@timea-solid
Copy link
Member

Part of past authentication work

@timea-solid timea-solid deleted the solid-client-authn-js-upgrade branch March 11, 2022 16:51
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

Successfully merging this pull request may close these issues.

None yet

2 participants