Repository navigation
Description
Problem or Motivation
valkey-devops has only the default user with requirepass (measured). Any pod with the password can read every key. So the shared caches hold public repositories only, and 2 of the 7 managed repositories are private (measured).
Proposed Solution & Architectural Design
- Valkey ACL users, with the default user off:
sweep: read and write~valkey:roadmap:*and~valkey:gh:*;brain: read and write~valkey:brain:*, read~valkey:roadmap:*;agent: read and write~valkey:rag:*, read~valkey:brain:v1:fact:*.
- The passwords are generated managed credentials of
devops k8s push-secrets, which a person runs after the merge (owner decision 2026-11-11). Agents write no secret value. - After the users exist, the snapshot and fact caches admit private repositories for the
sweepandbrainusers only.
Target Subsystem
Workstation Caching & Valkey (k8s/llm/valkey-devops.yaml, src/devops_cli/k8s/cluster_secrets.py).
Existing Tool Considered
Valkey ACL with an aclfile, in the form of the valkey-roadmap users of #4563, and devops k8s push-secrets for the passwords. No new tool. Cost: about 60,000 tokens and 2 hours to build, plus the person step.
Acceptance Criteria
valkey-cli ACL USERSlists the 3 users, and the default user is off.- A test: the
agentuser getsNOPERMonvalkey:roadmap:*. - A test: the tiered cache writes the snapshot of a private repository only under the
sweepuser.
Dependencies
#4668. Person step: uv run devops k8s push-secrets after the merge. Part of the project brain plan #4624.
Source: #4624
Alternatives check of 2026-11-22: in-use.
The repository already uses this tool.
Tool: valkey-io/valkey (https://github.com/valkey-io/valkey), BSD-3-Clause, last activity 2026-11-22, maintained.
Reason: The searches returned the Valkey server itself, whose ACL already gives named users, per-key patterns, command categories, an aclfile and NOPERM refusal, so only project wiring remains.
Covers:
- Several named users with separate passwords in one aclfile
- Per-key patterns, including read-only and write-only prefixes
- Command categories such as read-only, plus NOPERM refusal
- Turning the default user off in the same file
Lacks:
- No generated role passwords; push-secrets rows are ours
- No client setting that sends a username
- No render of the aclfile from Secret values in the pod
- No admission of private repositories to the caches
Proposed design
Problem statement
valkey-devops has one default user with requirepass, so any pod that holds the password reads every key. The change gives the sweep, brain, agent and metrics roles their own ACL users, turns the default user off, and adds the generated passwords and client wiring. A person runs uv run devops k8s push-secrets and restarts the pod after the merge. The admission of private repositories to the snapshot and fact caches moves to a new issue.
Acceptance criteria
Requirement: ACL users and default user
The valkey-devops Deployment SHALL load an aclfile that defines the sweep, brain, agent and metrics users and turns the default user off.
Scenario: Rendered aclfile
- WHEN An operator runs
uv run devops k8s push-secrets. The operator restarts the deployment withkubectl -n llm rollout restart deploy/valkey-devops. The operator reads the aclfile withkubectl -n llm exec deploy/valkey-devops -c valkey -- sh -c "sed -E 's/>[^ ]+/>***/' /run/valkey/users.acl". - THEN The output holds
user default offand oneuser <name> on >***line for each ofsweep,brain,agentandmetrics.
Requirement: Role key patterns
Each role user SHALL hold only the key patterns of its role, with read and write access where the role needs it.
Scenario: Agent key patterns
- WHEN An operator runs
kubectl -n llm exec deploy/valkey-devops -c valkey -- sh -c "grep '^user agent ' /run/valkey/users.acl | sed -E 's/>[^ ]+/>***/'". - THEN The line holds
~valkey:rag:*and%R~valkey:brain:v1:fact:*, and no pattern that matchesvalkey:roadmap:*.
Requirement: Agent refuses roadmap keys
The agent user SHALL get NOPERM on a valkey:roadmap:* key.
Scenario: Agent read of a roadmap key
- WHEN An operator runs
kubectl -n llm exec deploy/valkey-devops -c valkey -- valkey-cli --user agent --pass "$AGENT_PASSWORD" --no-auth-warning GET valkey:roadmap:probe. The operator reads theagentpassword from Secretllm/valkey-devops-authkeyagent. - THEN The command prints an error that starts with
NOPERMand reads no value.
Requirement: Generated role passwords
Each role password SHALL be a generated managed credential of devops k8s push-secrets.
Scenario: Cluster Secret plan
- WHEN The test
tests/k8s/test_cluster_secret_plan.pybuilds the plan forllm/valkey-devops-authanddevops/devops-cli. - THEN The plan holds one generated
hex32-byte value for each keysweep,brain,agentandmetricsinllm/valkey-devops-auth, anddevops/devops-cliadoptssweepasDEVOPS_CLI_VALKEY_PASSWORD,brainasDEVOPS_CLI_VALKEY_BRAIN_PASSWORDandagentasDEVOPS_CLI_VALKEY_AGENT_PASSWORD.
Requirement: Client user setting
A client SHALL send the ACL user that the valkey.username setting names.
Scenario: Settings declaration
- WHEN The test
tests/security/test_config_declarations.pyreads the Settings declarations. - THEN
valkey.usernameis declared, maps toDEVOPS_CLI_VALKEY_USER, and an empty value keeps the default user.
Requirement: Exporter user
The redis-exporter sidecar SHALL authenticate as the metrics user.
Scenario: Exporter scrape
- WHEN An operator runs
kubectl -n llm port-forward deploy/valkey-devops 9121:9121andcurl -s localhost:9121/metrics | grep '^redis_up'. - THEN The
redis_upline is1.
Requirement: Metrics user command set
The metrics user SHALL hold no write command.
Scenario: Metrics user line
- WHEN An operator runs
kubectl -n llm exec deploy/valkey-devops -c valkey -- sh -c "grep '^user metrics ' /run/valkey/users.acl | sed -E 's/>[^ ]+/>***/'". - THEN The line holds no
+@writeand no+@all.
Requirement: Manifest validation
The valkey-devops manifest SHALL pass the repository Kubernetes check.
Scenario: Kubernetes check
- WHEN An operator runs
uv run devops ci --check --only k8s. - THEN The command exits 0 and reports no error for
k8s/llm/valkey-devops.yaml.
Existing Tool Considered
valkey-io/valkey (BSD-3-Clause, maintained, last activity 2026-11-17) is the tool, and the alternatives check of 2026-11-17 in the issue body records the verdict in-use. The comment of that check lists what the tool covers and what it lacks. The proposal adds only the wiring that the check lists as lacking: the aclfile render in the manifest, the Secret entries and their adoptions, the valkey.username setting, and REDIS_USER on the exporter. The issue writes the cost as about 60,000 tokens and 2 hours, plus the person step.
Key questions
- How does
valkey-devopsload its ACL users?: The pod renders an aclfile on the memory volume at start and loads it withvalkey-server --aclfile /run/valkey/users.acl. The file holdsuser default offand oneuserline for each role, with each password from a Secret value. No password goes into git. (best practice) [sources: k8s/llm/valkey-devops.yaml]- Chosen: aclfile rendered at pod start. The pod already writes a config file from the Secret on the memory volume, and the users survive a restart.
- Rejected:
ACL SETUSERfrom a client after start. It needs a second client and a password in the pod, and a restart loses every user. - Rejected: Keep
requirepasswith one user. It gives every pod that holds the password every key, which is the defect.
- Which users does the aclfile define, and why is
metricsone of them?: Four role users:sweep,brain,agentandmetrics. The redis-exporter sidecar sendsREDIS_PASSWORDand no user, so it authenticates as the default user. With the default user off it would lose its scrape. Themetricsuser holds the read, connection and slow command categories, and the sidecar setsREDIS_USERtometrics. (best practice) [sources: k8s/llm/valkey-devops.yaml]- Chosen: Add a read-only
metricsuser. The sidecar keeps its scrape and holds no key access. - Rejected: Keep the default user on. Any pod with the password then reads every key, which is the defect.
- Rejected: Give the sidecar the
sweepuser. The sidecar would hold write access to the roadmap and GitHub keys.
- Chosen: Add a read-only
- Where do the four role passwords come from?: Generated
hex32-byte entries ofdevops k8s push-secrets.llm/valkey-devops-authgets keyssweep,brain,agentandmetrics.devops/devops-cliadoptssweepasDEVOPS_CLI_VALKEY_PASSWORD,brainasDEVOPS_CLI_VALKEY_BRAIN_PASSWORDandagentasDEVOPS_CLI_VALKEY_AGENT_PASSWORD. A person runsuv run devops k8s push-secretsafter the merge, and no agent writes a value. (best practice) [sources: src/devops_cli/k8s/cluster_secrets.py, src/devops_cli/commands/k8s/cluster_secret_push.py]- Chosen: Generated
hexentries.secrets.token_hex(32)gives 64 hex characters, which need no quoting in an aclfile, and the existing valkey rows use this generator. - Rejected: One password for the four users. One leaked password opens every role, and a role cannot be revoked alone.
- Rejected: A person types each password. It adds four person steps and puts each value in a shell history.
- Chosen: Generated
- How does a client name its ACL user?: The client sends the user that the
valkey.usernamesetting names, asDEVOPS_CLI_VALKEY_USERbesideDEVOPS_CLI_VALKEY_PASSWORD. An empty value keeps the default user, so the workstation Valkey that still usesrequirepassneeds no change. Each pod setsvalkey.usernameand takes its password from the role key of Secretdevops/devops-cli. (best practice) [sources: src/devops_cli/k8s/cluster_secrets.py, k8s/devops/configmap.example.yaml, tests/security/test_config_declarations.py]- Chosen: A
valkey.usernamesetting. It pairs with the existingvalkey.password, and each pod sets it in its own manifest. - Rejected: The user in
valkey.url. One connection would take its user from the URL and its password from a setting. - Rejected: One Secret for each role. The table holds one row for this cache, and three more rows would repeat its restart and its labels.
- Chosen: A
- Which role does each consumer send?: The roadmap Service sends
sweep, and it opens a read-onlybrainconnection for the brain digest.brain-dailyandbrain-weeklysendbrain. The runner andrag-ingestsendagent. The redis-exporter sidecar sendsmetrics. (best practice) [sources: k8s/devops/roadmap-service/deployment.yaml, k8s/llm/valkey-devops.yaml, CONTEXT.md]- Chosen: One user for each pod role. Each pod holds the narrowest key patterns that its work needs.
- Rejected: Every pod sends
sweep. It gives the runner and the RAG pods write access to the roadmap and GitHub caches. - Rejected: Widen
sweepto read the brain keys. It breaks the key table of the issue, and one connection would read two roles.
- What proves each requirement of the manifest and the ConfigMap, when a test may not read either file?: A live check of the running pod proves the aclfile, the
agentNOPERMand the exporter scrape.uv run devops ci --check --only k8sproves the manifests. A test of source code provesCLUSTER_SECRETSand thevalkey.usernamedeclaration.docs/TESTING.md:61-62and thetest-treerow forbid a test that asserts a value of a manifest or a config file. (best practice) [sources: docs/TESTING.md:61-62, tests/gate/tree_checks/config_values.py, tests/security/test_config_declarations.py]- Chosen: Live checks and source-code tests. They prove the deployed state and the table, and
docs/TESTING.md:61-62forbids a test that reads a manifest or a config file. - Rejected: A test that renders the aclfile from the manifest. It reads
k8s/llm/valkey-devops.yaml, which thetest-treerow refuses. - Rejected: A test that reads
k8s/devops/configmap.example.yaml. It asserts a value of a config file, whichdocs/TESTING.md:61-62forbids.
- Chosen: Live checks and source-code tests. They prove the deployed state and the table, and
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(k8s)scope of the title gives the scope.It improves access control and enables private-repo caching but does not fix a live defect or advisory.It restricts key access to per-role patterns and unlocks private-repository caching for two of seven managed repositories.The body estimates about 2 hours of build plus one person step for push-secrets.Both create Valkey ACL users, but #4563 targets valkey-roadmap for GitHub budget sharing while this targets valkey-devops for role-based cache access.devops-cli-service commentedon Nov 15, 2026
Refine cannot set this item to Ready at 0820a64 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
devops-cli-service commentedon Nov 17, 2026
Alternatives check: in-use
Reason: Searches turned up only the Valkey server itself (and the young valkey-operator, still pre-1.0) as candidates, and Valkey's built-in ACL with an aclfile covers the whole need: one user per role, per-user key patterns, command categories, and
user default off. The issue already names Valkey ACL with an aclfile as the tool in place, so only the wiring (aclfile render, Secret rows, clientusernamesetting, exporter env) is left to build.The repository already uses this tool.
Tool: valkey-io/valkey (https://github.com/valkey-io/valkey)
Covers:
user <name> on >password ~pattern +@commands, loaded withvalkey-server --aclfileagentholds only~valkey:rag:*and~valkey:brain:v1:fact:*and gets NOPERM onvalkey:roadmap:*metricsuser can be limited to read commands with no+@writeor+@alluser default off, which retires the singlerequirepassuser that gives every pod every keyACL USERSandACL LISToutput to assert the users and the default-user state in testsLacks:
devops k8s push-secretsand a Secret, rendered into the aclfile at pod startvalkey-devops-authrather than committedvalkey.username/DEVOPS_CLI_VALKEY_USERsetting and the exporter'sREDIS_USERare project code, not the servercluster_secrets.pymust addTools considered:
Searches run:
Sources:
Checked on 2026-11-17. A person decides what this means for the item. The check changes no label and closes no issue.
dan-petty commentedon Nov 19, 2026
This comment reports that this body gives two different counts of ACL users, and that five of its scenarios assert values of a manifest or a config file.
User count. The body does not agree with itself:
sweep,brainandagent.valkey-cli ACL USERSlists "the 3 users".metrics, because the redis-exporter sidecar otherwise loses its login when the default user is off (key question at line 98). The requirement "ACL users and the default user" (line 45) and the scenario "Rendered aclfile" (line 49) expect 4 role users.ACL USERSlists every user, the default user too. With 4 role users, it lists 5 names:agent,brain,default,metricsandsweep. Before this item goes to Ready, make Proposed Solution and Acceptance Criteria name the 4 role users, and check thatdefaultis off withACL GETUSER defaultorACL LIST.Scenarios that assert manifest or config values.
docs/TESTING.md:61-62forbid a test that asserts a value of a manifest or a config file, and thetest-treerow refuses one (tests/gate/tree_checks/config_values.py). The pod renders the aclfile at start from a shell command ink8s/llm/valkey-devops.yaml(key question at line 90), so a test of that render reads the manifest. These scenarios ask for such a test:user agentline of the same aclfileDEVOPS_CLI_VALKEY_USERink8s/devops/configmap.example.yamlREDIS_USERand the Secret key of the exporter containerk8s/llm/valkey-devops.yamlThis body was refined on 2026-11-15, before #6080 changed the plan rules on 2026-11-17. Give each of these requirements a validator command or a live check as its proof, in the form of #6080 and #6083. The acceptance test "the
agentuser getsNOPERMonvalkey:roadmap:*" can be such a live check when it runs against the deployed Valkey. The scenario "Cluster Secret table" readsCLUSTER_SECRETSinsrc/devops_cli/k8s/cluster_secrets.py, which is source code, so it can stay.devops-cli-service commentedon Nov 19, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
perf(roadmap): share the listing snapshot and facts in Valkey (#6583)
19 remaining items
devops-cli-service commentedon Nov 24, 2026
Cleared the stop at job by the rule
continue: the runner Job devops-cli-implement-devops-cli-4704-7f165d ended without a result. The classci_infraof the stop is one that a new attempt can fix. This is continuation 1 of 4 for this item. The item is Ready again. The Service takes it in the next round. The new Job takes the branch fromorigin, so it keeps the work that the run pushed there.feat(k8s): give valkey-devops one ACL user for each role (#4704)
docs(openspec): archive the change (#4704)
feat(k8s): Give valkey-devops one ACL user for each role (#4704)
devops-cli-service commentedon Nov 24, 2026
Released in v0.211.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.211.0
devops-cli-service commentedon Nov 24, 2026
Live since 2026-11-24 20:09 UTC
dan-petty commentedon Nov 26, 2026
This item is closed, but its change is not live (measured on 2026-11-26, review of #4624).
k8s/llm/valkey-devops.yamlof that repository did not change: the pod still starts withrequirepassand no--aclfile.uv run devops k8s push-secrets --planreadswould generateforsweep,brain,agentandmetricsofllm/valkey-devops-auth.valkey-cli ACL USERSlists the 3 users" is not met.The work that remains is dan-petty/homelab#261, with the draft pull request dan-petty/homelab#262. A person runs
uv run devops k8s push-secrets --only llm/valkey-devops-authbefore that merge. A temporary pod with the new pod template and throwaway passwords proved the criterion "theagentuser getsNOPERMonvalkey:roadmap:*". #6600 holds two more findings about the role users.docs(adr): record two facts of ADR 0023 that are out of date (#7360)