Repository navigation
Conversation
… tokens
`typetorch settings secrets` (status / set / unset / inline off) writes the signed record's
`secrets` map ({ [path] = secret name }) for backend.key (and its copies fleet.token and a DuckDB
analytics.token), analytics.token and analytics.identityToken. Inline values stay until
`inline off`, which checks the Secrets Store list (universe.secret:read, metadata only) for every
named secret and its domain first; later backend setup writes keep them out
(--inline-secrets writes them again). backend.key may be missing when a secret names it.
doctor warns about inline tokens and checks the named secrets. The CLI never creates secrets
(Open Cloud needs a libsodium sealed box; no crypto library ships): it prints Creator Hub steps.
The signature scheme is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…secret-only key it can't check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Dec 5, 2026
Open
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.
This PR adds
typetorch settings secrets, which moves the settings record's tokens into the experience's Roblox Secrets Store. The record then only names each secret, still signed withtt1settingsas before, so a leaked Open Cloud key with datastore read no longer gets the backend key. Companion PRs: kernel and framework, both on branchfeat/secrets-store.CLI changes
settings.ts:SettingsBody.secrets,SECRET_PATHS,secretsProblems,inlineDropped,withoutInlineandcopiesOfBackendKey.backend.keymay be missing only whilesecrets["backend.key"]names a secret.withBackend(backend setup): the map follows the key's copies, and values dropped byinline offstay dropped. A Basin sink's own token is never mapped to the backend secret. A newbackend setup --inline-secretsflag writes the values inline again.describeFieldsshows where the key lives.maskSecretskeeps secret names visible.secretstore.ts:listSecrets: the Open Cloud List Secrets endpoint (metadata only; only id and domain are kept), with pages.domainCovers,storeProblems,suggestDomain.creatorHubSteps, which never prints a value.commands/secrets.ts(typetorch settings secrets ...):status: the map, the inline copies left, and the store check.set <path> <name>: names a secret and prints the Creator Hub steps plus a 401 hint.backend.keyalso names its equal-valued copies,fleet.tokenand a DuckDBanalytics.token.unset <path>: refused while no inline value is left.inline off [--force]: refused unless every named secret is in the store with a domain that covers its hosts.--forceskips the check when the deploy key lacksuniverse.secret:read.doctor:TYPETORCH_API_KEY, or skipped as info without it.Design (same in all three PRs)
The settings record (
TypeTorch/settings) gets one optional, signed field:tt1settings) is unchanged.HttpService:GetSecret(name)in a pcall. It is cached for 10 min, and a miss for 60 s.Authorization = secret:AddPrefix("Bearer ").fleet.tokenand a DuckDBanalytics.tokenare copies ofbackend.keythat the CLI writes itself. The CLI names the same secret for them only when the values are equal.backend.key,fleet.token,analytics.tokenandanalytics.identityTokenin kernel and framework is aAuthorization: Bearerheader, so all four can move. The notify HMAC keys (backend.notify.keys) feedhmacSha256in Luau (frameworknotifications/token.ts), so they stay inline in the record. They are the one remaining DataStore-readable secret, with a narrow use: forging notification launch data.secretsand keep using the inline values, which stay until the owner runssettings secrets inline off.secretsmap or name is dropped on its own, never the whole record. Old kernels accept the record, so refusing it on new ones would blank settings fleet-wide.Rollout order
typetorch kernel deploypublishes the place) and the framework (FRAMEWORK_VERSION bump, then a deploy of every branch). Order between the two doesn't matter.backendProblemsrequiresbackend.key), and an oldbackend setupwould write the key inline again.typetorch_backend_key.backend.ingestis set, it must also cover the ingest host: a shared*.parent, or*.universe.secret:readto the deploy key so the CLI can check the store.typetorch settings secrets set backend.key typetorch_backend_key. This writes the map and keeps the inline values. Within a minute,typetorch doctorshould show live servers.typetorch settings secrets inline offonly when ALL of these hold.TypeTorchBackup, BootstrapHeads, pins and dev branches. The framework hot-swaps, so an older payload reached by a rollback would have no analytics or notify auth.inline offrefuses unless every named secret is listed in the store with a domain that covers its hosts.--forceskips that check when the deploy key can't list secrets.typetorch backend setup --inline-secretswrites the key inline again, thentypetorch settings secrets unset backend.key.Roblox API: verified vs assumed
Verified from the docs (create.roblox.com: Secrets stores, HttpService.GetSecret, Secret, the Open Cloud universes reference and the secrets-store guide) and the
@rbxts/typesdeclarations:HttpService:GetSecret(key): Secretis server-only. Printing a Secret givesSecret(name).AddPrefixandAddSuffix. It can go in the URL and headers, never the body.@rbxts/types1.0.956:RequestAsyncRequest.Url: string | SecretandHttpHeaders = Record<string, string | Secret>._, 1-64 characters, not starting with a digit.*.domainor*. An empty domain means the secret can't be used in a header or URL at all.GET /cloud/v2/universes/{id}/secrets(Beta, scopeuniverse.secret:read) lists metadata (id, domain, times), never content.universe.secret:write) need the value in a libsodium sealed box under the universe's public key. Node's crypto has no XSalsa20-Poly1305 and the CLI ships no crypto library, so the CLI never creates secrets and prints the Creator Hub steps instead.Assumed or unverified (no live
GetSecretorRequestAsynccall was made; nothing touched Creator Hub or Open Cloud):RequestAsyncdoes when a Secret's domain doesn't match the URL. It is assumed to error like a refused request.*.example.comalso coversexample.com. Doctor assumes it does not.AddPrefix("Bearer ")counts toward the 1024-character limit.GetSecretyields.universe.secret:read. The docs list the scope for API keys and OAuth.KERNEL_VERSION (0.5.9), FRAMEWORK_VERSION (0.7.5) and the CLI version (0.19.0) are not bumped. In the gate above, "the new kernel/framework" means the first releases that contain these PRs. CHANGELOG.md (gitignored) was not updated, because it lives in the main checkouts.
Merges with the audit PRs
fix/audit-2026-12-05(Security fixes from the 2026-12-05 audit #48): conflicts insrc/commands/doctor.ts, in two places, both trivial:../settings.tsimport line (both sides add names);backendChecks(...)call, where Security fixes from the 2026-12-05 audit #48 addstrustedand this PR adds thesecretsCheckscall after it.fix/audit-2026-12-05-correctness(Correctness fixes from the 2026-12-05 audit #49): merges cleanly.Tests
tsc --noEmit: clean.bun test: 924 pass, 4 skip, 0 fail. The newtest/secrets.test.tshas 16 tests:withBackendkeeps dropped values out and follows copies;--inline-secretswrites them again; a Basin token is unmapped;describeFields;set,inline offrefusals and success,unset,status);🤖 Generated with Claude Code