You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that we have an IDP and pod creation, it should be possible to link those two. Specifically: we should have a system in place so that when a user registers with the IDP, a pod also gets created for them on the server. This can be an optional feature chosen through, for example, a checkbox during the registration procedure.
The above still requires a user to already have an external webid though. To completely have an easy registration procedure it should be possible for a user without a webid to register. The server should then create a pod that contains the webid for that user, and use that to register with its own IDP.
Not sure yet what would be the best way to do this. We quite probably would need a new registration handler since the current one is tied to receiving an IDP. Or perhaps there could be a wrapper class around it that handles the above and then sends the new webid to the old registration handler. There are several levels at which this could be done (potentially even an http handler wrapping around the IDP, but I'm guessing this would not be the cleanest solution).
They can also register for a pod without registering for the IDP, right?
Currently that's possible yes. There are no validation checks though, you just do a POST that includes your webid and a pod gets made with default acl settings pointing to that webid.
As part of this issue we might want to update that so you have to be authenticated as that webid when doing such a request. Otherwise you could create pods for other webids than your own (which I guess is not really an issue but I don't think we really want that?).
Yes. I think the main scenario we want to unblock is register for WebID + create a pod combined.
The independent scenarios are of secondary importance.
Had a look into this and below are how I think a new component would look like. This would replace the current RegistrationHandler in the IDP, and (for now) take input in the same way as that handler does, through the same paths.
This is probably going to extend a Dict so it can have other optional values such as real name, or the template name when we want to use dynamic pods.
The 3 booleans indicate everything the user might want to do when registering. The RegistrationHandler then would do 3 steps, depending on the values of those booleans:
In case createWebId is true, a new WebID will be made for the user. This will use the same URI generator that we already have for pod generation, but will append the necessary part to reach the WebID in the new pod (so generate(slug) + 'profile/card#me'). Slug is the name that will be used for the identifier generation. Currently this is called login but that seems to be a misnomer since it's not used for login. If this is false, the webId field will be used instead, and the user will have to add the solid:oidcIssuerRegistrationToken triple to their profile so we can identify they are the owner (as is done now in our IDP).
If register is true, the WebID (either the new one or the one provided) will be added to our account store together with the password. This would require us to change the behaviour of the IssuerOwnershipValidator. Currently that class checks if the identification triple is there, and also if the profile identifies CSS as the issuer. In case some is creating a pod with an external WebID and does not want to register, they should not be required to have a solid:oidcIssuer triple with CSS as the subject, only the solid:oidcIssuerRegistrationToken triple should be required. If createWebId is true and register is false an error would be thrown.
createPod allows the user to choose if they also want a pod. If yes the pod manager that we have now would be called with the necessary parameters. This would use the same slug/identifier generation as used for creating a WebID. In case this fails, the previous steps would have to be reverted, which corresponds to deleting the account from the store again. If createWebId is true and createPod is false an error would be thrown.
From a frontend point of view, these booleans could be 3 checkboxes, and there could for example be some javascript to hide/reveal certain text fields based on the chosen values. In case we have dynamic pods, we could also have a dropdown there with the available templates to choose from.
After registering we should inform the user of the location of their new pod and their new WebID. This could be done through mail or by redirecting to an info page (or both).
Other required architectural changes
Currently the registration is embedded in the oidc login procedure: the only way to reach the registration page is to be in an active oidc login procedure (through the authn client for example) and then press the register button on the login page. We want to completely decouple this so you can just browse to the registration page instead, which would also make it easier if we want to add email confirmation at some point. This does mean that it will not be possible to register anymore during the login procedure.
We could add an actor to support that but I don't think we really need that. This will also require us to generate a random token for the solid:oidcIssuerRegistrationToken triple since currently the session uid is used for that, and be stored somewhere (temporarily).
Activity
RubenVerborgh commentedon May 18, 2021
This feature should be prioritized; it's what people expect from the server.
Indeed, but let's check by default.
They can also register for a pod without registering for the IDP, right?
jvherweg commentedon May 18, 2021
Currently that's possible yes. There are no validation checks though, you just do a POST that includes your webid and a pod gets made with default acl settings pointing to that webid.
As part of this issue we might want to update that so you have to be authenticated as that webid when doing such a request. Otherwise you could create pods for other webids than your own (which I guess is not really an issue but I don't think we really want that?).
RubenVerborgh commentedon May 18, 2021
Yes. I think the main scenario we want to unblock is register for WebID + create a pod combined.
The independent scenarios are of secondary importance.
jvherweg commentedon May 18, 2021
Some extra notes:
jvherweg commentedon May 21, 2021
Had a look into this and below are how I think a new component would look like. This would replace the current
RegistrationHandlerin the IDP, and (for now) take input in the same way as that handler does, through the same paths.New RegistrationHandler
Expects the following POST data:
This is probably going to extend a
Dictso it can have other optional values such as real name, or the template name when we want to use dynamic pods.The 3 booleans indicate everything the user might want to do when registering. The
RegistrationHandlerthen would do 3 steps, depending on the values of those booleans:In case
createWebIdis true, a new WebID will be made for the user. This will use the same URI generator that we already have for pod generation, but will append the necessary part to reach the WebID in the new pod (sogenerate(slug) + 'profile/card#me'). Slug is the name that will be used for the identifier generation. Currently this is calledloginbut that seems to be a misnomer since it's not used for login. If this is false, thewebIdfield will be used instead, and the user will have to add thesolid:oidcIssuerRegistrationTokentriple to their profile so we can identify they are the owner (as is done now in our IDP).If
registeris true, the WebID (either the new one or the one provided) will be added to our account store together with the password. This would require us to change the behaviour of theIssuerOwnershipValidator. Currently that class checks if the identification triple is there, and also if the profile identifies CSS as the issuer. In case some is creating a pod with an external WebID and does not want to register, they should not be required to have asolid:oidcIssuertriple with CSS as the subject, only thesolid:oidcIssuerRegistrationTokentriple should be required. IfcreateWebIdis true andregisteris false an error would be thrown.createPodallows the user to choose if they also want a pod. If yes the pod manager that we have now would be called with the necessary parameters. This would use the same slug/identifier generation as used for creating a WebID. In case this fails, the previous steps would have to be reverted, which corresponds to deleting the account from the store again. IfcreateWebIdis true andcreatePodis false an error would be thrown.From a frontend point of view, these booleans could be 3 checkboxes, and there could for example be some javascript to hide/reveal certain text fields based on the chosen values. In case we have dynamic pods, we could also have a dropdown there with the available templates to choose from.
After registering we should inform the user of the location of their new pod and their new WebID. This could be done through mail or by redirecting to an info page (or both).
Other required architectural changes
Currently the registration is embedded in the oidc login procedure: the only way to reach the registration page is to be in an active oidc login procedure (through the authn client for example) and then press the register button on the login page. We want to completely decouple this so you can just browse to the registration page instead, which would also make it easier if we want to add email confirmation at some point. This does mean that it will not be possible to register anymore during the login procedure.
We could add an actor to support that but I don't think we really need that. This will also require us to generate a random token for the
solid:oidcIssuerRegistrationTokentriple since currently the session uid is used for that, and be stored somewhere (temporarily).RubenVerborgh commentedon May 21, 2021
Good plan 👍