Access or session persistence

34 views
Skip to first unread message

Valentino Pecaoco

unread,
Jan 5, 2025, 12:06:44 PMJan 5
to Sandstorm Development
I have a simple POC where one grain (grain 1) successfully discovers a capability being advertised by another grain (grain 2):
  1. Grain 1 has an (html) button that when clicked, queries powerbox for a "grain-2" capability.
  2. A powerbox UI then opens asking me to select Grain 2.
  3. When I click on Grain 2, Grain 2's home page (html) is displayed inside the powerbox UI.
  4. When I close the powerbox UI and click on Grain 1's button again (second time), a powerbox UI again opens up asking me to select Grain 2.
Is there a way where I wouldn't be asked to select Grain 2 again a  second time and so on?

Thanks in advance.

Jake W

unread,
Jan 5, 2025, 12:25:07 PMJan 5
to Sandstorm Development
You should be able to save the capability and request it again. The powerbox was implemented pretty late in Sandstorm's more active development period, so there's not a ton of production examples of using it effectively, especially between grains.

One example of grain-to-grain access which might be useful to see is https://github.com/zenhack/sandstorm-filesystem (I do have a copy of the built SPK for this if you want to see it in action. Though it doesn't look like Ian implemented any storage of the capability.

Then more generally, for outbound HTTP requests, there's the https://github.com/sandstorm-org/powerbox-http-proxy which implements requesting access to outside domains via the powerbox, then saves and reuses the capability for future requests to the same domains. This is in production use, most heavily in our TTRSS package.

And then as a friendly nudge, we are starting to push people over to https://groups.io/g/sandstorm-user-group and https://groups.io/g/sandstorm-dev-group because Google really likes to interfere with legitimate email over on this list. I will see if I can convince Google not to moderate your posts here though.
Reply all
Reply to author
Forward
0 new messages