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
{{ message }}
Repository navigation
Allow trusted administrative services to provision pods #924
CSS should allow trusted "administrative" services to provision pods in automated fashion. This was previously possible before the HTTP interface at /pods was removed in #749.
This capability is valuable if secured properly. A simple approach would be to have an allowed list of trusted administrative WebIDs (e.g. as part of the server configuration), and let CSS check the WebID claim in the provided token of a provisioning request to see if it matches one of them. If there is a match, allow that trusted admin service to make a pod for a provided WebID. Further restrictions on the WebIDs it is permitted to provision pods for could be included in the configuration (e.g. only those associated with a given domain).
I actually don't even remember why I added a token check when provisioning pods. The only time this is really necessary is when registering with the IDP for security reasons, but there is not really a security risk to provisioning a pod for a specific WebID. Maybe that was added to make sure users didn't accidentally create a pod for a wrong WebID. We could just remove that check in case no registration with the IDP is needed.
FYI, in the versions/2.0.0 branch you can now use content negotation to have the /idp/register response be a JSON object with all the relevant fields, which would make API usage easier. We also want to have it accept JSON object soon-ish.
FYI, in the versions/2.0.0 branch you can now use content negotation to have the /idp/register response be a JSON object with all the relevant fields, which would make API usage easier. We also want to have it accept JSON object soon-ish.
👏 Agree that is much cleaner! Big +1 on that direction 👍
We could just remove that check in case no registration with the IDP is needed.
I think there's still a lot of value in maintaining configurable checks that let CSS determine whether a given agent can create a pod or an identity (for themselves or other webids). For example, at the moment I'm achieving my use case by using the NoCheckOwnershipValidator. This allows my trusted administrative agent to make pods, but it also means any other agent can do the same. In a lot of use cases this may be fine, but I'd still want to have a check that allows only permitted agents to do provisioning (for themselves or others), so that a malicious or poorly made agent can't write a script that creates an endless amount of pods until the server runs out of memory or storage.
Yea that makes sense. We could have an AuthorizedOwnershipValidator ("OwnershipValidator" might not be the best name anymore at that point). One question will be how to configure it. We could just hardcode some WebIDs in the config, but it would be nice to have a dynamic solution there. Perhaps a restricted RDF document containing valid WebIDs.
We should then also update the RegistrationHandler to use two different handlers, one for registration (for which we want an actual OwnershipValidator), and one for pod creation (which can be a new type).
We should then also update the RegistrationHandler to use two different handlers, one for registration (for which we want an actual OwnershipValidator), and one for pod creation (which can be a new type).
Agree - for pod provisioning I think its less about Ownership and more about capability to create (which could be due to ownership, but also to some other trust relationship.
One question will be how to configure it. We could just hardcode some WebIDs in the config, but it would be nice to have a dynamic solution there. Perhaps a restricted RDF document containing valid WebIDs.
Yep good question. My use cases don't require more than server-level hard-coding, but I certainly wouldn't complain about additional flexibility 🙂
One question will be how to configure it. We could just hardcode some WebIDs in the config, but it would be nice to have a dynamic solution there. Perhaps a restricted RDF document containing valid WebIDs.
I was also thinking of having something like /idp/registration.acl. Main issue is that since the pathing is completely different in the IDP part compared to the main LDP part we would have to figure out how to do that nicely there.
On the other hand, having a fixed list of supported WebIDs is also non-trivial since we would have to extract credentials in the IDP component and somehow get those credentials to the registration handler.
I was also thinking of having something like /idp/registration.acl. Main issue is that since the pathing is completely different in the IDP part compared to the main LDP part we would have to figure out how to do that nicely there.
Let's do that!
Also good test (for CSS and for Solid) of LDP/WAC independence.
Activity
jvherweg commentedon Aug 20, 2021
I actually don't even remember why I added a token check when provisioning pods. The only time this is really necessary is when registering with the IDP for security reasons, but there is not really a security risk to provisioning a pod for a specific WebID. Maybe that was added to make sure users didn't accidentally create a pod for a wrong WebID. We could just remove that check in case no registration with the IDP is needed.
FYI, in the
versions/2.0.0branch you can now use content negotation to have the/idp/registerresponse be a JSON object with all the relevant fields, which would make API usage easier. We also want to have it accept JSON object soon-ish.justinwb commentedon Aug 20, 2021
👏 Agree that is much cleaner! Big +1 on that direction 👍
I think there's still a lot of value in maintaining configurable checks that let CSS determine whether a given agent can create a pod or an identity (for themselves or other webids). For example, at the moment I'm achieving my use case by using the
NoCheckOwnershipValidator. This allows my trusted administrative agent to make pods, but it also means any other agent can do the same. In a lot of use cases this may be fine, but I'd still want to have a check that allows only permitted agents to do provisioning (for themselves or others), so that a malicious or poorly made agent can't write a script that creates an endless amount of pods until the server runs out of memory or storage.jvherweg commentedon Aug 20, 2021
Yea that makes sense. We could have an
AuthorizedOwnershipValidator("OwnershipValidator" might not be the best name anymore at that point). One question will be how to configure it. We could just hardcode some WebIDs in the config, but it would be nice to have a dynamic solution there. Perhaps a restricted RDF document containing valid WebIDs.jvherweg commentedon Aug 20, 2021
We should then also update the RegistrationHandler to use two different handlers, one for registration (for which we want an actual OwnershipValidator), and one for pod creation (which can be a new type).
justinwb commentedon Aug 20, 2021
Agree - for pod provisioning I think its less about Ownership and more about capability to create (which could be due to ownership, but also to some other trust relationship.
Yep good question. My use cases don't require more than server-level hard-coding, but I certainly wouldn't complain about additional flexibility 🙂
RubenVerborgh commentedon Aug 21, 2021
Could we reuse WebACL?
jvherweg commentedon Aug 23, 2021
I was also thinking of having something like
/idp/registration.acl. Main issue is that since the pathing is completely different in the IDP part compared to the main LDP part we would have to figure out how to do that nicely there.On the other hand, having a fixed list of supported WebIDs is also non-trivial since we would have to extract credentials in the IDP component and somehow get those credentials to the registration handler.
RubenVerborgh commentedon Aug 23, 2021
Let's do that!
Also good test (for CSS and for Solid) of LDP/WAC independence.
jvherweg commentedon Oct 7, 2021
Solved in #968 (will be part of 2.0.0 release).
justinwb commentedon Oct 7, 2021
So happy to see this move its way through and get resolved so quickly @joachimvh @RubenVerborgh!!! Great work 🚀