feat: convert to workspace with pluggable storage backends#2
Merged
Conversation
Split zerolease into a multi-crate workspace to support pluggable storage backends and avoid libsqlite3-sys link conflicts with downstream consumers like zeroclaw. New crates: - zerolease-provider: CredentialProvider trait, ZeroleaseProvider (vault-backed), and StaticProvider (for testing/migration) - zerolease-store-rusqlite: RusqliteStore + RusqliteAuditLog for apps that already depend on rusqlite (e.g., zeroclaw) - zerolease-store-postgres: PostgresStore + PostgresAuditLog for shared infrastructure deployments (excluded from workspace due to sqlx v0.8 libsqlite3-sys conflict; builds standalone) Core crate changes: - No default storage backend (consumers pick a store crate) - Shared serialization helpers moved to methods on CipherAlgorithm, SecretKind, and AuditEvent::indexed_fields() - Removed standalone bin (needs its own crate to choose a backend) - Updated basic_vault example to use zerolease-store-rusqlite
The test and coverage jobs referenced the removed `postgres` feature flag, causing both to fail. Updated to use --workspace for included members and --manifest-path for the excluded postgres crate.
It has consumers outside this crate.
…t error Remove redundant `as Box<dyn KeySource>` cast that triggers trivial_casts lint when the kms feature is enabled. Use sqlx::raw_sql() instead of sqlx::query() for the audit schema migration, since PostgreSQL's extended query protocol does not support multiple statements in a single call.
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.
Split zerolease into a multi-crate workspace to support pluggable storage backends and avoid libsqlite3-sys link conflicts with downstream consumers like zeroclaw.
New crates:
Core crate changes: