docs: update public docs for recent features#27
Conversation
…ensitive fields - fleet.md: add maintenance mode section (toggle, behavior, access control) - security.md: rewrite secret resolution to reflect env var delivery model, add secret name normalization rules, add sensitive fields section - agent.md: update config response docs (checksum includes secrets, maintenance mode returns empty pipelines), clarify env injection - database.md: add maintenanceMode fields to VectorNode, git fields to Environment - pipeline-editor.md: add secret picker note for sensitive fields
Greptile SummaryThis PR updates five public documentation pages to reflect features shipped in PRs #19–#26, covering maintenance mode for fleet nodes, the revised secret env-var delivery model, agent config response details, database schema additions, and the pipeline editor's secret picker. The docs are well-aligned with the implementation, with one correctness gap in the Key changes:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Agent
participant Server
participant Vector
Note over Agent,Server: Normal operation (BUILTIN backend)
Agent->>Server: GET /api/agent/config
Server-->>Agent: pipelines with configYaml (env var placeholders) and secrets dict
Agent->>Vector: spawn with resolved env vars injected
Note over Vector: interpolates placeholders at startup
Note over Agent,Server: Node enters maintenance mode
Agent->>Server: GET /api/agent/config
Server-->>Agent: empty pipelines array
Agent->>Vector: SIGTERM (graceful stop all pipelines)
Agent->>Server: POST /api/agent/heartbeat (continues normally)
Note over Agent,Server: Exit maintenance mode
Agent->>Server: GET /api/agent/config
Server-->>Agent: full pipeline configurations restored
Agent->>Vector: restart all pipelines
Last reviewed commit: 0e9e6cc |
The code overwrites on collision (last alphabetical match wins), not first match.
The hint incorrectly implied secrets are not sent over the wire. They are — just separately from the YAML, in the config response secrets dictionary.
| - **`secrets`**: Pre-resolved secret values with `VF_SECRET_` prefix. The agent injects these as environment variables into the Vector process. | ||
| - **`configYaml`**: The generated Vector YAML. Secret references are converted to environment variable placeholders (e.g., `${VF_SECRET_AWS_KEY}`) rather than containing decrypted values. | ||
| - **`secrets`**: Pre-resolved secret values keyed by their `VF_SECRET_` environment variable name. The agent injects these as environment variables into the Vector process, where Vector's interpolation resolves the placeholders. | ||
| - **`checksum`**: Includes both the YAML and the secrets dictionary, so rotating a secret triggers a pipeline restart even if the YAML itself hasn't changed. |
There was a problem hiding this comment.
Checksum-includes-secrets claim only holds for BUILTIN backend
The updated description says the checksum "Includes both the YAML and the secrets dictionary, so rotating a secret triggers a pipeline restart even if the YAML itself hasn't changed." This is only true when secretBackend === "BUILTIN".
Looking at src/app/api/agent/config/route.ts (lines 77–90 and 124–128):
// secrets is only populated for BUILTIN
const secrets: Record<string, string> = {};
if (environment.secretBackend === "BUILTIN") {
// ...populate secrets...
}
// checksum only includes secrets when secrets is non-empty (i.e., BUILTIN only)
const checksumInput = Object.keys(secrets).length > 0
? configYaml + JSON.stringify(secrets, Object.keys(secrets).sort())
: configYaml;For VAULT, AWS_SM, or EXEC backends the secrets map stays empty, the checksum equals the YAML alone, and rotating a secret in the external store will not trigger a pipeline restart via this mechanism. Operators using an external backend who rotate secrets will need to trigger a restart manually.
The description should qualify this behaviour:
| - **`checksum`**: Includes both the YAML and the secrets dictionary, so rotating a secret triggers a pipeline restart even if the YAML itself hasn't changed. | |
| - **`checksum`**: Includes both the YAML and the secrets dictionary (BUILTIN backend only), so rotating a secret triggers a pipeline restart even if the YAML itself hasn't changed. For external secret backends (Vault, AWS SM, EXEC), the checksum covers only the YAML; secret rotation in the external store does not automatically trigger a restart. |
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/public/reference/agent.md
Line: 166
Comment:
**Checksum-includes-secrets claim only holds for BUILTIN backend**
The updated description says the checksum "Includes both the YAML and the secrets dictionary, so rotating a secret triggers a pipeline restart even if the YAML itself hasn't changed." This is only true when `secretBackend === "BUILTIN"`.
Looking at `src/app/api/agent/config/route.ts` (lines 77–90 and 124–128):
```typescript
// secrets is only populated for BUILTIN
const secrets: Record<string, string> = {};
if (environment.secretBackend === "BUILTIN") {
// ...populate secrets...
}
// checksum only includes secrets when secrets is non-empty (i.e., BUILTIN only)
const checksumInput = Object.keys(secrets).length > 0
? configYaml + JSON.stringify(secrets, Object.keys(secrets).sort())
: configYaml;
```
For `VAULT`, `AWS_SM`, or `EXEC` backends the `secrets` map stays empty, the checksum equals the YAML alone, and rotating a secret in the external store will **not** trigger a pipeline restart via this mechanism. Operators using an external backend who rotate secrets will need to trigger a restart manually.
The description should qualify this behaviour:
```suggestion
- **`checksum`**: Includes both the YAML and the secrets dictionary (BUILTIN backend only), so rotating a secret triggers a pipeline restart even if the YAML itself hasn't changed. For external secret backends (Vault, AWS SM, EXEC), the checksum covers only the YAML; secret rotation in the external store does not automatically trigger a restart.
```
How can I resolve this? If you propose a fix, please make it concise.
Summary
Updates public documentation (synced to GitBook) to cover features shipped in PRs #19–#26:
fleet.md): New "Maintenance mode" section documenting per-node maintenance toggle, behavior (empty pipeline list → graceful stop), and ADMIN access requirementsecurity.md): Rewrote "How secrets are resolved" to reflect env var delivery model (SECRET[name]→${VF_SECRET_NAME}placeholders), added secret name normalization rules, added "Sensitive fields" section for secret-picker-only enforcementagent.md): Updated config response documentation (checksum now includes secrets dict, maintenance mode returns empty pipelines array), clarified environment injection behaviordatabase.md): AddedmaintenanceMode/maintenanceModeAtfields to VectorNode table, addedgitRepoUrl/gitBranch/gitTokenfields to Environment tablepipeline-editor.md): Added secret picker note for sensitive fields in detail panelTest plan
fleet.md#maintenance-mode,security.md#sensitive-fields)