Class LegacyVaultReader
VaultIdentity (restored from its WrappedIdentity with the passphrase or the
recovery code), it returns the accounts. It never writes, never talks to a host and keeps nothing; the
host fetches the two documents itself (authenticating to its 0.4 server with VaultIdentity.signChallenge(byte[])) or exported them while it still ran 0.12. The owner then creates an AVP 0.5
repository (SharedVault.create(VaultHost, OwnerIdentity)) with the accounts they choose and invites the members again.
It accepts what a 0.12 member could read and nothing else: the manifest must name the
X25519-HKDF-SHA256-AESGCM-v1 wrap and list this member at its key epoch, the data key must unwrap with this
identity's key, and the envelope must name the manifest's repository and key epoch, carry a payload version
no lower than the manifest's, and authenticate under the 0.4 AAD. While the manifest withholds refresh
tokens, no account returned carries a refreshToken or an expiresAt, whatever the payload
holds. There is no rollback floor: an import is one read, with no earlier state to compare.
An import proves nothing 0.4 did not: nothing in a 0.4 repository is signed, so a 0.4 host that lied could have substituted keys or served an older payload before the import. Review the accounts before writing them into the new repository.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<AltAccount> read(String manifestJson, String envelopeJson, VaultIdentity identity) Reads the accounts of a 0.4 repository.
-
Method Details
-
read
public static List<AltAccount> read(String manifestJson, String envelopeJson, VaultIdentity identity) Reads the accounts of a 0.4 repository.- Parameters:
manifestJson- the repository manifest, as the 0.4 host served itenvelopeJson- the encrypted payload envelope, as the 0.4 host served itidentity- this member's identity- Returns:
- the accounts, in the order the payload holds them
- Throws:
AltsException- of kindINVALID_INPUTfor text that is not strict JSON,PROTOCOLfor JSON that is not a 0.4 manifest or envelope, a manifest that does not list this member, or an envelope that does not belong with the manifest, andCRYPTOif the data key does not unwrap with this identity or the payload does not authenticate; every message starts"Vault 0.4 import: "- Since:
- 1.0.0
-