Repository navigation
feat(api): send DPoP proofs on every request and recover from a lost or foreign key #1240
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
Draft
Draft
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
064900e
feat(api): record the response Date in a ServerClock from ClientSynci…
swolfand 02ae53b
feat(api): decide once per configure whether requests carry a DPoP proof
swolfand e84709d
feat(api): sign every FAPI request with a DPoP proof
swolfand 84ec8b3
feat(api): retry once when FAPI rejects a DPoP proof as invalid
swolfand 0a77607
feat(api): drop a device token that FAPI says belongs to another key
swolfand 07c5749
test(api): pin the unsigned paths: a failed sign and a runtime with n…
swolfand 7feda8e
feat(api): drop a device-bound token at launch when shared session sy…
swolfand 0664b0f
feat(api): add Clerk.deleteDeviceKey for debug tools that test key loss
swolfand 3a7b7d4
style(api): keep only the comment that explains OkHttp's per-attempt …
swolfand 81a865d
feat(workbench): add a device binding debug screen
swolfand 59ea08b
fix(api): close the device-binding gaps the review found
swolfand fe7a840
test(api): pin when a device-bound request may go out without a proof
swolfand cb303ea
fix(api): fail a device-bound request on a transient signing gap inst…
swolfand 81d8c0c
test(api): pin that shared session sync adopts and drops a synced tok…
swolfand 3005b44
refactor(api): give requests one DeviceBindingState to read the bindi…
swolfand 9c61f98
test(api): pin that three transient key failures in a row stop signing
swolfand 4d02f30
fix(api): stop signing after three transient key failures in a row
swolfand b93dc1d
test(api): pin that a request-time key load is bounded and counts as …
swolfand 205dc35
fix(api): bound a request-time key load by the same wait as the first…
swolfand 5ab0b0d
test(api): pin that a request-time key load recording Unavailable sto…
swolfand 06fe33e
fix(api): read a key the holder recorded as unavailable as NotSigning…
swolfand 9c39dd5
test(api): pin that a slow key load counts once however many requests…
swolfand 724f746
fix(api): count a slow key load once, however many requests wait on it
swolfand 3b7fb89
test(api): pin that a key load settles when it completes, not when a …
swolfand f9a6cd4
fix(api): settle a key load when it completes, so the reset and the g…
swolfand 1eb0137
refactor(api): inject the IO dispatcher for device key loads and deletes
swolfand e118c84
test(api): wait for the startup test's requests to record their token…
swolfand 90f8cc3
test(api): pin that a hung or failing sibling reload does not hold or…
swolfand c4fc72b
fix(api): bound the startup sibling reload and start without siblings…
swolfand 88b8170
test(api): pin that a key load completing after KEY_LOAD_GIVE_UP resu…
swolfand d721461
fix(api): resume signing when a key load completes after KEY_LOAD_GIV…
swolfand 3dbe425
test(api): fail instead of hanging when a key load never records its …
swolfand 2b61d11
test(api): pin that a key load throwing a non-Keystore exception leav…
swolfand 6392473
fix(api): record any non-cancellation key load exception as an unavai…
swolfand be38616
test(api): wait for the binding state instead of sleeping after a key…
swolfand File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: clerk/clerk-android
Length of output: 2672
Script executed:
Repository: clerk/clerk-android
Length of output: 41734
Script executed:
Repository: clerk/clerk-android
Length of output: 41488
Script executed:
Repository: clerk/clerk-android
Length of output: 24885
Script executed:
Repository: clerk/clerk-android
Length of output: 13381
Reject bound tokens during shared-session adoption.
A reload that exceeds the two-second wait continues in
scope.async. When it later receives a sibling snapshot,applyDeviceTokenSnapshot()can restore itscnftoken after startup has cleared the local token. Shared-session mode does not sign requests, so later requests send the restored token withoutDPoP.Suggested fix