Add support for Sandstorm #590

Open
opened 2 months ago by prologic · 7 comments
Owner
  • Get Sandstorm users auto-created and logged in, since Sandstorm (ideally) manages authentication.
  • Get web publishing up so the world can follow.
  • Add in the HTTP proxy for getting posts from the outside world.
  • Try to get the API connected up for mobile app support.

Work-in-proggress branch:sandstorm_support

- [ ] Get Sandstorm users auto-created and logged in, since Sandstorm (ideally) manages authentication. - [ ] Get web publishing up so the world can follow. - [ ] Add in the HTTP proxy for getting posts from the outside world. - [ ] Try to get the API connected up for mobile app support. Work-in-proggress branch:[sandstorm_support](https://git.mills.io/yarnsocial/yarn/src/branch/sandstorm_support)
prologic added the
help wanted
area/hosting
enhancement
area/packaging
area/backend
labels 2 months ago
Poster
Owner

yarnd now runs in Sandstorm 🥳

`yarnd` now runs in Sandstorm 🥳
Poster
Owner

For the first part (Authentication and Authorization) we probabpy need a custom "Session" manager if SANDSTORM=1 (from the environment) and to implement Auth handling provided by Sandstorm as trusted headers

For the first part (_Authentication and Authorization_) we _probabpy_ need a custom "Session" manager if `SANDSTORM=1` (_from the environment_) and to implement [Auth handling provided by Sandstorm as trusted headers](https://docs.sandstorm.io/en/latest/developing/auth/)
Poster
Owner

After this the rest should be pretty straight forward 👌

After this the rest should be pretty straight forward 👌

Yeah, I think pulling in auth is probably the one thing that really needs one to understand the specific app code in question.

For web publishing I need to check on the status of the getPublicId little app, but that will get built entirely in the sh scripts, and shouldn't impact your code at all, until you call that to get the URL for DNS config. The proxy is similar: We can set everything up entirely in sh scripts and then all you have to do is proxy your outgoing network requests to it. (Which is arguably a decent standard feature for apps to support anyways, I think.)

Yeah, I think pulling in auth is probably the one thing that really needs one to understand the specific app code in question. For web publishing I need to check on the status of the getPublicId little app, but that will get built entirely in the sh scripts, and shouldn't impact your code at all, until you call that to get the URL for DNS config. The proxy is similar: We can set everything up entirely in sh scripts and then all you have to do is proxy your outgoing network requests to it. (Which is arguably a decent standard feature for apps to support anyways, I think.)
Poster
Owner
[13:28:19]  <isd> The flow would be basically, using this package: https://pkg.go.dev/zenhack.net/go/sandstorm@v0.0.0-20211021215300-f57533beec91/exp/sandstormhttpbridge
[13:30:24]  <isd> (1) call Connect on startup to get a reference to the bridge, (2) in some request handler, call GetSessionContext to get a refrence to the session context, (3) cast that to a HackSessionContext (https://pkg.go.dev/zenhack.net/go/sandstorm@v0.0.0-20211021215300-f57533beec91/capnp/hacksession#HackSessionContext) and then call GetPublicId
[13:31:01]  <isd> Sadly, I do not have code handy that you can just copy & paste.
[13:31:41]  <isd> For outgoing requests, https://github.com/zenhack/powerbox-http-proxy is probably the best reference.

``` [13:28:19] <isd> The flow would be basically, using this package: https://pkg.go.dev/zenhack.net/go/sandstorm@v0.0.0-20211021215300-f57533beec91/exp/sandstormhttpbridge [13:30:24] <isd> (1) call Connect on startup to get a reference to the bridge, (2) in some request handler, call GetSessionContext to get a refrence to the session context, (3) cast that to a HackSessionContext (https://pkg.go.dev/zenhack.net/go/sandstorm@v0.0.0-20211021215300-f57533beec91/capnp/hacksession#HackSessionContext) and then call GetPublicId [13:31:01] <isd> Sadly, I do not have code handy that you can just copy & paste. [13:31:41] <isd> For outgoing requests, https://github.com/zenhack/powerbox-http-proxy is probably the best reference. ```

Have you had any inspiration on the account integration portion by chance? I am excited about this still.

Have you had any inspiration on the account integration portion by chance? I am excited about this still.
Poster
Owner

Ahh yes I think I know how to do this, but I think I had a question of you actually -- mostly to seek your opinion. Let me finish up some refactoring work and then get back to this 👌

Ahh yes I _think_ I know how to do this, but I think I had a question of you actually -- mostly to seek your opinion. Let me finish up some refactoring work and then get back to this 👌
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Loading…
There is no content yet.