Securing Go web applications
stablelib.com
stablelib.com
I was just researching licenses for a similar business model (in a completely different field) and came to the conclusion, that it does not really work.
AGPL would somewhat work, but would still have the downside that commercial entities could use the software just for tooling and internal processes, which most software is used for anyway.
In my mind Open Source prevents commercial use of applications only if the software is very likely to be shipped to the client, for example Qt.
With libraries it might look different, because people just get used to them and want to use them everywhere.
I would be very interested to hear your input!
Would you use these options in Go or would you just set them at the reverse-proxy level?
It sounds like you are assuming that everyone "serious" already is or should be using Nginx. Also one shouldn't assume that you'll always be using a reverse-proxy. Even when you are using a reverse-proxy, in my opinion it's good to keep that layer as "dumb" as possible, minimizing application-specific details. For example, setting certain security HTTP headers correctly often requires a deeper understanding of an application than one should expect from the reverse-proxy layer.
Slightly off topic, but it reminds me of why I think web application firewalls are misused: they try to plug security holes that should be treated as application bugs.
As for sessions, please do not use OpenResty's encrypted-session-nginx-module; check its issue tracker for examples of how not to do crypto: https://github.com/openresty/encrypted-session-nginx-module/...
Any naked Go server is usually vulnerable to DNS rebinding because it doesn't test the Host header.
Edit: see also: http://0xdabbad00.com/2015/04/12/looking_for_security_troubl...
I should add it to the post, thanks.