Repository navigation
Bind credentials to approved contexts and add secure provisioning - #1453
Open
ChristianPavilonis wants to merge 6 commits into
Open
ChristianPavilonis wants to merge 6 commits into
ChristianPavilonis wants to merge 6 commits into
Conversation
ChristianPavilonis
marked this pull request as ready for review
October 27, 2026 19:46
Document the selected design for issue #1037 using raw native secret values and purpose/identity/destination-derived lookup keys. Include the independent comparison's required normalization, CLI/native lookup, private-construction, retirement, and send-policy amendments. This is a design-only change; implementation and runtime proof remain.
Require explicit Spin manifest paths before secret planning and checks so native declaration validation and plan fingerprints use the selected manifest. Let Cargo check default fixture-generator freshness while preserving explicit executable overrides. Add CLI and shell regressions for both fixes.
10 of 11 tasks
ChristianPavilonis
force-pushed
the
feature/1037-secret-bindings
branch
from
October 27, 2026 20:14
c131cc7 to
67c5bee
Compare
| vector(&mut payload, export)?; | ||
| let digest = Sha256::digest(payload); | ||
| const ALPHABET: &[u8] = b"abcdefghijklmnopqrstuvwxyz234567"; | ||
| let mut encoded = String::from("ts1_"); |
| } | ||
| let (authority, path) = rest | ||
| .find('/') | ||
| .map_or((rest, "/"), |index| (&rest[..index], &rest[index..])); |
| let datadome_config = | ||
| serde_json::from_value::<crate::integrations::datadome::DataDomeConfig>(raw.clone()) | ||
| .map_err(|_| invalid("integrations.datadome", "invalid integration structure"))?; | ||
| let enabled = bool_value(raw, "enabled", false, "integrations.datadome.enabled")?; |
| let protection = bool_value( | ||
| raw, | ||
| "enable_protection", | ||
| false, |
| Some(value) if value.is_object() => bool_value( | ||
| value, | ||
| "enabled", | ||
| false, |
This branch has not been deployed
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.
Summary
ts secrets plan/check/setworkflows using existing deployment manifests and mappings. Secure direct writes support Fastly; all four adapters support generated native identities and provisioning instructions.A config-store writer can recompute the envelope checksum. Authorization therefore comes from the provisioned native lookup identity, not that checksum. Changing a credential's purpose or approved destination selects another key. Complete already-provisioned identities remain selectable, and retaining old bindings retains their authorization.
Breaking change: reprovision secrets before upgrading
After this merges, existing deployments must reprovision all required app secrets under the new generated bindings before deploying the new version. Legacy secret names will not work. Existing raw credential values can be reused; reprovisioning does not itself require rotation.
ts secrets plan, then securely provision every required binding.See the full migration guide.
Changes
crates/trusted-server-core/src/secret_bindings*.rsconfig_payload.rs,settings*.rs,config.rstinybird.rscrates/trusted-server-cli/src/commands/secrets/docs/guide/{secrets,secrets-ci,secret-binding-migration}.md, existing guides/examplesCompatibility and dependency
ec.partners[*].api_token_enabled = falseand S3auth.session_token_enabled = false. Enabled missing credentials fail loading.4f645b1e705d295117c93f4c74db12e5692ffb34, companion draft Support implicit credential lookup plans and shared Fastly secret operations edgezero#444. No local path patch or released-prerequisite claim.Related issue
Refs #1037. The issue must stay open until the native security and migration gates below pass. Related design draft: #1407.
Test plan
Local runtime versions include Spin 4.1.0 and Wrangler 4.83.0/workerd. Cloudflare used worker-build 0.8.5 matching the lock, with the actual default-feature bundle. Spin warns that 4.x is outside EdgeZero's previously verified SQLite-writer range; this exact local push/read-through passed, not a general version-range certification. Local smokes exercise native lookup and ordinary HTTP forwarding, not credential-bearing HTTPS security.
Validation limits: an extra combined CLI/core/integration test invocation unified both Rustls providers and four unchanged CLI crypto tests panicked. The isolated CLI gate passed. Extra strict Rustdoc
-D warningsfails on untouched private/broken intra-doc links; normal Rustdoc succeeds with those warnings. Neither extra command is claimed green. No TLS-provider or unrelated documentation cleanup was added.Independent correctness/security, architecture, maintainability, and style reviews completed. All nine findings were addressed, followed by a correction review with no new findings. The native smokes also caught missing startup diagnostics; native stderr/console now receives only the outer error context, never the report's causes or attachments. Anonymous error responses remain generic.
Release blockers
No real application credential was read or provisioned. No production operation, merge, or release tag was performed. Fictional local fixtures and fake provider transports do not clear these gates.
Checklist