<mrdomino>
yeah it looks like it might be an easy-ish port
<mrdomino>
and then all they need is caldav support...
bemasc has quit [Ping timeout: 244 seconds]
<mrdomino>
i'd love to offer appointment slots via sandstorm instead of my current hokey google calendar solution
<dwrensha>
what's missing in caldav support?
<dwrensha>
I though Radicale worked fine
mnutt has quit [Ping timeout: 276 seconds]
<mrdomino>
dwrensha: i meant easyappointments needs caldav
<mrdomino>
afaict they only do google calendar sync
<mrdomino>
though this is after a very cursory search (i grepped for dav)
<dwrensha>
oh i see
frigginglorious has joined #sandstorm
Telesight has joined #sandstorm
bemasc has joined #sandstorm
<mrdomino>
asheesh: quick sandstorm-for-work question. can feature keys be moved from one instance to another, assuming they're not ever active on two instances at once?
<mrdomino>
(or anyone else who knows but i figured it might be an asheesh question)
<asheesh>
mrdomino: Yes totally works A-OK like that
<mrdomino>
rad
<asheesh>
(There's not any phone-home logic so it's "only" a ToS violation to move them)
<asheesh>
I can add a note to the for-work docs on that, why not, one sec
<asheesh>
I mean "only" a ToS violation if the key is on multiple machines!
<asheesh>
Moving is not a violation of anything!
<mrdomino>
(i just recently set up an on-site instance on a physical box.)
<asheesh>
Ooh
<mrdomino>
i suppose i might at some point set up our network's DNS to point to a dnsmasq exposing sandstorm via local IP, to make it actually work when the internet is down...
<beelzabub>
I had a question about the implementation of the cap'n'proto RPC mechanism. Is there any documentation?
<asheesh>
Hi beelzabub
<beelzabub>
My understanding of the pipeline mechanism is that the client establishes a pipeline request that the server keeps alive until the client tells it to discard. Seems like it's a security hole whereby the client can easily request the server to use up all available memory. I'm sure I'm missing something though
<zarvox>
beelzabub: take a look at "Is it safe to use Cap'n Proto RPC with a malicious peer?" in https://capnproto.org/faq.html
<zarvox>
(to wit: "At this time, the RPC layer is not robust against resource exhaustion attacks, possibly allowing denials of service.")
<asheesh>
Ah hah, cheers
<beelzabub>
Thanks for the FAQ pointer. I had read it before & completely forgot about it. I'm not sure about the "at this time" wording. Is there some theoretical way to address that without completely breaking pipelining?
<beelzabub>
Seems like the resource exhaustion attack would always be possible
<beelzabub>
Because the server can't let go of any promised responses the client could theoretically reference in the future...
<zarvox>
kentonv would be the right person to answer your question, but he's on vacation this week
<TC01>
I'm working on a small sandstorm application. Do I need to do something special in terms of permissions in order to allow a user to upload a file to it (e.g. http POST)?
<TC01>
that step seems to fail when I run inside of sandstorm but succeed when not done in sandstorm, so I'm suspicious
<dwrensha>
beelzabub: seems like it should be possible to protect against such attacks
admine_ has quit [Ping timeout: 258 seconds]
<dwrensha>
maybe we could allow an RPC server to specify a limit on the number of entries in its answer table
<dwrensha>
if the client tries to send more than that number of requests without sending Finish messages, the server could return an exception
<dwrensha>
forcing the client to send Finishes if it wants to make more Calls
<asheesh>
TC01: I wonder if you're running into an issue where CSRF headers are being dropped by Sandstorm.
<asheesh>
If so, the simplest answer is to disable the CSRF protection, since the per-session subdomain can do some CSRF protection.
<asheesh>
Having said that,
<asheesh>
we can add CSRF headers that you need to the Sandstorm whitelist, if that does end up being what you're running into.
<TC01>
asheesh: oh, possibly. let me see what happens when I turn that off :)
<asheesh>
Great!
<TC01>
hm... I'm actually not sure that's the problem; this is not currently sophisticated enough to implement CSRF protection (I think, although I could be wrong). I basically just have a minimally modified version of this flask example http://flask.pocoo.org/docs/0.11/patterns/fileuploads/ right now
<zarvox>
oh, could be that your upload folder isn't writeable
<asheesh>
Yeah, I have no idea what the home dir is. I guess the homedir is /var so it maybe ought to work.
<zarvox>
Looks like you'd need ~/.local/share/legendsbrowser-flask to exist and be writeable.
<TC01>
yeah; I had to manually set /var as HOME in sandstorm configuration in order to make things work
<asheesh>
I wonder if the redirect is what's failing instead.
<asheesh>
Also, wow, this is really cool.
<zarvox>
are you explicitly creating those other folders in launcher.sh or something like that?
<zarvox>
if not, they don't exist, and when you try to upload, flask will probably try to write a file in a folder that doesn't exist and get an error instead
<TC01>
zarvox: I am, yeah (and also the python script tries to make them when first ran if they're not there), so I don't think that should be the issue
<TC01>
asheesh: ...ah. that sounds like it might be the culprit then
<asheesh>
I'm curious if you can use the debugging feature to call the relevant Python code from inside a grain, and see if there's an exception.
<zarvox>
oh hmmmm that sounds plausible
<TC01>
oh neat, I didn't know about enter-grain (I've been vagrant-spk sshing in to look at the sandbox)
<zarvox>
line 105 seems to be "return redirect(lburl)" where lburl is by default http://127.0.0.1:58881 (which would be a different origin)
<TC01>
zarvox: in theory, this is meant to run behind a reverse proxy to rewrite that (I think this is doable, anyway...), but I would think the file would actually get uploaded first if that were the issue
<TC01>
it does not seem to, though
<TC01>
maybe I'm wrong about the order things would execute in, though?
<asheesh>
No I think you're spot-on about that.
<zarvox>
is the reverse-proxy inside the grain, or outside of Sandstorm?
<asheesh>
I share zarvox's concern the directory hasn't been mkdir'd.
<asheesh>
AFK a little but will read scrollback in half an hour or so.
<TC01>
inside the grain; my launcher.sh spawns the flask application in the background and then runs apache
<TC01>
so, I just tried having launcher.sh not spawn the flask code and only the reverse proxy, and then vagrant-spk enter-grain and run the flask script manually. it does not seem to cause a crash, just outputting "127.0.0.1 - - [26/Jul/2016 20:06:05] "POST / HTTP/1.1" 500 -" (after a subsequent GET 200)
<TC01>
but, at least this way will let me debug a bit more
<asheesh>
Error 500 sounds like your grain log should tell you more!
<TC01>
interesting... I upgraded flask (the Fedora package was only 0.10) and reconstituted the vm. Now I get a traceback when trying to access request.files with the helpful message "IOError: [Errno 28] No space left on device"
<TC01>
the grain log just has this to say:
<TC01>
AH00557: httpd: apr_sockaddr_info_get() failed for sandbox
<TC01>
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
<asheesh>
Used up all space in /tmp maybe
<asheesh>
This is because /tmp is a small tmpfs.
<asheesh>
You can use /var/tmp as a different temp dir.
<asheesh>
I guess I should fix vagrant-spk to use TMPDIR=/var/tmp and then clean it up on grain launch.
<asheesh>
Related, we could show an alert to the grain owner if the grain is in dev mode and /tmp is full.
isd has joined #sandstorm
<TC01>
aha!
<TC01>
it works, or rather, fails differently now
Telesight has quit [Quit: Leaving.]
<TC01>
hm. now Java is failing to run properly in my grain ("/usr/lib/jvm/jre/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory")
<TC01>
This may be a consequence of me using Fedora as the basis for my grain instead of Debian? I know Fedora uses alternatives to load Java (I'm not sure how Debian does it)
<asheesh>
I want to get around to writing a Java vagrant-spk platform stack that embeds all this knowledge but I haven't yet, but the info is all there at least.
<asheesh>
TC01: ^ thanks for being patient!
isd has quit [Quit: Leaving.]
bemasc has quit [Ping timeout: 264 seconds]
isd has joined #sandstorm
bemasc has joined #sandstorm
bemasc has quit [Ping timeout: 240 seconds]
bemasc has joined #sandstorm
bemasc has quit [Ping timeout: 240 seconds]
bemasc has joined #sandstorm
<TC01>
asheesh: thanks! that makes it work :)
<TC01>
I need to fix the reverse proxy, which I will do tomorrow (not everything is getting proxied correctly), but the whole thing sort of works!
admine_ has joined #sandstorm
beelzabub has joined #sandstorm
frigginglorious has quit [Quit: frigginglorious]
bemasc has quit [Ping timeout: 265 seconds]
jemc has quit [Ping timeout: 250 seconds]
jemc has joined #sandstorm
bemasc has joined #sandstorm
ocdtrekkie has joined #sandstorm
<ocdtrekkie>
jparyani: I'm going to PR the TTRSS mobile app settings page probably soon. I worked with a Windows dev to get his UWP app working with Sandstorm's TTRSS on both mobile and desktop. (His desktop app is vastly nicer to use than the TTRSS web interface.) And based on the troubleshooting I did with that, I'm hoping to figure out why the Android app from F-Droid wasn't working, and if it's possible to make it work as well.
<jparyani>
ocdtrekkie: awesome!
lukexj has quit [Ping timeout: 240 seconds]
lukexj has joined #sandstorm
bemasc has quit [Ping timeout: 250 seconds]
<ocdtrekkie>
Dealing with how much I hate my Android to test the Android apps.
<ocdtrekkie>
I decided now that I am not using it anymore, I will give up trying to prevent it from updating to worse versions of Android, because I'm sick of having to put it in airplane mode while I kill the system update process on it.