A stored secret reads back as ****. Any client that wrote back what it
read saved **** as the secret (a webhook's Basic password or signing
key, a store's credentials, and so on), and the real one was lost. Our
console doesn't do this today, but nothing on the server stopped it.
Now, in every registry /set except accounts (whose credentials already
keep **** in principal.rs):
**** written straight at a secret (a patch like httpAuth/secret/secret or signatureKey/secret) keeps the stored
secret, and the rest of the update applies.
**** as a secret anywhere else (a create, a variant switch, a whole
object replaced) has no stored secret to stand for, so the write is
refused: invalidProperties on the top-level property, saying to send
the secret itself or leave the field out.
New in crates/jmap/src/inbuxa/masked_secrets.rs, hooked into registry/set.rs.
Tests: system::masked_secrets::masked_secrets_tests (x:WebHook with
Basic auth and a signing key: masked read-back, keep on a direct patch,
refused inside an object and in a create, a real secret still saved).
With the guard turned off it fails with ("****", "****") stored. It
passes, and so does system::system_tests. Fork checks clean.
A stored secret reads back as `****`. Any client that wrote back what it
read saved `****` as the secret (a webhook's Basic password or signing
key, a store's credentials, and so on), and the real one was lost. Our
console doesn't do this today, but nothing on the server stopped it.
Now, in every registry `/set` except accounts (whose credentials already
keep `****` in `principal.rs`):
- `****` written straight at a secret (a patch like
`httpAuth/secret/secret` or `signatureKey/secret`) keeps the stored
secret, and the rest of the update applies.
- `****` as a secret anywhere else (a create, a variant switch, a whole
object replaced) has no stored secret to stand for, so the write is
refused: `invalidProperties` on the top-level property, saying to send
the secret itself or leave the field out.
New in `crates/jmap/src/inbuxa/masked_secrets.rs`, hooked into
`registry/set.rs`.
Tests: `system::masked_secrets::masked_secrets_tests` (x:WebHook with
Basic auth and a signing key: masked read-back, keep on a direct patch,
refused inside an object and in a create, a real secret still saved).
With the guard turned off it fails with `("****", "****")` stored. It
passes, and so does `system::system_tests`. Fork checks clean.
A stored secret reads back as "****", and a registry write that sent it
back stored "****" as the secret: a webhook's password or signing key,
a store's or directory's password, a DNS provider's key, an OAuth
client's secret. Written straight at a secret it now keeps the stored
one; anywhere else, inside a whole object, a create or a variant switch,
the write is refused with invalidProperties, since there's no stored
secret it could stand for. Accounts keep their own credential checks,
which already did this.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
A stored secret reads back as
****. Any client that wrote back what itread saved
****as the secret (a webhook's Basic password or signingkey, a store's credentials, and so on), and the real one was lost. Our
console doesn't do this today, but nothing on the server stopped it.
Now, in every registry
/setexcept accounts (whose credentials alreadykeep
****inprincipal.rs):****written straight at a secret (a patch likehttpAuth/secret/secretorsignatureKey/secret) keeps the storedsecret, and the rest of the update applies.
****as a secret anywhere else (a create, a variant switch, a wholeobject replaced) has no stored secret to stand for, so the write is
refused:
invalidPropertieson the top-level property, saying to sendthe secret itself or leave the field out.
New in
crates/jmap/src/inbuxa/masked_secrets.rs, hooked intoregistry/set.rs.Tests:
system::masked_secrets::masked_secrets_tests(x:WebHook withBasic auth and a signing key: masked read-back, keep on a direct patch,
refused inside an object and in a create, a real secret still saved).
With the guard turned off it fails with
("****", "****")stored. Itpasses, and so does
system::system_tests. Fork checks clean.