ErrorsPersonal data · rule
data.erasure_log_reader_invalid
The erasure log's reader: reads something other than a SigningKey setting of its own.
Area 15, Personal data; not declinable; the next step is usually the agent's.
Why Jadpo refuses it
reader: is the key a backup service outside your app reads the erasure log
with, and the service holds it. So it has to be a secret that never appears in
your source, strong enough to be a credential, and one that opens the log and
nothing else. A key that also signed sessions, tokens or a crypto call would
let the service do those too.
What it looks like
The same setting read by an action's crypto call as well:
domains/club/actions/sign_body.jadpo:
use club/types { BodySignature, SignedBody }/// The signature on what the club sends.action sign_body(body: SignedBody) -> BodySignature { return BodySignature(crypto.hmac(body, key: config.erasure_log_reader))}
error erasure_log_reader is the erasure log's reader key, and is read somewhere else too
--> app.jadpo:13:21
|13 | reader: config.erasure_log_reader | ^^^^^^^^^^^^^^^^^^^^^^^^^ the backup service's key
- reason
- The backup service holds this key, so whatever else reads
erasure_log_readerit could do too: sign sessions or tokens, or make the signatures acryptocall makes. Its key reads the erasure log and nothing else. - next
- Declare a
SigningKeysetting of its own forreader:, and leaveerasure_log_readerto the other (agent) - rule
- data.
erasure_ log_ reader_ invalid - help
- https://jadpo.
dev/docs/errors/data. erasure_ log_ reader_ invalid
(agent) at the end of the next: line means your coding agent can make the fix itself.
How to fix it
If the setting is read somewhere else too, give the backup service a key of its own, and leave the other setting to what else reads it:
config { erasure_log_reader: SigningKey signing_secret: SigningKey}
use club/types { BodySignature, SignedBody }/// The signature on what the club sends.action sign_body(body: SignedBody) -> BodySignature { return BodySignature(crypto.hmac(body, key: config.signing_secret))}
The backup service's key now reads the erasure log and nothing else, and
signing_secret signs what the club sends. A reader: written in the source,
or reading a setting of another type, is fixed the same way, with a
SigningKey setting of its own.
Related
Markdown for agents: /docs/errors/data.erasure_log_reader_invalid.md.Built from Jadpo's main branch at commit ee389ee.