-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathfido2viewer.html
191 lines (176 loc) · 17.9 KB
/
fido2viewer.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<html>
<head>
<!--
Open source dependencies - thanks to all the open-source contributors!
The included dependencies are as originally sourced, and include the licenses published with each piece code.
-->
<script src = "https://code.jquery.com/jquery-1.11.3.min.js"></script>
<!-- From https://kjur.github.io/jsrsasign/jsrsasign-latest-all-min.js -->
<script src = "./jsrsasign-latest-all-min.js"></script>
<!-- From https://github.com/paroga/cbor-js -->
<script src="./cbor.js"></script>
<!-- From https://lapo.it/asn1js/ -->
<script src="./hex.js"></script>
<script src="./base64.js"></script>
<script src="./oids.js"></script>
<script src="./int10.js"></script>
<script src="./asn1.js"></script>
<!--
A minor custom mod to the CBOR library needed to deal with CBOR objects that
are part of byte arrays that continue beyond the CBOR object being decoded.
-->
<script type="text/javascript" src="./cbormods.js"></script>
<!--
The implementation of FIDO2-specific parsing functions
-->
<script type="text/javascript" src="./fidotools.js"></script>
<!--
Test data set population - feel free to extend this with your own collected data.
-->
<script type="text/javascript">
var testAttestationData = [
{
"label": "Valid: Windows TPM with ECC",
"value": {
"id": "iciJw39MIj16QpadEvmkfhhBkh2jdQz0mKHxSYKonzc",
"rawId": "iciJ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G65NZ7j_EOp8-ACIAC1NI5LXbuPYudBBNKXXCtM8InzhxAzRm_t2g4lalyeFRaGF1dGhEYXRhWKTxP1SjSrtZ7qcnR2qRKRKztnsngv5tCz1f-oclXyUo00UAAAAACJhwWMrcS4G24TDeUNy-lgAgiciJw39MIj16QpadEvmkfhhBkh2jdQz0mKHxSYKonzelAQIDJiABIVggpIi82Lvgqe-nVN1CXZw1TzsSlXligOEiY3wxsjHAbhQiWCC_JnciFNQnBP1iQYapn6e-xgXcLueROMHM_ONlAd8HZQ"
},
"getClientExtensionResults": {}
}
},
{
"label": "Valid: Yubikey Nano verify.securitypoc.com",
"value": {
"id": "fZP8eV_pnkvcw-2SKrRmXQ",
"rawId": "fZP8eV_pnkvcw-2SKrRmXQ",
"response": {
"clientDataJSON": "eyJjaGFsbGVuZ2UiOiJWUnJtYV8tajlqcTlrdks5Rkl4MG1kSDN0V2ZKcmdqR1I5djc0NlE0M0NNIiwib3JpZ2luIjoiaHR0cHM6Ly92ZXJpZnkuc2VjdXJpdHlwb2MuY29tIiwidHlwZSI6IndlYmF1dGhuLmNyZWF0ZSJ9",
"attestationObject": "o2NmbXRmcGFja2VkZ2F0dFN0bXSjY2FsZyZjc2lnWEgwRgIhAOzCzj0kRXc9z_AGbVPKaqto3YDrO3X-q_SeuUHLA5wPAiEAzTlYMf2mvzYbd-K2qrfvF9pUF17o1TVWBp8Uf_xzhRhjeDVjgVkCwTCCAr0wggGloAMCAQICBBisRsAwDQYJKoZIhvcNAQELBQAwLjEsMCoGA1UEAxMjWXViaWNvIFUyRiBSb290IENBIFNlcmlhbCA0NTcyMDA2MzEwIBcNMTQwODAxMDAwMDAwWhgPMjA1MDA5MDQwMDAwMDBaMG4xCzAJBgNVBAYTAlNFMRIwEAYDVQQKDAlZdWJpY28gQUIxIjAgBgNVBAsMGUF1dGhlbnRpY2F0b3IgQXR0ZXN0YXRpb24xJzAlBgNVBAMMHll1YmljbyBVMkYgRUUgU2VyaWFsIDQxMzk0MzQ4ODBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABHnqOyx8SXAQYiMM0j_rYOUpMXHUg_EAvoWdaw-DlwMBtUbN1G7PyuPj8w-B6e1ivSaNTB69N7O8vpKowq7rTjqjbDBqMCIGCSsGAQQBgsQKAgQVMS4zLjYuMS40LjEuNDE0ODIuMS43MBMGCysGAQQBguUcAgEBBAQDAgUgMCEGCysGAQQBguUcAQEEBBIEEMtpSB6P90A5k-wKJymhVKgwDAYDVR0TAQH_BAIwADANBgkqhkiG9w0BAQsFAAOCAQEAl50Dl9hg-C7hXTEceW66-yL6p-CE2bq0xhu7V_PmtMGKSDe4XDxO2-SDQ_TWpdmxztqK4f7UkSkhcwWOXuHL3WvawHVXxqDo02gluhWef7WtjNr4BIaM-Q6PH4rqF8AWtVwqetSXyJT7cddT15uaSEtsN21yO5mNLh1DBr8QM7Wu-Myly7JWi2kkIm0io1irfYfkrF8uCRqnFXnzpWkJSX1y9U4GusHDtEE7ul6vlMO2TzT566Qay2rig3dtNkZTeEj-6IS93fWxuleYVM_9zrrDRAWVJ-Vt1Zj49WZxWr5DAd0ZETDmufDGQDkSU-IpgD867ydL7b_eP8u9QurWeWhhdXRoRGF0YViUqiG-djSKVNwMgGU2w25AS8oEQsOcOeDlb6wZKQYe2HdFAAAAQMtpSB6P90A5k-wKJymhVKgAEH2T_Hlf6Z5L3MPtkiq0Zl2lAQIDJiABIVggTt7WKbgGkv5fz8lgEo_0HgjX4HIuhDmgsdjHW5YYgFciWCBlUQP_OSe6Iw4y6uFKMRfscAh5XdLZTG6jT4LMSwh6WA"
},
"getClientExtensionResults": {}
}
},
{
"label": "Valid: Mac Touchbar on verify.securitypoc.com",
"value": {
"id": "AJNjbWkYxEupGF_UEFamwmsjWLHhaJv2CRRbvvgS3Xab7AL0MhrDNB9doLwsYCatKuVNooiSeRM7C8ExcJwBppNagxd9X2l3AVBXDespqNLqnO0T5dQeg4Ujp0WFMRF_7sM",
"rawId": "AJNjbWkYxEupGF_UEFamwmsjWLHhaJv2CRRbvvgS3Xab7AL0MhrDNB9doLwsYCatKuVNooiSeRM7C8ExcJwBppNagxd9X2l3AVBXDespqNLqnO0T5dQeg4Ujp0WFMRF_7sM",
"response": {
"clientDataJSON": "eyJjaGFsbGVuZ2UiOiJaSGRzeUR6Znk1d0Zha3JTTGtpMTB6MjVZeGN6OXZtSkFuUFUxQ2lWd25zIiwib3JpZ2luIjoiaHR0cHM6Ly92ZXJpZnkuc2VjdXJpdHlwb2MuY29tIiwidHlwZSI6IndlYmF1dGhuLmNyZWF0ZSJ9",
"attestationObject": "o2NmbXRmcGFja2VkZ2F0dFN0bXSiY2FsZyZjc2lnWEgwRgIhANp2FPakwSdPJP6hMxJZnIGUEwfZCYgeQZfARZ6jB-p0AiEA-kZYBCOV9EcMlcMtnQJQe5xGfouqQs6UKjUxY3Hxz9JoYXV0aERhdGFY5qohvnY0ilTcDIBlNsNuQEvKBELDnDng5W-sGSkGHth3RV1yFTitzgACNbzGCmSLCyXx8FUDAGIAk2NtaRjES6kYX9QQVqbCayNYseFom_YJFFu--BLddpvsAvQyGsM0H12gvCxgJq0q5U2iiJJ5EzsLwTFwnAGmk1qDF31faXcBUFcN6ymo0uqc7RPl1B6DhSOnRYUxEX_uw6UBAgMmIAEhWCCiTdcTw20_0iRxTyymzGaF2zPi4siw0Q42uG3klcSZ5yJYIBng68JPd3SdfrKtHn0uX52KYso24eX3eAR_f9C1v2c_"
},
"getClientExtensionResults": {}
}
},
{
"label": "Valid: Apple Attestation",
"value": {"nickname":"Test Apple Attestation","id":"U_YoaLZuuHlF8UKMAK_eclG_EKE","rawId":"U_YoaLZuuHlF8UKMAK_eclG_EKE","type":"public-key","response":{"clientDataJSON":"eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiVXgySEszNFJaYkJzd2IwSlFKeG5rNFJuWjljbkxNNDQ2Sl9keWg2ZmExVSIsIm9yaWdpbiI6Imh0dHBzOi8vZmlkb2ludGVyb3Auc2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qNLqnO0T5dQeg4Ujp0WFMRF_7sM","type":"public-key","response":{"clientDataJSON":"eyJjaGFsbGVuZ2UiOiJNNFVFRkRhMTZOTFM3c1BPYnpvQURJMkFqME9SeFRzQjJMVFl3cFlVcXBvIiwib3JpZ2luIjoiaHR0cHM6Ly92ZXJpZnkuc2VjdXJpdHlwb2MuY29tIiwidHlwZSI6IndlYmF1dGhuLmdldCJ9","authenticatorData":"qiG-djSKVNwMgGU2w25AS8oEQsOcOeDlb6wZKQYe2HcFAAAAQQ","signature":"MEUCIQCd9fA06dyi-uj0O3ZtrpQy8v7FOlVq8m6jpV5MBWa8qQIgNoUuzN0yJOG3DjvfxNaWKbMUV9uw1rJ5HnR55FRSpXQ","userHandle":"CQCyJxquTxq2j1aiIbcdSw"},"getClientExtensionResults":{}},
"publicKey": {
"1": 2,
"3": -7,
"-1": 1,
"-2": [78,222,214,41,184,6,146,254,95,207,201,96,18,143,244,30,8,215,224,114,46,132,57,160,177,216,199,91,150,24,128,87],
"-3": [101,81,3,255,57,39,186,35,14,50,234,225,74,49,23,236,112,8,121,93,210,217,76,110,163,79,130,204,75,8,122,88]
}
},
{
"label": "Valid: For Mac Touchbar on verify.securitypoc.com",
"value": {"id":"fZP8eV_pnkvcw-2SKrRmXQ","rawId":"fZP8eV_pnkvcw-2SKrRmXQ","type":"public-key","response":{"clientDataJSON":"eyJjaGFsbGVuZ2UiOiJBOTRCUllFX3k3UW9OUWs4MEhaaElQOVN1a0lzdjBkYWdsX0FlT2ZfYW5VIiwiZXh0cmFfa2V5c19tYXlfYmVfYWRkZWRfaGVyZSI6ImRvIG5vdCBjb21wYXJlIGNsaWVudERhdGFKU09OIGFnYWluc3QgYSB0ZW1wbGF0ZS4gU2VlIGh0dHBzOi8vZ29vLmdsL3lhYlBleCIsIm9yaWdpbiI6Imh0dHBzOi8vdmVyaWZ5LnNlY3VyaXR5cG9jLmNvbSIsInR5cGUiOiJ3ZWJhdXRobi5nZXQifQ","authenticatorData":"qiG-djSKVNwMgGU2w25AS8oEQsOcOeDlb6wZKQYe2HcFXXIVyQ","signature":"MEQCIHyETTdXRBd_n-lz0KgSNPHnnUXsZn6DSNpASP02zBzMAiB-cL7DC1fj2abI4REZLALNH3OXYg733gvEZhoe8h1JNw","userHandle":"CQCyJxquTxq2j1aiIbcdSw"},"getClientExtensionResults":{}},
"publicKey": {
"1": 2,
"3": -7,
"-1": 1,
"-2": [162,77,215,19,195,109,63,210,36,113,79,44,166,204,102,133,219,51,226,226,200,176,209,14,54,184,109,228,149,196,153,231],
"-3": [25,224,235,194,79,119,116,157,126,178,173,30,125,46,95,157,138,98,202,54,225,229,247,120,4,127,127,208,181,191,103,63]
}
}
];
</script>
<!--
Set of functions used to call the tools and perform the HTML rendering used in this page
-->
<script type="text/javascript" src="./fidoviewer.js"></script>
<!-- CSS -->
<style>
.titleClass {
font-family: Georgia, serif;
color: blue;
font-size: 30px;
text-decoration: underline;
}
.dataHeading {
font-family: Georgia, serif;
font-size: 25px;
}
.dataHeadingSuccess {
font-family: Georgia, serif;
color: #32CD32;
font-size: 25px;
}
.dataHeadingError {
font-family: Georgia, serif;
color: #FF9033;
font-size: 25px;
}
.dataTextArea {
font-family: "Lucida Console", Monaco, monospace;
}
.dataTextAreaError {
color: red;
}
</style>
</head>
<body onload="onLoad()">
<a class="titleClass" onclick="$('#attestationDiv').toggle()">Attestation Verifier</a>
<div id="attestationDiv" style="display:none">
<h3>Input what you have of the attestation payload:</h3>
<div id="testAttestationSelectDiv"></div>
<input type="button" value="Populate test data" onclick="testAttestation()" />
<br />
<table id="attestationInputTable" border="0">
<tr><td>id</td><td><input type="text" id="attestationId" size="100" /></td></tr>
<tr><td>rawId</td><td><input type="text" id="attestationRawId" size="100" /></td></tr>
<tr><td>type</td><td><input type="text" id="attestationType" size="12" value="public-key" readonly="true" /></td></tr>
<tr><td>response.clientDataJSON</td><td><input type="text" id="attestationClientDataJSON" size="120" /></td></tr>
<tr><td>response.attestationObject</td><td><input type="text" id="attestationAttestationObject" size="120" /></td></tr>
<tr><td>getClientExtensionResults</td><td><input type="text" id="attestationGetClientExtensionResults" size="50" value="{}" /></td></tr>
</table>
<input type="button" value="Process Attestation Fields" onclick="processAttestation()" />
</div>
<br>
<a class="titleClass" onclick="$('#assertionDiv').toggle()">Assertion Verifier</a>
<div id="assertionDiv" style="display:none">
<h3>Input what you have of the assertion payload:</h3>
<div id="testAssertionSelectDiv"></div>
<input type="button" value="Populate test data" onclick="testAssertion()" />
<br />
<table id="assertionInputTable" border="0">
<tr><td>id</td><td><input type="text" id="assertionId" size="100" /></td></tr>
<tr><td>rawId</td><td><input type="text" id="assertionRawId" size="100" /></td></tr>
<tr><td>type</td><td><input type="text" id="assertionType" size="12" value="public-key" readonly="true" /></td></tr>
<tr><td>response.clientDataJSON</td><td><input type="text" id="assertionClientDataJSON" size="120" /></td></tr>
<tr><td>response.authenticatorData</td><td><input type="text" id="assertionAuthenticatorData" size="120" /></td></tr>
<tr><td>response.signature</td><td><input type="text" id="assertionSignature" size="120" /></td></tr>
<tr><td>response.userHandle</td><td><input type="text" id="assertionUserHandle" size="120" /></td></tr>
<tr><td>getClientExtensionResults</td><td><input type="text" id="assertionGetClientExtensionResults" size="50" value="{}" /></td></tr>
<tr />
<tr><td colspan="2">If you have the public key for signature validation (either PEM, COSE format, or base64(cbor(COSE_key))), paste it below:</td></tr>
<tr><td colspan="2"><textarea id="assertionPublicKeyTextArea" class="dataTextArea" rows="8" cols="50" wrap="off"></textarea></td></tr>
</table>
<input type="button" value="Process Assertion Fields" onclick="processAssertion()" />
</div>
<br>
<h2>Details</h2>
<input type="button" value="Clear Details" onclick="updateMsg('')" />
<div id="detailsDiv" style="display:none">
</div></body>
</html>