Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions packages/server/src/helpers/tests/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
import { greaterOrEqual, parse } from '@std/semver';

export const denoSupportsPQC = greaterOrEqual(parse(Deno.version.deno), parse('2.8.2'));

/**
* A fake root cert from FIDO Conformance testing. This is the final cert in the x5c of an
* Android Keystore response from back in 2020 (needless to say it is not a Google-issued root.)
*/
export const FIDO_Conformance_Fake_Root = `-----BEGIN CERTIFICATE-----
MIIDFDCCArqgAwIBAgIBAjAKBggqhkjOPQQDAjCB3DE9MDsGA1UEAww0RkFLRSBB
bmRyb2lkIEtleXN0b3JlIFNvZnR3YXJlIEF0dGVzdGF0aW9uIFJvb3QgRkFLRTEx
MC8GCSqGSIb3DQEJARYiY29uZm9ybWFuY2UtdG9vbHNAZmlkb2FsbGlhbmNlLm9y
ZzEWMBQGA1UECgwNRklETyBBbGxpYW5jZTEiMCAGA1UECwwZQXV0aGVudGljYXRv
ciBBdHRlc3RhdGlvbjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk1ZMRIwEAYDVQQH
DAlXYWtlZmllbGQwHhcNMTkwNDI1MDU0OTMyWhcNNDYwOTEwMDU0OTMyWjCB5DFF
MEMGA1UEAww8RkFLRSBBbmRyb2lkIEtleXN0b3JlIFNvZnR3YXJlIEF0dGVzdGF0
aW9uIEludGVybWVkaWF0ZSBGQUtFMTEwLwYJKoZIhvcNAQkBFiJjb25mb3JtYW5j
ZS10b29sc0BmaWRvYWxsaWFuY2Uub3JnMRYwFAYDVQQKDA1GSURPIEFsbGlhbmNl
MSIwIAYDVQQLDBlBdXRoZW50aWNhdG9yIEF0dGVzdGF0aW9uMQswCQYDVQQGEwJV
UzELMAkGA1UECAwCTVkxEjAQBgNVBAcMCVdha2VmaWVsZDBZMBMGByqGSM49AgEG
CCqGSM49AwEHA0IABKtQYStiTRe7w7UbBEk7BUkLjB+LnbzzebLe3KB8UqHXtg3T
IXXcK37dvCbbCNVfhvZxtpTcME2kooqMTgOm9cejYzBhMA8GA1UdEwEB/wQFMAMB
Af8wDgYDVR0PAQH/BAQDAgKEMB0GA1UdDgQWBBSj0qos7w2M8iQC1Ry0YLy/alsk
FDAfBgNVHSMEGDAWgBRSmhsy4FaqzVEP71+ANwaL8pEjHTAKBggqhkjOPQQDAgNI
ADBFAiEAsW8uQC+0es5tOY3w/T7IshPj3o//B5IQRsHq8IlZKH0CIG75Q6isJ4tw
XhaLE4b0TkuLadd7i4zarqZsoaSWXy75
-----END CERTIFICATE-----
`;
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import { assertEquals } from '@std/assert';
import { assertEquals, assertRejects } from '@std/assert';
import { FakeTime } from '@std/testing/time';
import { assertSpyCallArgs, assertSpyCalls, stub } from '@std/testing/mock';
import { lessThan, parse } from '@std/semver';

import { FIDO_Conformance_Fake_Root } from '../../helpers/tests/index.ts';
import { _fetchInternals } from '../../helpers/fetch.ts';
import { SettingsService } from '../../services/settingsService.ts';
import { verifyRegistrationResponse } from '../verifyRegistrationResponse.ts';
import { Google_Hardware_Attestation_Root_2 } from '../../services/defaultRootCerts/android-key.ts';

/**
* Clear out root certs for android-key since responses were captured from FIDO Conformance testing
* and have cert paths that can't be validated with known root certs from Google
*/

Deno.test('should verify Android Keystore response from FIDO Conformance in 2020', async () => {
SettingsService.setRootCertificates({
identifier: 'android-key',
certificates: [],
certificates: [FIDO_Conformance_Fake_Root],
});

/**
Expand All @@ -29,31 +27,11 @@ Deno.test('should verify Android Keystore response from FIDO Conformance in 2020
* notAfter: 2046-09-10T05:49:32.000Z
* }
*/
const mockDate = new FakeTime(new Date('2025-01-26T19:00:00.000Z'));
using _mockDate = new FakeTime(new Date('2025-01-26T19:00:00.000Z'));

const verification = await verifyRegistrationResponse({
response: {
id: 'V51GE29tGbhby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jE4DpvXHo2MwYTAPBgNVHRMBAf8EBTADAQH_MA4GA1UdDwEB_wQEAwIChDAdBgNVHQ4EFgQUo9KqLO8NjPIkAtUctGC8v2pbJBQwHwYDVR0jBBgwFoAUUpobMuBWqs1RD-9fgDcGi_KRIx0wCgYIKoZIzj0EAwIDSAAwRQIhALFvLkAvtHrObTmN8P0-yLIT496P_weSEEbB6vCJWSh9AiBu-UOorCeLcF4WixOG9E5Li2nXe4uM2q6mbKGkll8u-WhhdXRoRGF0YVikPdxHEOnAiLIp26idVjIguzn3Ipr_RlsKZWsa-5qK-KBBAAAAYFUOS1SqR0CfmpUat2wTATEAIFedRhNvbRm4W8u7G4NXGf6i_FfJ46hLF6QJ8EAaG74MpQECAyYgASFYIG6jCBK7kChGPxWL9k1IUFsZRklcUb0yQNPqMAOWvu04Ilggr00SCNVfnf56uBenI9oVmsBH2nL7GfN-Mguf8rNvwio',
clientDataJSON:
'eyJvcmlnaW4iOiJodHRwczovL2Rldi5kb250bmVlZGEucHciLCJjaGFsbGVuZ2UiOiI0YWI3ZGZkMS1hNjk1LTQ3NzctOTg1Zi1hZDI5OTM4MjhlOTkiLCJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIn0',
transports: ['internal'],
},
type: 'public-key',
clientExtensionResults: {},
},
expectedChallenge: '4ab7dfd1-a695-4777-985f-ad2993828e99',
expectedOrigin: 'https://dev.dontneeda.pw',
expectedRPID: 'dev.dontneeda.pw',
requireUserVerification: false,
});
const verification = await verifyFIDOConformanceResponse();

assertEquals(verification.verified, true);

mockDate.restore();
});

Deno.test('should verify Android Keystore response from a Pixel 8a in January 2025', async () => {
Expand Down Expand Up @@ -86,7 +64,7 @@ Deno.test('should verify Android Keystore response from a Pixel 8a in January 20
* notAfter: 2034-11-18T20:37:58.000Z
* }
*/
const mockDate = new FakeTime(new Date('2025-02-02T10:00:00.000Z'));
using _mockDate = new FakeTime(new Date('2025-02-02T10:00:00.000Z'));

const verification = await verifyRegistrationResponse({
response: {
Expand All @@ -112,8 +90,6 @@ Deno.test('should verify Android Keystore response from a Pixel 8a in January 20
});

assertEquals(verification.verified, true);

mockDate.restore();
});

Deno.test({
Expand Down Expand Up @@ -152,7 +128,17 @@ Deno.test({
* notAfter: 2026-05-24T16:28:52.000Z
* }
*/
const mockDate = new FakeTime(new Date('2025-07-15T10:00:00.000Z'));
using _mockDate = new FakeTime(new Date('2025-07-15T10:00:00.000Z'));

/**
* The certs in this chain have CRL distribution points. Fail the CRL fetches so the test doesn't
* make real network requests (a CRL that can't be fetched is treated as "not revoked".)
*/
using _mockFetch = stub(
_fetchInternals,
'stubThis',
() => Promise.reject(new Error('Network disabled in tests')),
);

const verification = await verifyRegistrationResponse({
response: {
Expand All @@ -174,8 +160,14 @@ Deno.test({
});

assertEquals(verification.verified, true);

mockDate.restore();
assertSpyCalls(_mockFetch, 3);
assertSpyCallArgs(_mockFetch, 0, [
'https://android.googleapis.com/attestation/crl/03701661152506932490',
]);
assertSpyCallArgs(_mockFetch, 1, [
'https://android.googleapis.com/attestation/crl/E8FA196314D2FA18',
]);
assertSpyCallArgs(_mockFetch, 2, ['https://android.googleapis.com/attestation/crl/']);
});

/**
Expand Down Expand Up @@ -225,3 +217,73 @@ MDSXYrB4I4WHXPGjxhZuCuPBLTdOLU8YRvMYdEvYebWHMpvwGCF6bAx3JBpIeOQ1
wDB5y0USicV3YgYGmi+NZfhA4URSh77Yd6uuJOJENRaNVTzk
-----END CERTIFICATE-----
`;

Deno.test('should reject android-key attestation when no root certificates are registered', async () => {
SettingsService.setRootCertificates({
identifier: 'android-key',
certificates: [],
});

using _mockTime = new FakeTime(new Date('2025-01-26T19:00:00.000Z'));
using _mockFetch = stub(
_fetchInternals,
'stubThis',
() => Promise.reject(new Error('Unexpected network request')),
);

await assertRejects(
verifyFIDOConformanceResponse,
Error,
'No root certificates were set',
);

assertSpyCalls(_mockFetch, 0);
});

Deno.test('should reject android-key attestation with an unknown root before validating the cert path', async () => {
// The x5c's final cert is not any of Google's roots, so it must be rejected up front
SettingsService.setRootCertificates({
identifier: 'android-key',
certificates: [Google_Hardware_Attestation_Root_2],
});

using _mockTime = new FakeTime(new Date('2025-01-26T19:00:00.000Z'));
using _mockFetch = stub(
_fetchInternals,
'stubThis',
() => Promise.reject(new Error('Unexpected network request')),
);

await assertRejects(
verifyFIDOConformanceResponse,
Error,
'x5c root certificate was not a known root certificate',
);

assertSpyCalls(_mockFetch, 0);
});

/**
* Response captured from FIDO Conformance testing (2020). Its x5c is [leaf, fake root].
*/
function verifyFIDOConformanceResponse() {
return verifyRegistrationResponse({
response: {
id: 'V51GE29tGbhby7sbg1cZ_qL8V8njqEsXpAnwQBobvgw',
rawId: 'V51GE29tGbhby7sbg1cZ_qL8V8njqEsXpAnwQBobvgw',
response: {
attestationObject:
'o2NmbXRrYW5kcm9pZC1rZXlnYXR0U3RtdKNjYWxnJmNzaWdYRzBFAiAbZhfcF0KSXj5rdEevvnBcC8ZfRQlNl9XYWRTiIGKSHwIhAIerc7jWjOF_lJ71n_GAcaHwDUtPxkjAAdYugnZ4QxkmY3g1Y4JZAxowggMWMIICvaADAgECAgEBMAoGCCqGSM49BAMCMIHkMUUwQwYDVQQDDDxGQUtFIEFuZHJvaWQgS2V5c3RvcmUgU29mdHdhcmUgQXR0ZXN0YXRpb24gSW50ZXJtZWRpYXRlIEZBS0UxMTAvBgkqhkiG9w0BCQEWImNvbmZvcm1hbmNlLXRvb2xzQGZpZG9hbGxpYW5jZS5vcmcxFjAUBgNVBAoMDUZJRE8gQWxsaWFuY2UxIjAgBgNVBAsMGUF1dGhlbnRpY2F0b3IgQXR0ZXN0YXRpb24xCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJNWTESMBAGA1UEBwwJV2FrZWZpZWxkMCAXDTcwMDIwMTAwMDAwMFoYDzIwOTkwMTMxMjM1OTU5WjApMScwJQYDVQQDDB5GQUtFIEFuZHJvaWQgS2V5c3RvcmUgS2V5IEZBS0UwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNC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dGUgRkFLRTExMC8GCSqGSIb3DQEJARYiY29uZm9ybWFuY2UtdG9vbHNAZmlkb2FsbGlhbmNlLm9yZzEWMBQGA1UECgwNRklETyBBbGxpYW5jZTEiMCAGA1UECwwZQXV0aGVudGljYXRvciBBdHRlc3RhdGlvbjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk1ZMRIwEAYDVQQHDAlXYWtlZmllbGQwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASrUGErYk0Xu8O1GwRJOwVJC4wfi52883my3tygfFKh17YN0yF13Ct-3bwm2wjVX4b2cbaU3DBNpKKKjE4DpvXHo2MwYTAPBgNVHRMBAf8EBTADAQH_MA4GA1UdDwEB_wQEAwIChDAdBgNVHQ4EFgQUo9KqLO8NjPIkAtUctGC8v2pbJBQwHwYDVR0jBBgwFoAUUpobMuBWqs1RD-9fgDcGi_KRIx0wCgYIKoZIzj0EAwIDSAAwRQIhALFvLkAvtHrObTmN8P0-yLIT496P_weSEEbB6vCJWSh9AiBu-UOorCeLcF4WixOG9E5Li2nXe4uM2q6mbKGkll8u-WhhdXRoRGF0YVikPdxHEOnAiLIp26idVjIguzn3Ipr_RlsKZWsa-5qK-KBBAAAAYFUOS1SqR0CfmpUat2wTATEAIFedRhNvbRm4W8u7G4NXGf6i_FfJ46hLF6QJ8EAaG74MpQECAyYgASFYIG6jCBK7kChGPxWL9k1IUFsZRklcUb0yQNPqMAOWvu04Ilggr00SCNVfnf56uBenI9oVmsBH2nL7GfN-Mguf8rNvwio',
clientDataJSON:
'eyJvcmlnaW4iOiJodHRwczovL2Rldi5kb250bmVlZGEucHciLCJjaGFsbGVuZ2UiOiI0YWI3ZGZkMS1hNjk1LTQ3NzctOTg1Zi1hZDI5OTM4MjhlOTkiLCJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIn0',
transports: ['internal'],
},
type: 'public-key',
clientExtensionResults: {},
},
expectedChallenge: '4ab7dfd1-a695-4777-985f-ad2993828e99',
expectedOrigin: 'https://dev.dontneeda.pw',
expectedRPID: 'dev.dontneeda.pw',
requireUserVerification: false,
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,26 +136,39 @@ export async function verifyAttestationAndroidKey(
}
} else {
/**
* Verify that x5c contains a full certificate path.
* Fail closed if for some reason no root certificates were registered with SettingsService
* for this attestation format. Android Key attestation statements are a bit unique in that they
* contain a full certificate chain, which an attacker could abuse to perform arbitrary network
* requests within the RP's boundary if we simply validated x5c like other attestation formats.
*/
if (rootCertificates.length === 0) {
throw new Error(
'No root certificates were set with SettingsService for "android-key" attestation (Android Key)',
);
}

const x5cNoRootPEM = x5c.slice(0, -1).map(convertCertBufferToPEM);
const x5cRootPEM = x5c.slice(-1).map(convertCertBufferToPEM);

try {
await validateCertificatePath(x5cNoRootPEM, x5cRootPEM);
} catch (err) {
const _err = err as Error;
throw new Error(`${_err.message} (Android Key)`, { cause: _err });
}

/**
* Make sure the root certificate is one of the Google Hardware Attestation Root certificates
* Make sure the final cert in x5c is one of the Google Hardware Attestation Root certificates
* before we attempt to validate the certificate chain.
*
* https://developer.android.com/privacy-and-security/security-key-attestation#root_certificate
*/
if (rootCertificates.length > 0 && rootCertificates.indexOf(x5cRootPEM[0]) < 0) {
if (rootCertificates.indexOf(x5cRootPEM[0]) < 0) {
throw new Error('x5c root certificate was not a known root certificate (Android Key)');
}

/**
* Verify that x5c contains a full certificate path.
*/
try {
await validateCertificatePath(x5cNoRootPEM, x5cRootPEM);
} catch (err) {
const _err = err as Error;
throw new Error(`${_err.message} (Android Key)`, { cause: _err });
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ import { _verifySignatureInternals } from '../helpers/verifySignature.ts';
import { toHash } from '../helpers/toHash.ts';
import { isoBase64URL, isoUint8Array } from '../helpers/iso/index.ts';
import { COSEALG, COSEKEYS } from '../helpers/cose.ts';
import { denoSupportsPQC } from '../helpers/tests/index.ts';
import { denoSupportsPQC, FIDO_Conformance_Fake_Root } from '../helpers/tests/index.ts';
import { SettingsService } from '../services/settingsService.ts';
import { MetadataService } from '../services/metadataService.ts';
import { ConvenienceMetadataService } from '../services/convenienceMetadataService.ts';
import type { ProviderMetadata } from '../metadata/convenienceMDSTypes.ts';
import { SimpleWebAuthnError } from '../errors/index.ts';

/**
* Clear out root certs for android-key since responses were captured from FIDO Conformance testing
* Trust the fake root for android-key since responses were captured from FIDO Conformance testing
* and have cert paths that can't be validated with known root certs from Google
*/
SettingsService.setRootCertificates({
identifier: 'android-key',
certificates: [],
certificates: [FIDO_Conformance_Fake_Root],
});

Deno.test('should verify FIDO U2F attestation', async () => {
Expand Down
Loading