Allow AUTH_COOKIE to access @private fields
Add @anoninternal support code
This is a slightly better approach to the previous commit.
server/email: handle errors out of GQL context
server/email: include variables
server: move auth middlware ahead of RealIP
So that @internal auth can correctly test against internal-ipnet.
Remove %e formatting verbs
%e is not valid for formatting error values:
> %e scientific notation, e.g. -1.234456e+78
Instead, use %w when using fmt.Errorf (for error wrapping) and
%v when using log.Printf (%w is not valid in that context).
auth: harden grants structure
This replaces the Access map with a data type whose default value does
not grant any permissions, so that it's more difficult to create an
insecure auth context by mistake.
server: add @private directive glue code
Enforce complexity limit on webhook payload
Configure server to manage mail queue
This also sets up the recovery function for webhooks, so we get emailed
when we panic during a webhook query.
server: add server reference to context
webhooks: initial prototype for GQL-native webhooks
Fix bug with internal authentication
Make authorization errors more specific
server: set max upload size to 1 GiB
Stash remote address in context
Add legacy webhooks worker implementation
Expand context for work queues