diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-03-26 20:27:32 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-03-26 20:27:32 +0000 |
commit | 5478c4759a5d5824f99457a01f76600f2e6a80b5 (patch) | |
tree | 2ca6eb6d4d0750a6151934163f2c1804897a88f6 /yarns | |
parent | e96e7543c4e759281e8a2d789ed2d2fd4f358ce2 (diff) | |
download | obnam-5478c4759a5d5824f99457a01f76600f2e6a80b5.tar.gz |
Add scenario for replacing client key
Diffstat (limited to 'yarns')
-rw-r--r-- | yarns/0060-encryption.yarn | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/yarns/0060-encryption.yarn b/yarns/0060-encryption.yarn index 485a1233..454e48a0 100644 --- a/yarns/0060-encryption.yarn +++ b/yarns/0060-encryption.yarn @@ -115,6 +115,33 @@ not have access to another client's data. THEN the attempt failed with exit code 1 AND the error message matches "secret key not available" +Replace a key for a client +-------------------------- + +If we replace the key for a client in a repository, and then the +client gets rid of the old key, the new key should be able to restore +old backups. + +First, backup using the old key. + + SCENARIO replace client key + GIVEN user U uses encryption key "Test Key One" from test-data/keyring-1 + AND 1kB of new data in directory L + AND a manifest of L in M + WHEN user U backs up directory L to repository R + +Then, replace the old key with the new one and get rid of the old key. + + GIVEN user U uses encryption key "Test Key Two" from test-data/keyring-2 + WHEN user U adds key "Test Key Two" to repository R + AND user U removes key "Test Key One" from repository R + WHEN user U no longer has key "Test Key One" + +Finally, verify that restores still work with the new key. + + WHEN user U restores their latest generation in repository R into X + THEN L, restored to X, matches manifest M + Key queries ----------- |