Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/isomorphic #299

Merged
merged 122 commits into from
Dec 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
bf8a082
Add new base64url helpers
MasterKale Nov 6, 2022
3862d90
Add new uint8array helpers
MasterKale Nov 6, 2022
3e372d7
Add cbor-x dependency to server
MasterKale Nov 6, 2022
9410148
Replace most Buffer types with Uint8Array
MasterKale Nov 6, 2022
6ca32c5
Switch to internal base64url
MasterKale Nov 6, 2022
dc523d8
Switch to uint8array helpers
MasterKale Nov 6, 2022
1b35937
Rewrite decodeCborFirst with cbor-x
MasterKale Nov 6, 2022
7fe7aca
Get consistent on use of decodeCborFirst
MasterKale Nov 6, 2022
867748d
Update COSEPublicKey typing for new cbor output
MasterKale Nov 6, 2022
aa071a7
Add @hexagon/base64
MasterKale Nov 11, 2022
80a2c94
Replace some lingering references to Buffer
MasterKale Nov 11, 2022
c92d508
Expand decodeCborFirst into cbor utils
MasterKale Nov 11, 2022
4623774
Expand base64url utils and remove default
MasterKale Nov 11, 2022
9df18aa
Expand uint8array utils
MasterKale Nov 11, 2022
295c546
Update uint8Array import paths
MasterKale Nov 11, 2022
4fce047
Refactor parseAuthenticatorData
MasterKale Nov 11, 2022
d297921
Refactor to use cbor helpers
MasterKale Nov 11, 2022
bdf25f4
Replace use of base64url dep in clientDataJSON
MasterKale Nov 11, 2022
348cb77
Refactor decodeAuthenticatorExtensions
MasterKale Nov 11, 2022
248bd4c
Expose new helpers in helpers export
MasterKale Nov 11, 2022
0c0c096
Replace some more references to Buffer
MasterKale Nov 11, 2022
2674a28
Replace more referneces to external base64url
MasterKale Nov 11, 2022
b522a24
Update verify reg resp for CBOR maps
MasterKale Nov 11, 2022
e5f0187
Refactor more to handle CBOR maps
MasterKale Nov 11, 2022
9c9cf63
Clean up some lingering uint8array helper refs
MasterKale Nov 11, 2022
86e86b3
Tighten up base64 vs base64url detection
MasterKale Nov 11, 2022
9d99d93
Be explicit about globalThis in string encoding
MasterKale Nov 11, 2022
cec1940
Uninstall base64url and cbor
MasterKale Nov 12, 2022
60d8dd5
Add node-fetch-native
MasterKale Nov 12, 2022
f3ca056
Use more globalThis
MasterKale Nov 12, 2022
958ca18
Uninstall dev types
MasterKale Nov 12, 2022
5b7cf4f
Refactor to use node-factor-native
MasterKale Nov 12, 2022
d50eb4f
Switch to cross-fetch for fetch
MasterKale Nov 12, 2022
0e7a60a
Remove some lingering Buffer
MasterKale Nov 12, 2022
79bec97
Clean up uint8array text en/decoder
MasterKale Nov 12, 2022
b258acf
Use globalThis for generateChallenge()
MasterKale Nov 12, 2022
a42cd6a
Make toHash async to prep for SubtleCrypto
MasterKale Nov 12, 2022
790dd59
Refactor RP ID hash matching
MasterKale Nov 12, 2022
4733cb4
Target more modern JS in server
MasterKale Nov 12, 2022
7d710c7
Update fetch reference
MasterKale Nov 12, 2022
0d660af
Update Node engine in package.json for server
MasterKale Nov 12, 2022
8879fe5
Attempt to make generateChallenge isomorphic
MasterKale Nov 12, 2022
972d1d7
Update Lerna and NX
MasterKale Nov 12, 2022
322f106
Get things super clean
MasterKale Nov 12, 2022
a27116e
Hack around Lerna's dropping stdout on error
MasterKale Nov 13, 2022
568c419
Use `npm ci` instead of `npm i`
MasterKale Nov 13, 2022
044df9e
Update server tsconfig lib
MasterKale Nov 13, 2022
2ad8a7b
Add moduleResolution to server
MasterKale Nov 13, 2022
ad7818a
Downgrade moduleResolution
MasterKale Nov 13, 2022
6a4ced1
Rename isomorphic helpers to avoid collision?
MasterKale Nov 13, 2022
6e3db96
Figure out a better pattern for exposing iso funcs
MasterKale Nov 13, 2022
34bb5e0
Revert some config changes from Lerna debugging
MasterKale Nov 13, 2022
f08f876
Bump up tsdoc TS config lib
MasterKale Nov 13, 2022
dc0e0ed
Figure out a slow part of cert path validation
MasterKale Nov 13, 2022
f15dcad
Update toHash to use SubtleCrypto
MasterKale Nov 13, 2022
dc80d5c
Move raw Crypto stuff into an iso helper
MasterKale Nov 13, 2022
6de86b6
Update helpers to use isoCrypto
MasterKale Nov 13, 2022
a6fcfa9
Tweak isoCrypto docstring
MasterKale Nov 13, 2022
253cf8c
Replace isBase64URLString with isoBase64URL func
MasterKale Nov 13, 2022
e4ef15b
Bump up apple test time to 30 seconds
MasterKale Nov 13, 2022
3e46d17
Add methods for mapping from COSE to WebCrypto
MasterKale Nov 16, 2022
cbd6610
Tighten up typing on normalizeAlgorithm
MasterKale Nov 16, 2022
661f6fa
Add EC public key support
MasterKale Nov 16, 2022
ddec52e
Use new isoCrypto for EC sig verification
MasterKale Nov 16, 2022
7eac870
Update TypeScript and typedoc
MasterKale Nov 16, 2022
dc5c030
Define COSECRV as enums
MasterKale Nov 16, 2022
61d97ad
Rename credentialPublicKey argument
MasterKale Nov 16, 2022
41fffae
Tweak typing for JWK
MasterKale Nov 16, 2022
e1ff1e0
Make new isoVerify default sig verifier for pubkey
MasterKale Nov 16, 2022
684182b
Add test helper for webcrypto
MasterKale Nov 16, 2022
e697271
Support leaf cert sig verification
MasterKale Nov 17, 2022
88462fc
Update calls to verifySignature()
MasterKale Nov 17, 2022
3ba3abf
Add @peculiar/asn1-rsa
MasterKale Nov 17, 2022
1edd5bb
Tweak verifySignature argument name
MasterKale Nov 17, 2022
2d122b4
Go ham on adding more type guards
MasterKale Nov 17, 2022
2cdf440
Update to TypeScript 4.9
MasterKale Nov 18, 2022
4d92de7
Update verifySignature() options
MasterKale Nov 18, 2022
599288e
Break up isoCrypto
MasterKale Nov 18, 2022
6ab5b63
Split out COSE-specific values
MasterKale Nov 20, 2022
217e11b
Tighten up .digest() with COSE values
MasterKale Nov 20, 2022
296f50e
Add helper to convert X.509 pubKeys to COSE
MasterKale Nov 20, 2022
d97b72e
Move complexity of sig ver into isoCrypto.verify()
MasterKale Nov 20, 2022
a7f2514
Map TPM alg to COSE alg
MasterKale Nov 20, 2022
52e1abc
Streamline calls to verifySignature()
MasterKale Nov 20, 2022
4749a8c
Remove unused method
MasterKale Nov 20, 2022
b0e0d0c
Update helpers exports
MasterKale Nov 20, 2022
38f1a2f
Add support for RS1 alg in X.509 certs
MasterKale Nov 20, 2022
8e6c7b4
Add crv to COSEPublicKeyOKP
MasterKale Nov 20, 2022
c9943c5
Add missing key type to error
MasterKale Nov 20, 2022
6e91624
Add OKP verification
MasterKale Nov 20, 2022
0c4c1e8
Add some docs
MasterKale Nov 20, 2022
2740f81
Restore registration error case detection
MasterKale Nov 20, 2022
c01fd84
Fix issues in Browser due to TypeScript upgrade
MasterKale Nov 20, 2022
99f632c
Update VS Code debug launch definition
MasterKale Nov 20, 2022
162f2f4
Point VS Code to project's TypeScript
MasterKale Nov 20, 2022
9765136
Fix server tests after type update
MasterKale Nov 20, 2022
8e44429
Uninstall unused third-party libs from server
MasterKale Nov 20, 2022
c41dead
Run linter over everything
MasterKale Nov 20, 2022
08363a1
Update eslint deps
MasterKale Nov 20, 2022
f702bad
Enable VS Code formatting on save
MasterKale Nov 20, 2022
c206125
Add helper for mapping COSE alg to key alg
MasterKale Nov 20, 2022
9874a3a
Add support for RSA-PSS
MasterKale Nov 21, 2022
c27ef18
Add some notes
MasterKale Nov 21, 2022
9ae90a4
Make mapCoseAlgToWebCryptoAlg more readable
MasterKale Nov 21, 2022
e5d9b65
Always use SHA-256 for fido-u2f
MasterKale Nov 22, 2022
7eba763
Set proper salt lengths for RSA-PSS
MasterKale Nov 22, 2022
07b23cb
Remove internal testing library
MasterKale Nov 29, 2022
86adf04
Vendor tiny-webcrypto
MasterKale Nov 29, 2022
e17af81
Update server to use iso-webcrypto
MasterKale Nov 29, 2022
fb47ece
Extract Crypto DOM types
MasterKale Nov 29, 2022
a7b63ba
Clean up some unused imports
MasterKale Nov 29, 2022
bdfb547
Remove iso-webcrypto Crypto types
MasterKale Nov 29, 2022
04908c6
Remove dist/ on iso-webcrypto build
MasterKale Nov 29, 2022
b3a84ab
Use top-level TypeScript
MasterKale Nov 29, 2022
2b6c455
Try to debug iso-webcrypto build failure
MasterKale Nov 29, 2022
26a2fbf
Restore TypeScript to iso-webcrypto
MasterKale Nov 29, 2022
e99c300
Replace tsex with tsc
MasterKale Nov 29, 2022
d8d3316
Revert build script after debugging
MasterKale Nov 29, 2022
a3d4542
Deal with weird typing edge case
MasterKale Nov 29, 2022
d7eede6
Run linting on everything
MasterKale Nov 29, 2022
93e1a0e
Update linting deps
MasterKale Nov 29, 2022
90dd7f2
Address PR feedback
MasterKale Dec 2, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm i
- run: npm ci
- run: npm run bootstrap:ci
- run: npm test
5 changes: 3 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"type": "node",
"name": "Launch Example Server",
"request": "launch",
"runtimeArgs": [
Expand All @@ -14,7 +14,8 @@
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
"<node_internals>/**",
"${workspaceFolder}/**/node_modules/**",
],
"cwd": "${workspaceFolder}/example",
}
Expand Down
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": true
}
Loading