feature: the key of a credential store may be a path of keys, so stores of several kinds share one object of config.json.
Release / release (push) Failing after 16m30s

This commit is contained in:
slawek committed 2026-10-28 23:44:36 +01:00
1 parent 7959c90012
commit 97c46ff0d8
6 files changed
+71 -12

No files matched your search

+19
View File
@@ -76,3 +76,22 @@ Consequences: Without the key no secret can be saved or used, and a changed key
secrets unusable until they are entered again. SHA-256 does not slow down guessing a weak key, so
the key has to be long and random. Anyone who reaches the routes can replace credentials, as the
applications have no authentication.
## ADR-4: The key of a credential store is a path, so related stores share one object
Status: Accepted
Context: sql-query-webui keeps connection profiles of PostgreSQL and of SQL Server. As stores of
top-level keys, the keys have to carry the kind in their names, and a key such as `connections`
does not say which kind it holds once there are several.
Decision: The key of a store is a key of `config.json` or a path of keys separated by dots, such
as `connections.pg` and `connections.mssql`. The store reads the list at the path, reports its
problems by `<path>.<index>.<field>`, and a write sets the list at the path, creating the objects
of the path that are missing, or are not objects, and keeping their other keys, so stores of one
object can be written one after the other. The kind stays the store's, not a field of an entry
(ADR-3).
Consequences: A key of `config.json` holding a dot cannot be the key of a store. A single key
reads and writes as before, so applications of one-key stores need no change. The application
checks the object of a path, such as the keys it allows in it, itself.