Repository navigation
Follow the next Tenet release: readiness, pending restarts, upstream password, guide - #60
Open
medazizktata25 wants to merge 7 commits into
Open
medazizktata25 wants to merge 7 commits into
medazizktata25 wants to merge 7 commits into
Conversation
The next Tenet (guepard-tenet feature/performance-tuning) refuses writes on a masked connection by default and derives masked values with siphash instead of xxhash64, so every masked value changes for the same salt. Both were run against a local Postgres with the branch build and with main's: every sample proxy.yaml under scripts/ loads and masks reads on both, the UPDATE main allows is refused, and seed_derivation: xxhash64 reproduces main's hash. The CLI passes proxy.yaml through unchanged, so no code changes are needed.
The previous commit told readers to set block_writes: false to keep
writes working. Run on Nomad with the branch image, that alone lets a
client copy a masked column into an unmasked one ('reach me: ' ||
email) and read the real value back; strict_masking: true refuses the
copy. Also note that an email inside free text in a column without a
rule is not masked by the content scanner.
deploy --masked returned as soon as GET /deploy/{id} carried a
tenet_proxy_port. The API sends that port while the Tenet job runs
and the database behind it is still starting or failing, so the CLI
could report success before the database accepted a connection
(against a local stack it returned after 7s). Only masked_status
ready now ends the wait; the port alone counts only for an API that
sends no masked_status.
deploy --masked, tenet deploy and tenet proxy set take --upstream-password (env GUEPARD_TENET_UPSTREAM_PASSWORD) for Tenet's auth mode; the API refuses it inline in proxy.yaml and keeps it in the proxy's Nomad Variable. deploy sends it only with --masked, so the env var does not leak into other deploys. The API now answers tenet deploy/start/proxy set with 202 and status pending when the proxy is not running within ~20 s. Those calls used to accept only 200, so a 202 would have been reported as an error; they now succeed and say the proxy is still starting.
…y set The API now supplies Tenet's upstream password itself when auth.upstream.user is one of the deployment's database users, which it created and whose passwords it holds. The flag stays only on a standalone `tenet deploy`, whose upstream is not a Guepard deployment.
Tenet commands printed the whole error body, e.g. Status 400:
{"message":"Nomad error","status":400,"body":"..."}. They now print
the API's message, and for a Nomad failure the reason it carries,
as deploy errors already do.
Two changes customers will notice were missing from the list. The published Tenet matches rule columns literally, so a rule such as column: "*phone*" left that column in clear; the next release applies it. Measured on the published image: the real phone number came back under "*phone*" and was masked under column: phone. LIKE, regex, SIMILAR TO, BETWEEN and range filters on masked columns are now refused; the wording follows refuse_unsupported_predicates in guepard-tenet's config.rs.
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.
Follows the next Tenet release (guepard-tenet branch
feature/performance-tuning) and the public API changes that adopt it (Guepard-Corp/guepard-public-api#283).What changes
deploy --maskedwaits formasked_status: ready, not just a Tenet port, and stops with the API's reason when it reportsfailed.202(status: pending, proxy still starting) prints that instead of failing.tenet deploy --upstream-password(orGUEPARD_TENET_UPSTREAM_PASSWORD, whose value help never shows) sends Tenet's upstream password for a standalone deploy.deploy --maskedandtenet proxy settake none: the API supplies the password of the deployment user thatauth.upstream.usernames.Nomad: <body>for Nomad errors) instead of raw JSON.block_writes), and why allowing them needsstrict_masking: true;seed_derivation);LIKE/range filters on masked columns refused.How it was tested
cargo test: 59 pass. Run end to end against the API PR's Lambdas (sam local), real Nomad 2.1.1 and a local Supabase:authwith the password supplied by the API and with--upstream-password;tenet deployby the deployment's owner;The pattern-rule entry in the guide was measured on the published Tenet image: a
phonecolumn undercolumn: "*phone*"came back in clear, and the same rule written literally masked it.Not verified
deploy --maskedwith Tenetauthhas no password source.