Repository navigation
Conversation
A node makes a secret with ctx.secret and reveals one with ctx.reveal, ctx.reveal_in or ctx.reveal_input. What flows on wires, and what the run's record and everything that reads it holds, is a marker naming the secret; the value is sealed beside the record (table run_secret, written with the run's own batches) and deleted with it. A caller's credential headers (authorization, proxy-authorization, cookie, weft-instance-token, and the headers the route's auth gate reads, a gated socket's ticket included) are made secrets at the door and come out on the new `credentials` output of Route and Socket, never on `headers`. The old scrubbing of the record (Redaction) is gone. The type checker keeps a secret out of plain ports, Json and JsonDict; a program cannot write, cast or instance-fill one. HttpRequest (headers and a body whose declared type says where the secret is), Reply, Stream and ExecPython reveal a secret where their input's declared type places it, and fail naming the input and the place when a secret sits where no type declares one (a Stream's bus message included). MintInstanceToken's token is a Secret[String]. `weft run --fire` refuses credential headers and the headers a route's gate reads.
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A node makes a secret with
ctx.secretand reveals one withctx.reveal,ctx.reveal_inorctx.reveal_input. What flows on wires, and what a run's record and everything that reads it holds, is a marker naming the secret. The value is sealed beside the record (new tablerun_secret, written with the run's own batches) and deleted with it.What breaks (the CHANGELOG says how to move):
authorization,proxy-authorization,cookie,weft-instance-token, and the headers a route'sauthreads) come out ofRouteandSocketon the newcredentialsoutput, as secrets, never onheaders.weft run --firerefuses credential headers and the headers the route's gate reads.HttpRequestbody and headers,Reply,Stream,ExecPythoninputs, any node revealing through the ctx), naming the input and where the secret is.MintInstanceToken'stokenis aSecret[String].Also: the type checker keeps a secret out of plain ports,
JsonandJsonDict; a program cannot write, cast or instance-fill one.HttpRequest'sbodytakes its type from what is wired into it, so a declared object can carry a secret; a plain body builds and runs as before. The old text scrubbing of records (Redaction) is gone. The reveal call to the broker is marked harmless to send twice (a read).Extension:
extension-vscode0.2.282 (packages/weft-graphknows the new type).Run locally before pushing: full nextest, doc tests, workspace clippy
-D warnings, the parse-only build, hakari, validate-examples, every database test, every JS package test and compile, the bridge, postgres credential and Kilo tests, the browser extension checks, the docs build, Terraform validate and its moved-targets test. All green.