Merge pull request #17091 from mozilla/add-test-for-v1-ks-login

task(functional-tests): Add test showing that v1 ks passwords continue to work after upgrade.
This commit is contained in:
Dan Schomburg 2024-06-07 10:35:23 -07:00 коммит произвёл GitHub
Родитель 727a1a511a 73e5ab0acd
Коммит 223a87e97d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -66,7 +66,7 @@ test.describe('auth-client-tests', () => {
expect(status2.clientSalt).toBeUndefined();
});
test('it creates with v2 and signs in', async ({
test('it creates with v2 and signs in with v2 or v1', async ({
target,
testAccountTracker,
}) => {
@ -97,6 +97,16 @@ test.describe('auth-client-tests', () => {
expect(credentialsV2.unwrapBKey).toEqual(signInResult.unwrapBKey);
const credentialsV1 = await getCredentials(email, password);
expect(credentialsV1.unwrapBKey).not.toEqual(signInResult.unwrapBKey);
// Check that we can still sign in with a v1 password. This is needed for legacy clients that don't have key stretching changes.
const v1Credentials = await getCredentials(email, password);
const v1SignInResult = (await client.signInWithAuthPW(
email,
v1Credentials.authPW,
{ keys: true }
)) as any;
expect(v1SignInResult).toBeDefined();
expect(v1SignInResult.keyFetchToken).toBeDefined();
});
test('it creates with v1 and upgrades to v2 on signin', async ({