onepub-dev / onepub-dev/reVault
Support agentless one-shot operations and managed CI sessions
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4
- Forks
- 0
- Avg merge
- 1h 55m
- Merged PRs (30d)
- 1
Description
Problem
The current CLI couples several ordinary lockbox operations to the Lockbox Session Agent through local_vault(). This makes the agent an availability requirement rather than an optional session/cache facility.
On a desktop, a stopped agent can normally be started automatically. However, if the agent is unsupported or cannot start, commands such as lbx add cannot fall back to opening the vault and lockbox for a single operation. lbx open also cannot work agentlessly because its purpose is to persist unlocked state between processes.
The current low-level CI workaround also exposes too much runtime plumbing. A job may need to configure values such as:
LOCKBOX_VAULT_PASSWORDLOCKBOX_VAULT_DIRLOCKBOX_SESSION_AGENT_DIR- agent configuration overrides
Only the credential should normally be user-facing. Temporary directories, agent lifecycle, platform-store policy, and cleanup should be managed by reVault.
The draft docs/ci_cd.md design for lbx vault ci bootstrap and lbx vault ci open is the right place to establish a simpler contract.
Proposed desktop contract
Treat the session agent as a session/convenience facility, not a prerequisite for core encrypted-file operations.
| Situation | Expected behaviour |
|---|---|
| Agent is supported but stopped | Start it automatically |
| Agent is running | Use cached session keys |
| Agent cannot start | One-shot commands unlock and operate in-process |
lbx open without an agent |
Explain that persistent sessions are unavailable |
| Non-interactive execution without credentials | Fail immediately with explicit credential instructions |
| Vault is not available | operations that take a key or password still function |
Commands such as add, cat, extract, list, variable, mirror, and form should be able to:
- Resolve the vault passphrase from platform storage, the agent,
LOCKBOX_VAULT_PASSWORD, a secured file, or an interactive prompt as appropriate. - Open the local vault directly.
- Open the selected lockbox using a vault profile or remembered lockbox password.
- Load the correct owner-signing key for writable operations.
- Perform the operation in the current process.
- Drop/zeroize decrypted material when the command exits.
We should allow read only operations to be performed without access to the signing key - maybe we need a switch to indicate that we don't need to check the signatures.
open and session remain agent-backed because their explicit purpose is to preserve state across commands.
Proposed CI contract
The CI caller should provide an encrypted CI bundle and one protected credential:
env:
LOCKBOX_VAULT_PASSWORD: ${{ secrets.REVAULT_PASSWORD }}
run: |
lbx vault ci open .revault/ci/production.lockbox-ci \
--lockbox deploy.lbox \
-- ./ci/deploy.sh
We should encourage users to provide a protected file with the vault password rather than a env var - is this the best practice in CI/CD/production environments, what about desktop usage?
vault ci open should internally:
- Require
LOCKBOX_VAULT_PASSWORDor an explicit secure input mechanism. - Create private temporary vault and runtime directories using the platform/CI temporary-directory defaults.
- Restore and verify the encrypted minimal CI vault bundle.
- Disable platform secure-storage integration for the temporary vault.
- Attempt to start a private job-scoped session agent.
- Open the requested lockboxes using the CI profile.
- Run the child command with only the necessary internal environment inherited.
- Forward signals and return the child command's exit status.
- Stop the agent, clear cached keys, zeroize in-memory secrets, and remove temporary state on success or failure.
- Use an agentless execution path where feasible if the runner cannot host the agent.
Users should not normally need to set LOCKBOX_VAULT_DIR, LOCKBOX_SESSION_AGENT_DIR, sleep-inhibitor settings, or other implementation variables.
Bootstrap expectations
vault ci bootstrap should:
- Create a stable, dedicated CI profile rather than reusing a developer profile.
- Produce one encrypted minimal-vault bundle.
- Generate a high-entropy vault passphrase when appropriate and display it only on an interactive terminal.
- Never print private profile recovery material.
- Optionally grant the new profile access to selected already-open lockboxes.
- Support exporting only the public key when grants will be applied elsewhere.
- Clearly separate the encrypted bundle from the protected passphrase.
Implementation notes
- Existing
Vault<NoopStore>paths demonstrate that direct agentless opening is already architecturally possible. - Consolidate direct opening into a deliberate one-shot execution path instead of adding command-specific fallbacks.
- Writable agentless operations must retain the same owner-signing and commit-authentication guarantees as agent-backed operations.
- Do not silently claim that
openestablished a persistent session when no agent exists. - Avoid interactive prompts when stdin is not a terminal.
- The CI agent, when used, must be isolated per job rather than sharing a desktop/default runtime endpoint.
Acceptance criteria
- On supported desktops, a stopped session agent starts transparently.
- If the agent cannot start, representative read-only and writable one-shot commands still work after securely unlocking the vault.
-
lbx openreports a clear persistent-session capability error when the agent is unavailable. - Non-interactive commands never hang waiting for a passphrase prompt.
-
vault ci bootstrapcreates an encrypted minimal CI bundle and dedicated profile. -
vault ci openrequires only the bundle plus one protected credential from the caller. -
vault ci openmanages all temporary paths, agent settings, and cleanup internally. - Child commands can use normal
lbxcommands within the managed CI scope. - Cleanup occurs on success, command failure, and termination signals.
- Agentless fallback and managed-agent CI flows have Linux, macOS, and Windows coverage where supported.
- Desktop, generic CI, GitHub Actions, and GitLab examples document only the intended high-level interface.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review docs/ci_cd.md, local_vault(), and the existing Vault paths first. Trace the representative add, cat, extract, list, variable, mirror, and form commands alongside the vault ci bootstrap and open entry points. Done means agentless desktop operations and managed CI flows meet the listed credential, cleanup, capability-error, signal, and platform-coverage acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- ci-cd, cli, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100