~bigbes/core-go

ref: 71b27871dc308a586f286d1454acb0fafea91a90 core-go/auth/middleware.go -rw-r--r-- 18.3 KiB
48250772 — Simon Ser 4 years ago
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).
3c6ab9bd — Drew DeVault 4 years ago
auth: improve error response format

This maps more closely onto what normal GQL errors look like.
ae61e243 — Drew DeVault 4 years ago
auth: force webhooks to read-only
2d9a547c — Drew DeVault 4 years ago
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.
07f694d2 — Drew DeVault 4 years ago
webhooks: expand auth configuration

The purpose of this change is to enable internal webhooks to be
configured in GQL webhook tables. A webhook subscription now includes
the auth method field which is appropriate, which is limited to either
OAUTH2 or INTERNAL. In the former case, the previous set of fields will
be valid, and in the latter case, the NodeID field will be valid. This
will allow us to register webhook subscriptions for internal use.
4f926ddc — Drew DeVault 4 years ago
auth: fix /query/api-meta.json route

This route does not need authentication.
8bd6005b — Drew DeVault 5 years ago
webhooks: initial prototype for GQL-native webhooks
1d24fef3 — Drew DeVault 5 years ago
auth: s/OAuth2Token/BearerToken/g

This also makes some tweaks to the organization of the crypto module to
make it easier for us to add more keys in the future, which will be
necessary for the internal token redesign.
39cd24bd — Drew DeVault 5 years ago
auth: allow /query/metrics w/o authentication
b5e0030f — Drew DeVault 5 years ago
auth: fix user type on database insert
8d15b7e1 — Drew DeVault 5 years ago
auth: authenticate all requests under /query
f9731e15 — Drew DeVault 5 years ago
Various bug fixes per pages.sr.ht
900693b8 — Drew DeVault 5 years ago
crypto: harden API surface

Make it explicit that expiration is not being tested with Decrypt, and
test that the expiration is meaningful with DecryptWithExpiration.
31fc9fce — Drew DeVault 5 years ago
Fetch user PGP key for meta.sr.ht
e1acd5a8 — Drew DeVault 5 years ago
Correct TODO for context which is invariant
a30dcb39 — Drew DeVault 5 years ago
Prohibit OAuth client auth for revoked clients
bdd0eb3d — Thorben Günther 5 years ago
Print IP with "invalid source IP" authError
af2afebd — Drew DeVault 5 years ago
Add legacy webhooks worker implementation
dc469471 — Drew DeVault 5 years ago
Add test for internal auth
bfc744fc — Drew DeVault 5 years ago
Add basic auth tests
Next