aboutsummaryrefslogtreecommitdiffstats
path: root/docs/research/046-optional-async-document-http.md
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-04 12:46:34 +0100
committereunhhu <[email protected]>2026-10-04 12:46:34 +0100
commit9fd2e16b68e1a83e2605e8a9cbd9b6d04a4da2f6 (patch)
tree2ae9aaf2cc5f3e5d4eef0209d013ac8332c02984 /docs/research/046-optional-async-document-http.md
parent1ff4fd3b1ae2b2ada273d7ffaee8501c9d43d5c0 (diff)
downloadpure-9fd2e16b68e1a83e2605e8a9cbd9b6d04a4da2f6.tar.gz
pure-9fd2e16b68e1a83e2605e8a9cbd9b6d04a4da2f6.zip
Take an app's requests only with a token its tokens file grants (017, 3b)
An app given a tokens file (tokens=FILE in --apps, --tokens FILE for the one app of a host) answers a request only when it bears a token (Authorization: Bearer) whose SHA-256 the file lists with a grant: read for its views, queries and documents, write for all, input=NAME for those inputs alone; 401 unauthorized (WWW-Authenticate: Bearer) without one, 403 forbidden past its grant. A delivery sealed by a key --sender names needs none. The digests are compared in constant time; a connection keeps its last token's digest, so the same token is hashed once. SHA-256 is the host's own (serve/sha256.c), no OpenSSL loaded. A reading puts a changed tokens file in place with the app running on; a file that is not one stops the app. pure-serve --make-token GRANT makes a token and its line. load takes PURE_LOAD_TOKEN.
Diffstat (limited to 'docs/research/046-optional-async-document-http.md')
0 files changed, 0 insertions, 0 deletions