-
Notifications
You must be signed in to change notification settings - Fork 303
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
auth-upgrade : old login/logout is not using the new authorization #1619
Comments
This is considerably more complex than I first thought. The problem is that we can not login from outside SolidOS and then load a SolidOS page because loading a new page loses the login. The new auth flow requires that the login be from SolidOS itself, not outside SolidOS. For the register page (https://solidcommunity.net/index.html) I think the best we can do is provide an input box for them to enter their username which would bring them to their podRoot. If they have no index.html they will get a SolidOS page with a login button. If they have an index.html with links to e.g. /public or /foo and those links would go to SolidOS pages with login buttons. Thoughts please! |
Further investigation shows that if I use inrupt/solid-client-authn-browser directly, I can set the redirectUrl in the webapp. BUT the redirect URL must be known before the login happens. On a user's index.html we can hard-code a redirect to their profile or storage. On the server root we can't know their webId without asking so there is no way to have a login button there AFAIK. |
so given the server root on the one hand and the pod root of a user on the other hand we have to differentiate between
the complexity of the issue is stunning me and it seems not clear, if we can keep the upper. |
I wonder whether all the workflows around registration and login at the server pages were documented anywhere. Asking some for their webid never used to a thing, as you would log in, the login process would remember it or ask for it, and then the app would get it returned from the auth code. If their go to the root of the server then we could log them in to find which user they are, and then I guess redirect them to their pod. But normally that should not be a path they use, they should normally bookmark their pod not the server. Maybe if people need to be reminded where their pod is on thd server we could store their webid in a cookie of the server, but that is not crucial. |
I guess the question is do users usually go to their index.html and stay and not go to SolidOS? If the answer to this is not usually. If the predominant behaviour is to go directly from there to SolidOS, then I really prefer what you are suggesting. As I think the current behaviour isn't ideal for those who go to SolidOS after because we have to login twice. If we know their webID then great, otherwise the next best thing. Or maybe a button that says go to your "POD" or such to login. |
If part of the problem is people who have put an index.html file in their own pod, (which is very reasonable as everyone should have their own web site, then how about having a backdoor to a control panel which will allow them to get in and configure their pod, looking at the files in the pod root objectively with no interpretation. Like
or something like that we would program the server to respond to that address for any pod. Or is there an existing account page in .well_known space which we could add this functionality? |
May be you can do the same process.
|
All these are solved by that code? |
No, unfortunately that isn't a solution. There are two workflows involved.
@ewingson - yes we would need to remove the existing code for the login buttons but no we would not need to replace it with a script. Let's say the visitor comes to https://you.solcom.net/index.html and clicks on a link to https://you.solcom.net/public/ - there will be a login button on the /public/ page because it is a page served by the databrowser and login in there will keep the login as long as the visitor stays in that databrowser. So from a dev's point of view, things are very simple - no login buttons on HTML pages, login buttons on all other pod-served pages as part of the databrowser with no need for any special login code in the HTML. |
@jeff-zucker @timbl @SharonStrats @bourgeoa @theRealImy
this connects some imaginary dots in my (apprentice) mind. besides, that is how I chose to make on solidweb.me, as @RubenVerborgh said there will be no standard UI. thank you all for your patience explaining the stuff.
from my experience side I just can tell one small simple detail: when upgrading NSS per |
@ewingson yes I feel the same. Now after understanding (connecting the dots), I fully support the removing of login from non databrowser (SolidOS server) pages. This would be a step forward towards a better UX. My opinion on your thought @jeff-zucker
|
No, we will not make any login code at all. Logins will all happen using the databrowser and do not require any extra code. Users will not login on an index.html page. They can go to an index.html page and link from there to a databrowser page and login in on that databrowser page.
That's correct, no standard UI will come with CSS, each pod provider will have to provide their own, either mashlib or penny or something else. But that does not mean that it is a good idea to have servers with non-standard setups, especially at this point in Solid when it is hard enough developing tutorials and materials to teach people how to use pods. "CSS provides no front-end to pod providers" is different from saying "Pod providers should provide pods to users with no front-end." |
So the consensus seems to be that we should not have login buttons on index.html pages. Further, @timbl said in chat :
So, any objections to this plan? :
We would need to warn users about the changes and tell those with modified index.html pages that they should remove login buttons from those pages. |
a) server root direct user to pod makes perfectly sense (check for cookies ?) ... must be non clickable cause in that point of time we don't know the user... b) pod root LGTM (maintenance needed) c) regging then the actual login happens at the second site, will that confuse them ? |
@ewingson - my suggestion was to remove that button and replace it with the same text as on the server root page, for the same reason. We don't yet know who the user is. |
this seems well thought through simplification |
We must not neglect that a pod is a web server. Do I misunderstand something ? The server root/index.html with register/login is mainly used after pod creation. It is the way to return to the user his webId and link to his profile. |
@bourgeoa - I'm afraid that I don't understand what you are saying. I also don't understand what you mean by a "webapp". The index.html pages are not apps. What does logging in to an index.html accomplish? |
That flow is no longer possible. The webId can only be returned to a known place and we can't know what place that is until they are logged in. So logging in on the server root page will only return to the server root page and clicking a link to their profile from that page will lose the login. |
That is the actual process |
I still have no idea what part of this you either object to or think should be done differently. |
When you register a new pod you need to be returned you webId this is the identity provider part of NSS. Then you should be proposed to link to login to that pod storage. |
Yes, that part works fine - after you register you are directed to your pod where you need to login. I am not suggesting any changes to that. I am talking about removing the login button from the index.html before you register. |
And removing the "already have an account" button on the registration page itself. But leaving the rest of the registration flow the same - redirects to the pod where user needs to login. |
Ok agreed I had a wrong workflow just checked by creating a new pod that you are redirected to you pod. |
Sorry to insist, the current user experience, flow (before auth-upgrade) is depicted here: https://miro.com/app/board/o9J_lsrieoc=/?invite_link_id=998159892622 |
if I get it right, this |^ is the result of the databrowser app and not a filebased index.html. |
@timea - That is the pod root but it is not an index.html, as @ewingson says, that page is autogenerated by mashlib. It has its own issues but they are not related directly to the question of the index. html. The index.html page occurs at the pod root only if the user created one or got an assigned one before 5.1.7 . What you are showing is what one sees if there is no index.html. Pod root has three different possibilities. a) If the user got an account before 5.1.7 and did not erase it, got an actual index.html. You can see it here : .https://github.com/solid/node-solid-server/blob/v5.1.6/default-templates/new-account/index.html. That is what we want to eliminate if unchanged. 2) If the user does not have an index.html and the visitor is not logged in, they see what you posted two comments up - a databrowser-generated page with the home icon active, that is a databrowser page, not an HTML page so logining in from there is fine. 3) If the user does not have an index.html and they go to their pod root when logged in, they will get that same generated databrowser page but with a menu for "my stuff", "my storage", etc. That is also a databrowser page so does not need any changes related to this issue. Server root has a button to login and a button to sign up. The login button needs to go because it logs us in to the index.html page, not to a databrowser page. The sign up button should stay and properly returns the user to their pod. The registration flow should not change, the buttons to login instead of register need to go. So the changes are only to remove the login button from the server root and from the registration page but not otherwise touch the registration flow. And for people who got an index.html but didn't change it, that index will be erased and users will instead see the home-icon page you showed. |
Summary of progress so far. a) Initially tried to redirect from server-root index.html to login back to index.html and either redirect or link to pod. Tried with both ui-authn and directly with inrupt/solid-client-authn-browser. In all cases it would go to the pod, and then immediately redirect back to index.html. b) Then tried to add mashlib to the server-root index.html. I was able to go from index to login, back to index where I used gotoSubject() to get to the user's pod. This worked with a test file in my own pod and successfully kept the login. However, with @ewingson's help, I saw that this would not work when served from my pod because of 403s generated by a mismtatch of origins. c) I have now created a version of b that replaces the existing default-templates/server/index.html with one using the same method as b. It is here: #1620. Waiting to see if when depoloyed at server root we can avoid the 403s. |
Update after the latest PR from Jeff: |
Propose we solve this later after rolling out the new mashlib and NSS |
After much experimentation, the server-root index.html is solved - we redirect to a page showing the user's pod address and let them click it then login again on their pod. The user's pod root index.html is undsolvable before Inrupt change their client so removing them is the best bet. See more detailed summary at |
Some internal NSS web apps are using the old authentication.
The text was updated successfully, but these errors were encountered: