Sandstorm mobile notifications hack

97 views
Skip to first unread message

Jason Paryani

unread,
Aug 16, 2016, 3:56:29 PM8/16/16
to sandst...@googlegroups.com
Hey all,

Since we're probably not going to have an official version of push notifications working on mobile for a while, I went ahead and hacked together a solution that works for me. It connects directly to a Sandstorm server using the ddp socket and a resume token you supply. It then listens to the `desktopNotifications` subscription to see notifications as they come in.

It's currently hard coded to use the Pushover service to send out the notifications, but I'd be open to adding other integrations (or even adding email support until such time as Sandstorm adds it).

This is all hacky and subject to breakage, so caveat emptor, blah blah.

Alex Morega

unread,
Aug 17, 2016, 11:23:41 AM8/17/16
to Jason Paryani, sandst...@googlegroups.com
That's beautifully simple. I'd like to do the same thing but deliver notifications by email.
-- Alex
> --
> You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

signature.asc

Jason Paryani

unread,
Aug 17, 2016, 2:46:18 PM8/17/16
to Alex Morega, sandst...@googlegroups.com
So after talking with the team this morning, we've decided to prioritize email notifications in Sandstorm proper. If you're fine with waiting a week or two, there should be official support in Sandstorm itself.

> To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-dev+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-dev+unsubscribe@googlegroups.com.

Alex Morega

unread,
Aug 18, 2016, 5:43:01 AM8/18/16
to Jason Paryani, sandst...@googlegroups.com
I have one security concern. We're running a private Sandstorm with SAML authentication that hosts sensitive information. What content would be sent via email? Will it be possible to disable the feature from admin?

For my own use, ok, I'll wait for the official support :)

-- Alex

> On 17 Aug 2016, at 21:45, Jason Paryani <jpar...@sandstorm.io> wrote:
>
> So after talking with the team this morning, we've decided to prioritize email notifications in Sandstorm proper. If you're fine with waiting a week or two, there should be official support in Sandstorm itself.
>
> On Wed, Aug 17, 2016 at 8:23 AM, Alex Morega <al...@grep.ro> wrote:
> That's beautifully simple. I'd like to do the same thing but deliver notifications by email.
> -- Alex
>
> > On 16 Aug 2016, at 22:55, Jason Paryani <jpar...@sandstorm.io> wrote:
> >
> > Hey all,
> >
> > Since we're probably not going to have an official version of push notifications working on mobile for a while, I went ahead and hacked together a solution that works for me. It connects directly to a Sandstorm server using the ddp socket and a resume token you supply. It then listens to the `desktopNotifications` subscription to see notifications as they come in.
> >
> > It's currently hard coded to use the Pushover service to send out the notifications, but I'd be open to adding other integrations (or even adding email support until such time as Sandstorm adds it).
> >
> > This is all hacky and subject to breakage, so caveat emptor, blah blah.
> >
> > Code is up at https://github.com/jparyani/sandstorm-notification-pusher
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
signature.asc

Jason Paryani

unread,
Aug 22, 2016, 4:27:23 PM8/22/16
to Alex Morega, sandst...@googlegroups.com
There will definitely be options for individual users to disable email notifications. Is that sufficient, or do you also need to have the admin be able to do this? Would the admin disable email notifications globally or on a per-user basis?

On Thu, Aug 18, 2016 at 2:42 AM, Alex Morega <al...@grep.ro> wrote:
I have one security concern. We're running a private Sandstorm with SAML authentication that hosts sensitive information. What content would be sent via email? Will it be possible to disable the feature from admin?

For my own use, ok, I'll wait for the official support :)

-- Alex

> On 17 Aug 2016, at 21:45, Jason Paryani <jpar...@sandstorm.io> wrote:
>
> So after talking with the team this morning, we've decided to prioritize email notifications in Sandstorm proper. If you're fine with waiting a week or two, there should be official support in Sandstorm itself.
>
> On Wed, Aug 17, 2016 at 8:23 AM, Alex Morega <al...@grep.ro> wrote:
> That's beautifully simple. I'd like to do the same thing but deliver notifications by email.
> -- Alex
>
> > On 16 Aug 2016, at 22:55, Jason Paryani <jpar...@sandstorm.io> wrote:
> >
> > Hey all,
> >
> > Since we're probably not going to have an official version of push notifications working on mobile for a while, I went ahead and hacked together a solution that works for me. It connects directly to a Sandstorm server using the ddp socket and a resume token you supply. It then listens to the `desktopNotifications` subscription to see notifications as they come in.
> >
> > It's currently hard coded to use the Pushover service to send out the notifications, but I'd be open to adding other integrations (or even adding email support until such time as Sandstorm adds it).
> >
> > This is all hacky and subject to breakage, so caveat emptor, blah blah.
> >
> > Code is up at https://github.com/jparyani/sandstorm-notification-pusher
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-dev+unsubscribe@googlegroups.com.

> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-dev+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-dev+unsubscribe@googlegroups.com.

Alex Morega

unread,
Aug 22, 2016, 4:58:11 PM8/22/16
to Jason Paryani, sandst...@googlegroups.com
For our use case, the admin should have the option, but instead of disabling them altogether, it would be more useful to control the content: the notification should just say "you have 3 events", without details about grains and the actual notification content.

-- Alex


> On 22 Aug 2016, at 23:26, Jason Paryani <jpar...@sandstorm.io> wrote:
>
> There will definitely be options for individual users to disable email notifications. Is that sufficient, or do you also need to have the admin be able to do this? Would the admin disable email notifications globally or on a per-user basis?
>
> On Thu, Aug 18, 2016 at 2:42 AM, Alex Morega <al...@grep.ro> wrote:
> I have one security concern. We're running a private Sandstorm with SAML authentication that hosts sensitive information. What content would be sent via email? Will it be possible to disable the feature from admin?
>
> For my own use, ok, I'll wait for the official support :)
>
> -- Alex
>
> > On 17 Aug 2016, at 21:45, Jason Paryani <jpar...@sandstorm.io> wrote:
> >
> > So after talking with the team this morning, we've decided to prioritize email notifications in Sandstorm proper. If you're fine with waiting a week or two, there should be official support in Sandstorm itself.
> >
> > On Wed, Aug 17, 2016 at 8:23 AM, Alex Morega <al...@grep.ro> wrote:
> > That's beautifully simple. I'd like to do the same thing but deliver notifications by email.
> > -- Alex
> >
> > > On 16 Aug 2016, at 22:55, Jason Paryani <jpar...@sandstorm.io> wrote:
> > >
> > > Hey all,
> > >
> > > Since we're probably not going to have an official version of push notifications working on mobile for a while, I went ahead and hacked together a solution that works for me. It connects directly to a Sandstorm server using the ddp socket and a resume token you supply. It then listens to the `desktopNotifications` subscription to see notifications as they come in.
> > >
> > > It's currently hard coded to use the Pushover service to send out the notifications, but I'd be open to adding other integrations (or even adding email support until such time as Sandstorm adds it).
> > >
> > > This is all hacky and subject to breakage, so caveat emptor, blah blah.
> > >
> > > Code is up at https://github.com/jparyani/sandstorm-notification-pusher
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
> > > For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
signature.asc

Kenton Varda

unread,
Aug 22, 2016, 5:43:31 PM8/22/16
to Alex Morega, Jason Paryani, sandst...@googlegroups.com
Hi Alex,

What is it about e-mail that makes it risky in your eyes?
- Are you worried about MITM attacks at the SMTP level?
- Are you worried that users' phones will get stolen?
- Something else?

Trying to understand in order to decide what makes the most sense here.

-Kenton

On Mon, Aug 22, 2016 at 1:58 PM, Alex Morega <al...@grep.ro> wrote:
For our use case, the admin should have the option, but instead of disabling them altogether, it would be more useful to control the content: the notification should just say "you have 3 events", without details about grains and the actual notification content.

-- Alex


> On 22 Aug 2016, at 23:26, Jason Paryani <jpar...@sandstorm.io> wrote:
>
> There will definitely be options for individual users to disable email notifications. Is that sufficient, or do you also need to have the admin be able to do this? Would the admin disable email notifications globally or on a per-user basis?
>
> On Thu, Aug 18, 2016 at 2:42 AM, Alex Morega <al...@grep.ro> wrote:
> I have one security concern. We're running a private Sandstorm with SAML authentication that hosts sensitive information. What content would be sent via email? Will it be possible to disable the feature from admin?
>
> For my own use, ok, I'll wait for the official support :)
>
> -- Alex
>
> > On 17 Aug 2016, at 21:45, Jason Paryani <jpar...@sandstorm.io> wrote:
> >
> > So after talking with the team this morning, we've decided to prioritize email notifications in Sandstorm proper. If you're fine with waiting a week or two, there should be official support in Sandstorm itself.
> >
> > On Wed, Aug 17, 2016 at 8:23 AM, Alex Morega <al...@grep.ro> wrote:
> > That's beautifully simple. I'd like to do the same thing but deliver notifications by email.
> > -- Alex
> >
> > > On 16 Aug 2016, at 22:55, Jason Paryani <jpar...@sandstorm.io> wrote:
> > >
> > > Hey all,
> > >
> > > Since we're probably not going to have an official version of push notifications working on mobile for a while, I went ahead and hacked together a solution that works for me. It connects directly to a Sandstorm server using the ddp socket and a resume token you supply. It then listens to the `desktopNotifications` subscription to see notifications as they come in.
> > >
> > > It's currently hard coded to use the Pushover service to send out the notifications, but I'd be open to adding other integrations (or even adding email support until such time as Sandstorm adds it).
> > >
> > > This is all hacky and subject to breakage, so caveat emptor, blah blah.
> > >
> > > Code is up at https://github.com/jparyani/sandstorm-notification-pusher
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-dev+unsubscribe@googlegroups.com.

> > > For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-dev+unsubscribe@googlegroups.com.

> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-dev+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-dev+unsubscribe@googlegroups.com.

Alex Morega

unread,
Aug 22, 2016, 6:50:01 PM8/22/16
to sandst...@googlegroups.com, Kenton Varda, Jason Paryani
Thanks for taking an interest in this, guys :)

I'm worried about the MITM scenario, including the email provider. We're doing investigative journalism so, admittedly, our threat model is unusual :) Ideally the data should only touch the server and the user's computer.

An alternative solution for us would be to proxy outgoing emails and encrypt them, but that comes with a whole set of problems.

-- Alex
> > > > To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
> > > > For more options, visit https://groups.google.com/d/optout.
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
> > > For more options, visit https://groups.google.com/d/optout.
> > >
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
signature.asc

Kenton Varda

unread,
Aug 22, 2016, 6:57:35 PM8/22/16
to Alex Morega, sandst...@googlegroups.com, Jason Paryani
Hi Alex,

It seems to me that if you are concerned about e-mail MITM, then probably you don't want to deliver *any* email that Sandstorm sends today. Maybe you should un-configure SMTP altogether?

Alternatively, maybe you want to configure Sandstorm to talk to a localhost SMTP server that does one or more of:

a) Heavily filters messages.

b) Only delivers to a local IMAP server. You could then require your users to connect their mail clients directly to that server, so that there is no middleman e-mail provider.

c) PGP-encrypts messages.

Thoughts?

-Kenton

> > > > To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-dev+unsubscribe@googlegroups.com.

> > > > For more options, visit https://groups.google.com/d/optout.
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-dev+unsubscribe@googlegroups.com.

> > > For more options, visit https://groups.google.com/d/optout.
> > >
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-dev+unsubscribe@googlegroups.com.

> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-dev+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-dev+unsubscribe@googlegroups.com.

Alex Morega

unread,
Aug 22, 2016, 7:01:53 PM8/22/16
to Kenton Varda, sandst...@googlegroups.com, Jason Paryani
Hi Kenton,

Yep, we don't use sandstorm email much (we share grains by sending links manually), and maybe we should just disable it. We'd miss out on notifications but that's not a deal breaker :)

-- Alex
> > > > > To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
> > > > > For more options, visit https://groups.google.com/d/optout.
> > > >
> > > > --
> > > > You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> > > > To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
> > > > For more options, visit https://groups.google.com/d/optout.
> > > >
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
> > > For more options, visit https://groups.google.com/d/optout.
> > >
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
signature.asc

Stephan Heffner

unread,
Aug 25, 2016, 2:57:27 AM8/25/16
to Sandstorm Development, al...@grep.ro, jpar...@sandstorm.io
Hi Kenton,


On Tuesday, August 23, 2016 at 12:57:35 AM UTC+2, Kenton Varda wrote:
Hi Alex,

It seems to me that if you are concerned about e-mail MITM, then probably you don't want to deliver *any* email that Sandstorm sends today. Maybe you should un-configure SMTP altogether?

I tried to do that by just removing the configured server, user etc. There seems to be no option to deactivate it using the admin panel. Unfortunately, server, port and mail sender seems to be required fields. Configuring localhost wouldn't be the best solution as we would get a local mail delivered to *no one*.

Is there a configuration option to disable email at all?

Thanks
Stephan

Kenton Varda

unread,
Aug 25, 2016, 3:40:29 AM8/25/16
to Stephan Heffner, Sandstorm Development, Alex Morega, Jason Paryani
Hi Stephan,

Hmm, that sounds like a bug!


We'll try to have it fix in this weekend's release.

-Kenton

--
Reply all
Reply to author
Forward
0 new messages