mirror of
https://github.com/sol1/rustguac.git
synced 2026-09-10 17:47:13 +00:00
f5ccc35cdf
Each per-user credential variable can live in the shared backend (fleet- wide) or the local backend (this instance) - its location is the scope. Reads merge both backends (local wins); writes partition by a per-key scope sent from My Credentials, moving a key between backends when its toggle changes and honouring "leave blank to keep". A "Shared across sites" toggle appears per credential. Quick-start preserved: with one Vault the shared and local cells alias the default, creds_split() is false, the toggle is hidden, and everything is written to the single store in one call - byte-identical to before. New config user_credentials_default_scope (default "local") seeds new toggles. The write partition is a pure function with unit tests covering single- store, blank-keeps-existing, scope routing, cross-scope moves, and the default-scope fallback.