I recently started building a system using StorJ as the file storage. I use the uplink sdk for Go and so far everything works really smoth (compliments to the devs)
Now I was wondering, the Uplink CLI has the option to create grants and share objects, like this example from the docs
uplink share sj://cakes/cheesecake.jpg
Am I right to assume this function does not exist in the uplink sdk? (at least i couldnt find it)
Its gonna be quite crucial for my App to be able to programatically create and share and Access Token for objects.
You can create a main access grant and derive more grants programmatically with limited access/permission. This is an offline operation and you don’t need to call any API. The generated grants can be used independently, when you delete the main one, all the children will be invalidated, too…
In case you are interested the underlying technology, Access grant includes
the satellite address
the API key which includes all the allowed permissions and a signature (this part can be further restricted)
secret password used to decrypt the data
This illustration shows the structure:
And this shows why is it possible to derive restricted API keys:
But it’s not strictly required, you can use access.Share.