Repository navigation
Description
Replaces #19. This began as a placeholder while #19 was hidden (Amm0Bot suspension, 2026-11-08). #19 is visible again and closed in favor of this issue (2026-11-10). Its open questions are under "Carried from #19". These are notes, not a spec.
centrs inside T3: credentials, config seeds and access to the host router. Menu entry: Roadmap #30.
Current plan (2026-11-26)
Research PR #73 merged. Centrs PR #674 closed #666 and #672 and ships in @tikoci/centrs@0.2.0-next.31. Implementation draft #74 uses the existing Dockerfile next argument. The amd64 image smoke ran with Centrs 0.2.0-next.31.
- CDB unlock. Set
CENTRS_CDB_PASSWORD_FILEto the mounted/run/secretspath in the YAML and image defaults. The value stays in the file. A missing file is tolerated when an open CDB needs no key, and an encrypted load fails withcdb/password-unavailable. An operation with no CDB has no warning. RouterOS users who can read the backing app files can still read the mounted secret. - Router credentials.
CENTRS_PASSWORD_FILEapplies to the invocation and outranks records, so leave it unset in the image. Import a T3 secret-card file into a record withdevices add|set --password-stdin; the agent or T3 owns cleanup. A bareCENTRS_HOSTdoes not select a target. Agent context: tell agents where they run (environment note, user AGENTS.md, live inventory) #71 should tell agents which positional target to pass once it has been verified. - Scope of
__default__. A Linux smoke test of the published CLI used an encrypted scratch CDB and a loopback REST fixture with dummy credentials. The real process key-file setting survived a conflicting project.env, a per-call--password-filetook precedence, and an unregistered target received the__default__password. The earlier proposal to seed operator credentials there would make them global. Keep the emptyadminseed opt-in for quickchr labs. Draft Seed an encrypted Centrs host address book on RouterOS #74 seeds the host address, then operators import real router passwords into that host record usingcentrs devices set --password-stdin. RouterOS account permissions define access. Keep the CDB encryption key separate from the account password.
First implementation draft
- Fresh RouterOS
/app: havet3app initcreate the encrypted CDB and seed the host from[networkRouterIP]. Seed only app-owned state, make startup safe to retry after partial initialization, and preserve pre-existing CDBs. Standalone Docker/Podman should start without a host record when the router and secret are absent. - Before marking ready, check a disposable CHR with the built image and a signed-in T3 agent. Read the host from a project directory, verify an unrelated target does not inherit a real host password, then exercise restart,
/app/update, and an existing CDB. Check a missing or changed key and document recovery without recreating the CDB. Document how existing installs adopt the new YAML with backups, since applying YAML in place can wipe volumes. - Provider env inheritance, T3 secret-card restart behavior and MCP are follow-ups. The draft's bootstrap uses the image's file-path default. The signed-in check validates that the real agent can use it. For Agent context: tell agents where they run (environment note, user AGENTS.md, live inventory) #71, the README records how to name the positional host and switch off the file key for a direct Centrs invocation using an existing value-based key. The broader RouterOS secret-exposure report can proceed independently.
Initial research questions
-
Who owns what: centrs owns target resolution, the CDB and authorization. app-t3code owns the deployment-specific handoff: env vars,
/container/shell, T3 secret entry. A T3 secret card is a way to enter a secret; it is not where the secret is stored. -
Three recipes, each tested on its own: env var input, temporary secret delivery (T3 secret → file), and persistent CDB access. A skill can pick between them only after each one works. A small
t3apphelper (t3app: app-owned command, settings and source layout #45) may make them reliable, without reimplementing centrs. -
The project tracks intent, inventory references, observations and evidence, including planned and retired devices. Credentials don't belong in tracked project content.
-
MCP Apps are a possible centrs-owned presentation path (flagged on #29).
-
Feeds the workspace templates item in Roadmap #30 (Later).
-
Carried from centrs inside T3: credentials, config seeds, reaching the host router #19 (open questions):
- Config seeds: should the
/appYAML carry non-secretCENTRS_*defaults, such as a CDB path in/data? Any key added follows the YAML ↔ DockerfileENVrule. - The host router: is there a zero-config way for centrs to reach the RouterOS it runs on (gateway address, a dedicated API user)? What is the least privilege it needs?
- Where a delivered secret lands: is
/tmpa tmpfs in a RouterOS container? Check before a recipe writes a secret file there. - Output: skills that describe the safe credential path (Skills track #46), and centrs issues for anything worked around here.
- Config seeds: should the
Evidence
- Secret research: traces private storage, expiry and CLI delivery. The handoff to centrs is untested.
Activity
[-]centrs inside T3: credentials, config, host router — placeholder for #19[/-][+]centrs inside T3: credentials, config, host router[/+]mobileskyfi commentedon Nov 25, 2026
Triage 2026-11-25: this moves to Now, paired with #71 (agent context). The two meet at one question: what an agent in the container knows about the router it runs on, and how it reaches it.
Since this issue was written:
@tikoci/centrs@nextin/opt/bun/bin), and since0.1.11-app.218therouteros-tikoci-centrsskill is imported by default throughT3APP_SKILLS(tikoci/routeros-skills). Agents already know how to use centrs; what's missing is which target and which credentials, and that is Agent context: tell agents where they run (environment note, user AGENTS.md, live inventory) #71's host facts..envfrom the working directory, so in a T3 project an agent'scentrspicks upCENTRS_*(includingCENTRS_INSECUREandCENTRS_CDB_FILE) from whatever repo it has open. Any recipe here must account for it until centrs fixes it.Suggested order of first probes (each one a recorded result, on a CHR twin, never bigdude without asking):
/ip/serviceaddress=restrictions apply?/data(an env seed such asCENTRS_CDB_FILE, which follows the YAML ↔ DockerfileENVrule) or a T3 secret delivered to a file (is/tmpa tmpfs?).host) the agent can use withcentrs retrieve host /system/resource.The centrs-side design remains centrs's; anything worked around here goes to #29 first.
mobileskyfi commentedon Nov 25, 2026
Framing for the research (owner discussion, 2026-11-25). There are several ways to get settings and credentials to centrs, we don't yet understand each one well, and our T3 research is dated:
t3code-integrationis grounded on T3 v0.1.6, andt3code-presentation/secrets.mdon v0.1.7. The image ships 0.1.11 and 0.1.12 is out. So the first step is to rebuild the base understanding, not to pick a recipe.The paths (owner's list):
CENTRS_*. This is the owner's strawman for a starting point. centrs already reads them (precedencecentrs.env→ CDB comment-kv →CENTRS_*env → flag, reported inmeta.settings), so it needs no code here./containeror/apphave one, or only env?), and the Docker/Podman/Proxmox equivalents (Running outside RouterOS: Docker/Podman/Proxmox docs, and a durable LAN test host #72)..envfiles in a project. Today this is an accident, not a design: centrs#666./data(CENTRS_CDB_FILE, optionallyCENTRS_CDB_PASSWORD).mcp=ro|rw).For each path, what to establish:
/container print//appexport,/container/log,ps//proc/*/environfor every process including agents, T3's stored state, backups, git./app/update,/app/set environment=(replaces the whole list and splits on commas), image replacement, rotation, removal.ENVdefaults (a test enforces it), which can't hold secrets. The same setting can arrive by several paths, and centrs's precedence decides which wins.Proposed shape: a research topic,
docs/research/2026-11-centrs-credentials/(or2026-12-…if it starts next month). Its first section is a refresh of the T3 side at the current upstream tag (secret prompt, env handling, MCP, preview tunnel), reading v0.1.12 source so the research isn't dated again by the bump in #68. Then one row per path, each grounded by a probe on a twin. Recipes and the #71 note follow from that matrix; they don't come before it. Whatever centrs should do differently gets filed in centrs.mobileskyfi commentedon Nov 25, 2026
First research pass is in draft PR #73 (
docs/research/2026-11-centrs-credentials/), from a CHR 7.25.2 lab plus T3 v0.1.12 and centrs source.[networkRouterIP]is the container's gateway, and the router answers there (REST/API/SSH). On a default quickchr CHR,adminwith no password works, soCENTRS_HOST=[networkRouterIP]is the "just works" case. Placeholders also expand in an operator'senvironment=value./appsecrets are generated, can be set by the operator (/app/set secrets="name:value", volume kept) and are stable across restart, update and reboot. They are not hidden fromreadusers withoutsensitive: the/containerenv copy, plain/exportand the backing/fileall show the value. Thesensitivepolicy holds only for/app's own field.op://) is inherited by the agent's commands per the v0.1.12 source; runtime check pending.mobileskyfi commentedon Nov 25, 2026
Second pass (PR #73), with the real image on a CHR, plus the owner's direction recorded in the README.
One workable scheme using today's centrs, measured end to end:
/run/secrets/<name>, with no[secret:…]in the env, so nothing reaches/containerenv,/exportor the log).centrs devices init --encryptcreates/data/.config/tikoci/winbox.cdb(mode 0600, no plaintext), keyed by that file.__default__isadminwith no password, and the host record is the gateway. centrs reads with sourcescdb, and without the key it fails closed (cdb/password-required)./user/add name=t3code group=<ro group> password=[/file/get …secret-<name> contents]. Through the CDB, reads work, and RouterOS refuses a write (not enough permissions). The policy is the account, as decided.The open gap is getting the key to each
centrsprocess:CENTRS_CDB_PASSWORDis env-only by design. Options, in the README's "Direction":t3appexports it into T3's process env (process-only, not RouterOS config); a centrsCENTRS_CDB_PASSWORD_FILEtweak (/run/secretsis neither persisted nor beside the CDB); or agents prefix it themselves.Also:
CENTRS_HOSTdoesn't select a target, so the host belongs in the CDB./data: it holds T3's own signing keys.opshim could resolveop://from our side, but it's noted, not recommended.mobileskyfi commentedon Nov 25, 2026
Decided (owner, 2026-11-25), recorded in PR #73's README:
CENTRS_CDB_PASSWORD_FILE/--cdb-password-file,CENTRS_PASSWORD_FILE/--password-filefor parity, anddevices add|set --password-filewith an optional remove-after, for T3 secret-card files. With it,CENTRS_CDB_PASSWORD_FILE=/run/secrets/<name>is a plain setting for the YAML and the imageENV.[networkRouterIP]or the gateway.opshim. T3's secret store stays as T3 made it; router passwords don't go there.The app-t3code side, once centrs#672 lands, is a
t3app initslice. It initializes the encrypted CDB if none exists, seeds__default__and the host, records the platform (RouterOS host vs Docker), and addsCENTRS_CDB_PASSWORD_FILEplus thesecrets:entry to the YAML. Still to grow out of the research: how to seed once vs reconcile, and what happens when the operator changes the secret later.mobileskyfi commentedon Nov 25, 2026
PR #73 review rounds closed (Codex 6, CodeRabbit 6; all fixed and resolved). Two things the future
t3app initslice should keep:/data/.t3/userdata/secretsuntil it's imported into the CDB and removed. That's accepted as how T3 works, and the same holds for anything else T3 and an agent do with a secret. On RouterOS, an admin who can read/filecan read the volume's files anyway, so RouterOS admin access is the boundary that matters.<target>(the address, or an identity once the record carries one), and the record supplies the credentials.--hostalone skips the CDB, and--group hostfans out. The environment note (Agent context: tell agents where they run (environment note, user AGENTS.md, live inventory) #71) should say how to name the host, not only that a record exists.mobileskyfi commentedon Nov 26, 2026
centrs#672 is settled and aligned with PR #73 (
ce8bbec). Inputs for thet3app initslice:CENTRS_CDB_PASSWORD_FILE=/run/secrets/<name>can be an image-wideENVdefault. A missing file when no key is needed (an open CDB, no CDB yet, plain Docker) is a warning, not an error.CENTRS_*), andt3app initwrites them into the CDB's__default__record. Never setCENTRS_PASSWORD_FILEcontainer-wide: it outranks every record..envauto-load) lands before centrs#672 or together with it. The centrs matrix records this (centrs PR #673, merged).devices initcould take the__default__credentials, so creating and seeding the CDB is one write.Research: centrs credentials paths (#47, #71) (#73)