Skip to content

Allow trusted administrative services to provision pods #924

Closed

Description

@justinwb

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).

Activity

  1. added
    ☀️ enhancement
    on Aug 20, 2021
  2. jvherweg commented on Aug 20, 2021

    @jvherweg
    Member

    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.

  3. justinwb commented on Aug 20, 2021

    @justinwb
    Author

    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.

  4. jvherweg commented on Aug 20, 2021

    @jvherweg
    Member

    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.

  5. jvherweg commented on Aug 20, 2021

    @jvherweg
    Member

    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).

  6. justinwb commented on Aug 20, 2021

    @justinwb
    Author

    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 🙂

  7. RubenVerborgh commented on Aug 21, 2021

    @RubenVerborgh
    Member

    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.

    Could we reuse WebACL?

  8. jvherweg commented on Aug 23, 2021

    @jvherweg
    Member

    Could we reuse WebACL?

    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.

  9. RubenVerborgh commented on Aug 23, 2021

    @RubenVerborgh
    Member

    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.

  10. jvherweg commented on Oct 7, 2021

    @jvherweg
    Member

    Solved in #968 (will be part of 2.0.0 release).

  11. justinwb commented on Oct 7, 2021

    @justinwb
    Author

    So happy to see this move its way through and get resolved so quickly @joachimvh @RubenVerborgh!!! Great work 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions