mesh-grants: hold a list that changes several loaded users' hashes at once with no rotation by the vault naming them, and raise user-list-held naming them (issue 774, ADR 0561 §7)
This commit is contained in:
@@ -138,6 +138,22 @@ type HeldHash struct {
|
||||
Generation int `json:"generation,omitempty"`
|
||||
At time.Time `json:"at"`
|
||||
Adopted bool `json:"adopted,omitempty"`
|
||||
// Fingerprint is the vault's fingerprint of the value the hash is of: with the generation, what says the password
|
||||
// changed, never the hash itself (a hash of the same password differs by its salt).
|
||||
Fingerprint string `json:"fingerprint,omitempty"`
|
||||
// Rotating is the vault's rotation of the account under way: a change of its hash it announces (ADR 0561 §4, §7).
|
||||
Rotating *struct {
|
||||
Login string `json:"login"`
|
||||
} `json:"rotating,omitempty"`
|
||||
}
|
||||
|
||||
// credentialOf is what says which password a held hash is of, never the hash: adopted, or the vault's generation and the
|
||||
// fingerprint of its value.
|
||||
func credentialOf(h HeldHash) string {
|
||||
if h.Adopted {
|
||||
return "adopted"
|
||||
}
|
||||
return fmt.Sprintf("generation %d %s", h.Generation, h.Fingerprint)
|
||||
}
|
||||
|
||||
// readHashes reads the vault's bus-accounts; a refusal is a gap, and every user then has no hash held.
|
||||
|
||||
Reference in New Issue
Block a user