[vault] Signing: a key the Android grant makes is standing-granted, a value older cores read; v0.19.1

0.19.0 wrote a new security action, android-key-made, which every older core refuses. The phone app and the
web vault open the same vault with their own pinned core, so a vault in which the grant made a key would stop
opening there. The key's creation is now standing-granted with 'Android grant made <id> for <repo> pipeline
release'; the grant itself is a member older cores ignore.
This commit is contained in:
2026-11-21 09:06:35 +01:00
parent 6588461438
commit 0eee7632ae
7 changed files with 32 additions and 29 deletions
+5 -3
View File
@@ -1272,7 +1272,9 @@ impl Vault {
/// Makes `repo`'s app key under the Android grant, when its first release asks (`custos-sign apk`): the grant
/// covers `repo`, `pipeline` is `release`, `via` is local, *Sign only with a card* is not ticked, and there is
/// no key under that id. RSA-4096, `CN=<Name>`, the grant's O and C, scoped to exactly `repo` and `release`.
/// Writes `android-key-made`. The caller saves. Slow: one RSA-4096 key.
/// Writes `standing-granted` with `Android grant made <id> for <repo> pipeline release`: a value every core since
/// 0.16.0 reads, so the phone and the web vault still open the vault (core 0.19.1). The caller saves. Slow: one
/// RSA-4096 key.
pub fn android_grant_make_key(&mut self, repo: &str, pipeline: &str, via: Via, now: i64) -> Result<String, Error> {
let no = |why: String| Err(Error::Signing(why));
let Some(g) = self.signing.android.clone() else { return no("there is no Android grant".into()) };
@@ -1314,8 +1316,8 @@ impl Vault {
{
g.made.push(id.clone());
}
let words = format!("{id} for {repo} pipeline {ANDROID_PIPELINE}");
self.security.standing_note(crate::security::Action::AndroidKeyMade, &words, now);
let words = format!("Android grant made {id} for {repo} pipeline {ANDROID_PIPELINE}");
self.security.standing_note(crate::security::Action::StandingGranted, &words, now);
Ok(id)
}